Changes in / [7ff3e522:f8d05ee]
- Files:
-
- 1 added
- 1 deleted
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
configure.ac
r7ff3e522 rf8d05ee 24 24 #Trasforming cc1 will break compilation 25 25 M4CFA_PROGRAM_NAME 26 27 #============================================================================== 28 # New AST toggling support 29 AH_TEMPLATE([CFA_USE_NEW_AST],[Sets whether or not to use the new-ast, this is adefault value and can be overrided by --old-ast and --new-ast]) 30 AC_ARG_ENABLE(new-ast, 31 [ --enable-new-ast whether or not to use new ast as the default AST algorithm], 32 [case "${enableval}" in 33 yes) newast=true ;; 34 no) newast=false ;; 35 *) AC_MSG_ERROR([bad value ${enableval} for --enable-new-ast]) ;; 36 esac],[newast=false]) 37 AC_DEFINE_UNQUOTED([CFA_USE_NEW_AST], $newast) 26 38 27 39 #============================================================================== -
src/CompilationState.cc
r7ff3e522 rf8d05ee 14 14 // 15 15 16 #include "config.h" 17 16 18 int 17 19 astp = false, … … 28 30 genproto = false, 29 31 deterministic_output = false, 32 useNewAST = CFA_USE_NEW_AST, 30 33 nomainp = false, 31 34 parsep = false, -
src/CompilationState.h
r7ff3e522 rf8d05ee 29 29 genproto, 30 30 deterministic_output, 31 useNewAST, 31 32 nomainp, 32 33 parsep, -
src/config.h.in
r7ff3e522 rf8d05ee 27 27 /* Location of cfa install. */ 28 28 #undef CFA_PREFIX 29 30 /* Sets whether or not to use the new-ast, this is adefault value and can be 31 overrided by --old-ast and --new-ast */ 32 #undef CFA_USE_NEW_AST 29 33 30 34 /* Major.Minor */ -
src/main.cc
r7ff3e522 rf8d05ee 340 340 } // if 341 341 342 // PASS( "Resolve", ResolvExpr::resolve( translationUnit ) ); 343 { 342 if( useNewAST) { 344 343 auto transUnit = convert( move( translationUnit ) ); 345 344 PASS( "Resolve", ResolvExpr::resolve( transUnit ) ); 346 345 translationUnit = convert( move( transUnit ) ); 346 } else { 347 PASS( "Resolve", ResolvExpr::resolve( translationUnit ) ); 347 348 } 348 349 … … 464 465 { "prototypes", no_argument, nullptr, 'p' }, 465 466 { "deterministic-out", no_argument, nullptr, 'd' }, 467 { "old-ast", no_argument, nullptr, 'O'}, 468 { "new-ast", no_argument, nullptr, 'A'}, 466 469 { "print", required_argument, nullptr, 'P' }, 467 470 { "prelude-dir", required_argument, nullptr, PreludeDir }, … … 485 488 "generate prototypes for prelude functions", // -p 486 489 "don't print output that isn't deterministic", // -d 490 "Use the old-ast", // -O 491 "Use the new-ast", // -A 487 492 "print", // -P 488 493 "<directory> prelude directory for debug/nodebug", // no flag … … 590 595 break; 591 596 case 'd': // don't print non-deterministic output 592 deterministic_output = true; 597 deterministic_output = true; 598 break; 599 case 'O': // don't print non-deterministic output 600 useNewAST = false; 601 break; 602 case 'A': // don't print non-deterministic output 603 useNewAST = true; 593 604 break; 594 605 case 'P': // print options
Note: See TracChangeset
for help on using the changeset viewer.