Changeset b6838214 for src/GenPoly/Box.cc
- Timestamp:
- Jan 23, 2018, 5:46:43 PM (6 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:
- 258e6ad5
- Parents:
- b158d8f (diff), 15d248e (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/GenPoly/Box.cc
rb158d8f rb6838214 302 302 Expression *makeOp( const std::string &name, Expression *arg ) { 303 303 UntypedExpr *expr = new UntypedExpr( new NameExpr( name ) ); 304 expr-> get_args().push_back( arg );304 expr->args.push_back( arg ); 305 305 return expr; 306 306 } … … 309 309 Expression *makeOp( const std::string &name, Expression *lhs, Expression *rhs ) { 310 310 UntypedExpr *expr = new UntypedExpr( new NameExpr( name ) ); 311 expr-> get_args().push_back( lhs );312 expr-> get_args().push_back( rhs );311 expr->args.push_back( lhs ); 312 expr->args.push_back( rhs ); 313 313 return expr; 314 314 } … … 316 316 /// Returns the dereference of a local pointer variable 317 317 Expression *derefVar( ObjectDecl *var ) { 318 return makeOp( "*?",new VariableExpr( var ) );318 return UntypedExpr::createDeref( new VariableExpr( var ) ); 319 319 } 320 320 … … 831 831 if ( ! isPolyType( arg->get_type() ) ) { 832 832 UntypedExpr *deref = new UntypedExpr( new NameExpr( "*?" ) ); 833 deref->get_args().push_back( new CastExpr( new VariableExpr( param ), new PointerType( Type::Qualifiers(), arg->get_type()->clone() ) ) ); 834 deref->set_result( arg->get_type()->clone() ); 833 deref->args.push_back( new CastExpr( new VariableExpr( param ), new PointerType( Type::Qualifiers(), arg->get_type()->clone() ) ) ); 834 deref->result = arg->get_type()->clone(); 835 deref->result->set_lvalue( true ); 835 836 return deref; 836 837 } // if
Note: See TracChangeset
for help on using the changeset viewer.