Changeset d9fa60a for src/SymTab
- Timestamp:
- Nov 16, 2016, 4:37:50 PM (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:
- 186fd86
- Parents:
- 33a7b6d
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/SymTab/Autogen.cc
r33a7b6d rd9fa60a 175 175 176 176 void makeStructMemberOp( ObjectDecl * dstParam, Expression * src, DeclarationWithType * field, FunctionDecl * func, TypeSubstitution & genericSubs, bool isDynamicLayout, bool forward = true ) { 177 // if ( isDynamicLayout && src ) {178 // genericSubs.apply( src );179 // }180 181 177 ObjectDecl * returnVal = NULL; 182 178 if ( ! func->get_functionType()->get_returnVals().empty() ) { … … 187 183 188 184 // assign to destination (and return value if generic) 189 UntypedExpr *derefExpr = new UntypedExpr( new NameExpr( "*?" ) ); 190 derefExpr->get_args().push_back( new VariableExpr( dstParam ) ); 185 UntypedExpr *derefExpr = UntypedExpr::createDeref( new VariableExpr( dstParam ) ); 191 186 Expression *dstselect = new MemberExpr( field, derefExpr ); 192 187 genImplicitCall( srcParam, dstselect, func->get_name(), back_inserter( func->get_statements()->get_kids() ), field, forward ); 193 188 194 189 if ( isDynamicLayout && returnVal ) { 195 UntypedExpr *derefRet = new UntypedExpr( new NameExpr( "*?" ) ); 196 derefRet->get_args().push_back( new VariableExpr( returnVal ) ); 197 Expression *retselect = new MemberExpr( field, derefRet ); 190 // xxx - there used to be a dereference on returnVal, but this seems to have been wrong? 191 Expression *retselect = new MemberExpr( field, new VariableExpr( returnVal ) ); 198 192 genImplicitCall( srcParam, retselect, func->get_name(), back_inserter( func->get_statements()->get_kids() ), field, forward ); 199 193 } // if
Note: See TracChangeset
for help on using the changeset viewer.