- Timestamp:
- Mar 10, 2017, 11:00:13 AM (8 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
- Children:
- c857ad3
- Parents:
- 0e7ea335
- Location:
- src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Parser/parser.yy
r0e7ea335 r861799c 410 410 { $$ = new ExpressionNode( build_fieldSel( $1, build_field_name_REALFRACTIONconstant( *$2 ) ) ); } 411 411 | postfix_expression ARROW no_attr_identifier 412 { $$ = new ExpressionNode( build_pfieldSel( $1, build_varref( $3 ) ) ); } 412 { 413 $$ = new ExpressionNode( build_pfieldSel( $1, *$3 == "0" || *$3 == "1" ? build_constantInteger( *$3 ) : build_varref( $3 ) ) ); 414 } 413 415 | postfix_expression ARROW '[' push field_list pop ']' // CFA, tuple field selector 414 416 { $$ = new ExpressionNode( build_pfieldSel( $1, build_tuple( $5 ) ) ); } 417 | postfix_expression ARROW INTEGERconstant // CFA, tuple index 418 { $$ = new ExpressionNode( build_pfieldSel( $1, build_constantInteger( *$3 ) ) ); } 415 419 | postfix_expression ICR 416 420 { $$ = new ExpressionNode( build_unary_ptr( OperKinds::IncrPost, $1 ) ); } -
src/SymTab/Autogen.cc
r0e7ea335 r861799c 151 151 bool hasDynamicLayout( AggrDecl * aggregateDecl ) { 152 152 for ( TypeDecl * param : aggregateDecl->get_parameters() ) { 153 if ( param-> get_kind() == TypeDecl::Any) return true;153 if ( param->isComplete() ) return true; 154 154 } 155 155 return false; -
src/SymTab/Validate.cc
r0e7ea335 r861799c 224 224 HoistStruct::hoistStruct( translationUnit ); 225 225 ReturnTypeFixer::fix( translationUnit ); // must happen before autogen 226 acceptAll( translationUnit, lrt ); // must happen before autogen, because sized flag needs to propagate to generated functions 226 227 autogenerateRoutines( translationUnit ); // moved up, used to be below compoundLiteral - currently needs EnumAndPointerDecayPass 227 228 acceptAll( translationUnit, epc ); 228 acceptAll( translationUnit, lrt );229 229 ReturnChecker::checkFunctionReturns( translationUnit ); 230 230 compoundliteral.mutateDeclarationList( translationUnit ); … … 838 838 assertf( retVals.size() == 0 || retVals.size() == 1, "Function %s has too many return values: %d", functionDecl->get_name().c_str(), retVals.size() ); 839 839 if ( retVals.size() == 1 ) { 840 // ensure all function return values have a name - use the name of the function to disambiguate (this also provides a nice bit of help for debugging) 841 // ensure other return values have a name 840 // ensure all function return values have a name - use the name of the function to disambiguate (this also provides a nice bit of help for debugging). 841 // ensure other return values have a name. 842 842 DeclarationWithType * ret = retVals.front(); 843 843 if ( ret->get_name() == "" ) { -
src/SynTree/TypeDecl.cc
r0e7ea335 r861799c 25 25 26 26 std::string TypeDecl::typeString() const { 27 static const char *kindNames[] = { "type", "incomplete type", "function type", "tuple type" };28 return kindNames[ kind ];27 static const std::string kindNames[] = { "type", "incomplete type", "function type", "tuple type" }; 28 return (kind != Any && isComplete() ? "sized " : "") + kindNames[ kind ]; 29 29 } 30 30
Note: See TracChangeset
for help on using the changeset viewer.