Changes in / [f3152ab:779a4a3]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/main.cc
rf3152ab r779a4a3 63 63 using namespace std; 64 64 65 #define PASS(name, pass) \ 66 if ( errorp ) { cerr << #name << endl; } \ 67 HeapStats::newPass(#name); \ 68 pass; 65 #define OPTPRINT(x) if ( errorp ) cerr << x << endl; 66 69 67 70 68 LinkageSpec::Spec linkage = LinkageSpec::Cforall; … … 247 245 248 246 // add the assignment statement after the initialization of a type parameter 249 PASS( "validate", SymTab::validate( translationUnit, symtabp ) ); 247 OPTPRINT( "validate" ) 248 SymTab::validate( translationUnit, symtabp ); 250 249 if ( symtabp ) { 251 250 deleteAll( translationUnit ); … … 264 263 } // if 265 264 266 PASS( "mutate", ControlStruct::mutate( translationUnit ) ); 267 PASS( "fixNames", CodeGen::fixNames( translationUnit ) ); 268 PASS( "genInit", InitTweak::genInit( translationUnit ) ); 269 PASS( "expandMemberTuples" , Tuples::expandMemberTuples( translationUnit ) ); 265 OPTPRINT( "mutate" ) 266 ControlStruct::mutate( translationUnit ); 267 OPTPRINT( "fixNames" ) 268 CodeGen::fixNames( translationUnit ); 269 OPTPRINT( "genInit" ) 270 InitTweak::genInit( translationUnit ); 271 OPTPRINT( "expandMemberTuples" ); 272 Tuples::expandMemberTuples( translationUnit ); 270 273 if ( libcfap ) { 271 274 // generate the bodies of cfa library functions … … 286 289 CodeTools::fillLocations( translationUnit ); 287 290 288 PASS( "resolve", ResolvExpr::resolve( translationUnit ) ); 291 OPTPRINT( "resolve" ) 292 ResolvExpr::resolve( translationUnit ); 289 293 if ( exprp ) { 290 294 dump( translationUnit ); … … 293 297 294 298 // fix ObjectDecl - replaces ConstructorInit nodes 295 PASS( "fixInit", InitTweak::fix( translationUnit, filename, libcfap || treep ) ); 299 OPTPRINT( "fixInit" ) 300 InitTweak::fix( translationUnit, filename, libcfap || treep ); 296 301 if ( ctorinitp ) { 297 302 dump ( translationUnit ); … … 299 304 } // if 300 305 301 PASS( "expandUniqueExpr", Tuples::expandUniqueExpr( translationUnit ) ); // xxx - is this the right place for this? want to expand ASAP so tha,sequent passes don't need to worry about double-visiting a unique expr - needs to go after InitTweak::fix so that copy constructed return declarations are reused306 OPTPRINT( "expandUniqueExpr" ); // xxx - is this the right place for this? want to expand ASAP so that subsequent passes don't need to worry about double-visiting a unique expr - needs to go after InitTweak::fix so that copy constructed return declarations are reused 302 307 Tuples::expandUniqueExpr( translationUnit ); 303 308 304 PASS( "translateEHM" , ControlStruct::translateEHM( translationUnit ) ); 305 306 PASS( "generateWaitfor" , Concurrency::generateWaitFor( translationUnit ) ); 307 308 PASS( "convertSpecializations", GenPoly::convertSpecializations( translationUnit ) ); // needs to happen before tuple types are expanded 309 310 PASS( "expandTuples", Tuples::expandTuples( translationUnit ) ); // xxx - is this the right place for this? 311 309 OPTPRINT( "translateEHM" ); 310 ControlStruct::translateEHM( translationUnit ); 311 312 OPTPRINT( "generateWaitfor" ); 313 Concurrency::generateWaitFor( translationUnit ); 314 315 OPTPRINT( "convertSpecializations" ) // needs to happen before tuple types are expanded 316 GenPoly::convertSpecializations( translationUnit ); 317 318 OPTPRINT( "expandTuples" ); // xxx - is this the right place for this? 319 Tuples::expandTuples( translationUnit ); 312 320 if ( tuplep ) { 313 321 dump( translationUnit ); … … 315 323 } 316 324 317 PASS( "virtual expandCasts", Virtual::expandCasts( translationUnit ) ); // Must come after translateEHM 318 319 PASS( "instantiateGenerics", GenPoly::instantiateGeneric( translationUnit ) ); 325 OPTPRINT( "virtual expandCasts" ) // Must come after translateEHM 326 Virtual::expandCasts( translationUnit ); 327 328 OPTPRINT("instantiateGenerics") 329 GenPoly::instantiateGeneric( translationUnit ); 320 330 if ( genericsp ) { 321 331 dump( translationUnit ); 322 332 return 0; 323 333 } 324 PASS( "convertLvalue", GenPoly::convertLvalue( translationUnit ) ); 334 OPTPRINT( "convertLvalue" ) 335 GenPoly::convertLvalue( translationUnit ); 325 336 326 337 … … 329 340 return 0; 330 341 } // if 331 PASS( "box", GenPoly::box( translationUnit ) ); 342 OPTPRINT( "box" ) 343 GenPoly::box( translationUnit ); 332 344 333 345 if ( bcodegenp ) { … … 341 353 342 354 CodeTools::fillLocations( translationUnit ); 343 PASS( "codegen", CodeGen::generate( translationUnit, *output, ! noprotop, prettycodegenp, true, linemarks ) ); 355 OPTPRINT( "codegen" ) 356 CodeGen::generate( translationUnit, *output, ! noprotop, prettycodegenp, true, linemarks ); 344 357 345 358 CodeGen::FixMain::fix( *output, treep ? "../prelude/bootloader.c" : CFA_LIBDIR "/bootloader.c" ); 359 OPTPRINT( "end" ) 360 361 346 362 if ( output != &cout ) { 347 363 delete output;
Note: See TracChangeset
for help on using the changeset viewer.