Changeset b3ab8f0 for src/GenPoly
- Timestamp:
- Apr 6, 2016, 5:03:29 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, string, with_gc
- Children:
- bc1ab61
- Parents:
- 2a76297
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/GenPoly/Box.cc
r2a76297 rb3ab8f0 904 904 return; 905 905 } else if ( arg->get_results().front()->get_isLvalue() ) { 906 // VariableExpr and MemberExpr are lvalues 907 arg = new AddressExpr( arg ); 906 // VariableExpr and MemberExpr are lvalues; need to check this isn't coming from the second arg of a comma expression though (not an lvalue) 907 if ( CommaExpr *commaArg = dynamic_cast< CommaExpr* >( arg ) ) { 908 // hoist first half of expression and return second 909 stmtsToAdd.push_back( new ExprStmt( noLabels, commaArg->get_arg1() ) ); 910 arg = new AddressExpr( commaArg->get_arg2() ); 911 912 commaArg->set_arg1( 0 ); 913 commaArg->set_arg2( 0 ); 914 delete commaArg; 915 } else { 916 arg = new AddressExpr( arg ); 917 } 908 918 } else { 909 919 // use type computed in unification to declare boxed variables … … 1000 1010 } // for 1001 1011 } 1002 1003 1004 1012 1005 1013 FunctionDecl *Pass1::makeAdapter( FunctionType *adaptee, FunctionType *realType, const std::string &mangleName, const TyVarMap &tyVars ) {
Note: See TracChangeset
for help on using the changeset viewer.