Changeset d63eeb0 for src/main.cc
- Timestamp:
- Feb 9, 2016, 3:25:05 PM (9 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, ctor, deferred_resn, demangler, enum, forall-pointer-decay, gc_noraii, jacob/cs343-translation, jenkins-sandbox, master, memory, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
- Children:
- 7528ba1
- Parents:
- 771b3c3 (diff), bd85400 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/main.cc
r771b3c3 rd63eeb0 10 10 // Created On : Fri May 15 23:12:02 2015 11 11 // Last Modified By : Rob Schluntz 12 // Last Modified On : Tue Jan 19 16:28:13201613 // Update Count : 19412 // Last Modified On : Tue Feb 09 13:28:11 2016 13 // Update Count : 200 14 14 // 15 15 … … 24 24 #include "SynTree/Declaration.h" 25 25 #include "SynTree/Visitor.h" 26 #include "GenPoly/InstantiateGeneric.h"27 26 #include "GenPoly/Lvalue.h" 28 27 #include "GenPoly/Specialize.h" … … 46 45 //#include "Try/Visit.h" 47 46 48 #include " SemanticError.h"49 #include " UnimplementedError.h"47 #include "Common/SemanticError.h" 48 #include "Common/UnimplementedError.h" 50 49 51 50 #include "../config.h" … … 72 71 resolvep = false, // used in AlternativeFinder 73 72 symtabp = false, 73 treep = false, 74 74 validp = false, 75 75 errorp = false, 76 76 codegenp = false; 77 77 78 enum { Ast, Bresolver, CtorInitFix, Expr, ExprAlt, Grammar, LibCFA, Nopreamble, Parse, Prototypes, Resolver, Symbol, Validate, };78 enum { Ast, Bresolver, CtorInitFix, Expr, ExprAlt, Grammar, LibCFA, Nopreamble, Parse, Prototypes, Resolver, Symbol, Tree, Validate, }; 79 79 80 80 static struct option long_opts[] = { … … 91 91 { "resolver", no_argument, 0, Resolver }, 92 92 { "symbol", no_argument, 0, Symbol }, 93 { "tree", no_argument, 0, Tree }, 93 94 { "validate", no_argument, 0, Validate }, 94 95 { 0, 0, 0, 0 } … … 104 105 105 106 int c; 106 while ( (c = getopt_long( argc, argv, "abcefFglnpqrs vyzD:", long_opts, &long_index )) != -1 ) {107 while ( (c = getopt_long( argc, argv, "abcefFglnpqrstvyzD:", long_opts, &long_index )) != -1 ) { 107 108 switch ( c ) { 108 109 case Ast: … … 153 154 case 's': // print symbol table events 154 155 symtabp = true; 156 break; 157 case Tree: 158 case 't': // build in tree 159 treep = true; 155 160 break; 156 161 case 'v': // dump AST after decl validation pass … … 195 200 if ( ! nopreludep ) { // include gcc builtins 196 201 // -l is for initial build ONLY and builtins.cf is not in the lib directory so access it here. 197 FILE * builtins = fopen( libcfap ? "./builtins.cf" : CFA_LIBDIR "/builtins.cf", "r" );202 FILE * builtins = fopen( libcfap | treep ? "builtins.cf" : CFA_LIBDIR "/builtins.cf", "r" ); 198 203 if ( builtins == NULL ) { 199 std::cerr << "Error: can't open builtins " << std::endl;204 std::cerr << "Error: can't open builtins.cf" << std::endl; 200 205 exit( 1 ); 201 206 } // if … … 205 210 if ( ! libcfap ) { 206 211 // read the prelude in, if not generating the cfa library 207 FILE * prelude = fopen( CFA_LIBDIR "/prelude.cf", "r" );212 FILE * prelude = fopen( treep ? "prelude.cf" : CFA_LIBDIR "/prelude.cf", "r" ); 208 213 if ( prelude == NULL ) { 209 std::cerr << "Error: can't open prelude " << std::endl;214 std::cerr << "Error: can't open prelude.cf" << std::endl; 210 215 exit( 1 ); 211 216 } // if … … 281 286 } 282 287 283 OPTPRINT( "instantiateGeneric" )284 GenPoly::instantiateGeneric( translationUnit );285 288 OPTPRINT( "copyParams" ); 286 289 GenPoly::copyParams( translationUnit );
Note: See TracChangeset
for help on using the changeset viewer.