Changeset 68f9c43 for src/main.cc
- Timestamp:
- Mar 16, 2018, 5:15:02 PM (6 years ago)
- Branches:
- new-env, with_gc
- Children:
- 8d7bef2
- Parents:
- 6171841
- git-author:
- Aaron Moss <a3moss@…> (03/16/18 17:04:24)
- git-committer:
- Aaron Moss <a3moss@…> (03/16/18 17:15:02)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/main.cc
r6171841 r68f9c43 37 37 #include "Common/PassVisitor.h" 38 38 #include "Common/CompilerError.h" // for CompilerError 39 #include "Common/GC.h" // for GC 39 40 #include "Common/SemanticError.h" // for SemanticError 40 41 #include "Common/UnimplementedError.h" // for UnimplementedError … … 57 58 #include "SymTab/Validate.h" // for validate 58 59 #include "SynTree/Declaration.h" // for Declaration 60 #include "SynTree/GcTracer.h" // for GC << TranslationUnit 59 61 #include "SynTree/Visitor.h" // for acceptAll 60 62 #include "Tuples/Tuples.h" // for expandMemberTuples, expan... … … 64 66 65 67 #define OPTPRINT(x) if ( errorp ) cerr << x << endl; 66 67 68 68 69 LinkageSpec::Spec linkage = LinkageSpec::Cforall; … … 233 234 delete parseTree; 234 235 parseTree = nullptr; 236 collect( translationUnit ); 235 237 236 238 if ( astp ) { … … 242 244 OPTPRINT( "validate" ) 243 245 SymTab::validate( translationUnit, symtabp ); 244 if ( symtabp ) { 245 deleteAll( translationUnit ); 246 return 0; 247 } // if 246 collect( translationUnit ); 247 if ( symtabp ) return 0; 248 248 249 249 if ( expraltp ) { … … 266 266 OPTPRINT( "expandMemberTuples" ); 267 267 Tuples::expandMemberTuples( translationUnit ); 268 collect( translationUnit ); 268 269 if ( libcfap ) { 269 270 // generate the bodies of cfa library functions … … 273 274 if ( declstatsp ) { 274 275 CodeTools::printDeclStats( translationUnit ); 275 deleteAll( translationUnit );276 276 return 0; 277 277 } … … 286 286 OPTPRINT( "resolve" ) 287 287 ResolvExpr::resolve( translationUnit ); 288 collect( translationUnit ); 288 289 if ( exprp ) { 289 290 dump( translationUnit ); … … 294 295 OPTPRINT( "fixInit" ) 295 296 InitTweak::fix( translationUnit, filename, libcfap || treep ); 297 collect( translationUnit ); 296 298 if ( ctorinitp ) { 297 299 dump ( translationUnit ); … … 313 315 OPTPRINT( "expandTuples" ); // xxx - is this the right place for this? 314 316 Tuples::expandTuples( translationUnit ); 317 collect( translationUnit ); 315 318 if ( tuplep ) { 316 319 dump( translationUnit ); … … 323 326 OPTPRINT("instantiateGenerics") 324 327 GenPoly::instantiateGeneric( translationUnit ); 328 collect( translationUnit ); 325 329 if ( genericsp ) { 326 330 dump( translationUnit ); 327 331 return 0; 328 332 } 333 329 334 OPTPRINT( "convertLvalue" ) 330 335 GenPoly::convertLvalue( translationUnit ); 331 332 336 collect( translationUnit ); 333 337 if ( bboxp ) { 334 338 dump( translationUnit ); 335 339 return 0; 336 340 } // if 341 337 342 OPTPRINT( "box" ) 338 343 GenPoly::box( translationUnit ); 339 344 collect( translationUnit ); 340 345 if ( bcodegenp ) { 341 346 dump( translationUnit ); … … 383 388 } // try 384 389 385 deleteAll( translationUnit );386 390 return 0; 387 391 } // main … … 568 572 printAll( decls, out ); 569 573 } 570 deleteAll( translationUnit );571 574 } // dump 572 575
Note: See TracChangeset
for help on using the changeset viewer.