Ignore:
Timestamp:
Feb 24, 2019, 4:32:17 PM (3 years ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
aaron-thesis, arm-eh, cleanup-dtors, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, persistent-indexer
Children:
5509ff4, 734ceb3e, 7abee38
Parents:
6ca6811
Message:

more bracket rows in matrix initialization

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/BasicTypes-gen.cc

    r6ca6811 rfd9ae1d  
    313313        code << "\t" << BYMK << endl;
    314314        code << "\tstatic const int costMatrix[BasicType::NUMBER_OF_BASIC_TYPES][BasicType::NUMBER_OF_BASIC_TYPES] = { // path length from root to node" << endl
    315                  << "\t\t/*       ";
     315                 << "\t\t/*         ";
    316316        for ( int r = 0; r < NUMBER_OF_BASIC_TYPES; r += 1 ) { // titles
    317                 code << setw(4) << graph[r].abbrev << ' ';
    318         } // for
    319         code << "*/" << endl;
     317                code << setw(5) << graph[r].abbrev;
     318        } // for
     319        code << " */" << endl;
    320320        for ( int r = 0; r < NUMBER_OF_BASIC_TYPES; r += 1 ) { // costs
    321                 code << "\t\t/*" << setw(6) << graph[r].abbrev << "*/";
     321                code << "\t\t/*" << setw(6) << graph[r].abbrev << "*/ {";
    322322                for ( int c = 0; c < NUMBER_OF_BASIC_TYPES; c += 1 ) {
    323                         code << setw(3) << costMatrix[r][c] << ", ";
     323                        code << setw(4) << costMatrix[r][c] << ",";
    324324                } // for
    325                 code << endl;
     325                code << " }," << endl;
    326326        } // for
    327327        code << "\t}; // costMatrix" << endl;
     
    335335        code << "\t" << BYMK << endl;
    336336        code << "\tstatic const int signMatrix[BasicType::NUMBER_OF_BASIC_TYPES][BasicType::NUMBER_OF_BASIC_TYPES] = { // number of sign changes in safe conversion" << endl
    337                  << "\t\t/*       ";
     337                 << "\t\t/*         ";
    338338        for ( int r = 0; r < NUMBER_OF_BASIC_TYPES; r += 1 ) { // titles
    339                 code << setw(4) << graph[r].abbrev << ' ';
    340         } // for
    341         code << "*/" << endl;
     339                code << setw(5) << graph[r].abbrev;
     340        } // for
     341        code << " */" << endl;
    342342        for ( int r = 0; r < NUMBER_OF_BASIC_TYPES; r += 1 ) { // costs
    343                 code << "\t\t/*" << setw(6) << graph[r].abbrev << "*/";
     343                code << "\t\t/*" << setw(6) << graph[r].abbrev << "*/ {";
    344344                for ( int c = 0; c < NUMBER_OF_BASIC_TYPES; c += 1 ) {
    345                         code << setw(3) << signMatrix[r][c] << ", ";
     345                        code << setw(4) << signMatrix[r][c] << ",";
    346346                } // for
    347                 code << endl;
     347                code << " }," << endl;
    348348        } // for
    349349        code << "\t}; // signMatrix" << endl;
     
    387387                code << "}," << endl;
    388388        } // for
    389         code << "\t};" << endl;
     389        code << "\t}; // commonTypes" << endl;
    390390        code << "\t#undef BT" << endl;
    391391        code << "\t";                                                                           // indentation for end marker
Note: See TracChangeset for help on using the changeset viewer.