- Timestamp:
- Apr 16, 2020, 1:25:53 PM (4 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- b5276fc
- Parents:
- 41af19c
- Location:
- src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
src/CompilationState.cc
r41af19c r7215000 27 27 nopreludep = false, 28 28 genproto = false, 29 deterministic_output = false, 29 30 nomainp = false, 30 31 parsep = false, -
src/CompilationState.h
r41af19c r7215000 28 28 nopreludep, 29 29 genproto, 30 deterministic_output, 30 31 nomainp, 31 32 parsep, -
src/ResolvExpr/TypeEnvironment.cc
r41af19c r7215000 20 20 #include <utility> // for pair, move 21 21 22 #include "CompilationState.h" // for deterministic_output 22 23 #include "Common/utility.h" // for maybeClone 23 24 #include "SynTree/Type.h" // for Type, FunctionType, Type::Fora... … … 106 107 107 108 void EqvClass::print( std::ostream &os, Indenter indent ) const { 108 os << "( "; 109 std::copy( vars.begin(), vars.end(), std::ostream_iterator< std::string >( os, " " ) ); 110 os << ")"; 109 if( !deterministic_output ) { 110 os << "( "; 111 std::copy( vars.begin(), vars.end(), std::ostream_iterator< std::string >( os, " " ) ); 112 os << ")"; 113 } 111 114 if ( type ) { 112 115 os << " -> "; … … 235 238 // check safely bindable 236 239 if ( r.type && occursIn( r.type, s.vars.begin(), s.vars.end(), *this ) ) return false; 237 240 238 241 // merge classes in 239 242 r.vars.insert( s.vars.begin(), s.vars.end() ); -
src/main.cc
r41af19c r7215000 443 443 444 444 445 static const char optstring[] = ":c:ghlLmNnp P:S:twW:D:";445 static const char optstring[] = ":c:ghlLmNnpdP:S:twW:D:"; 446 446 447 447 enum { PreludeDir = 128 }; … … 456 456 { "no-prelude", no_argument, nullptr, 'n' }, 457 457 { "prototypes", no_argument, nullptr, 'p' }, 458 { "deterministic-out", no_argument, nullptr, 'd' }, 458 459 { "print", required_argument, nullptr, 'P' }, 459 460 { "prelude-dir", required_argument, nullptr, PreludeDir }, … … 476 477 "do not read prelude", // -n 477 478 "generate prototypes for prelude functions", // -p 479 "don't print output that isn't deterministic", // -d 478 480 "print", // -P 479 481 "<directory> prelude directory for debug/nodebug", // no flag … … 580 582 genproto = true; 581 583 break; 584 case 'd': // don't print non-deterministic output 585 deterministic_output = true; 586 break; 582 587 case 'P': // print options 583 588 for ( int i = 0;; i += 1 ) {
Note: See TracChangeset
for help on using the changeset viewer.