Changeset 7416d46a for src/GenPoly/Box.cc
- Timestamp:
- Jan 30, 2018, 3:54:32 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:
- 633a642
- Parents:
- f792cb8 (diff), 42be3c3 (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
rf792cb8 r7416d46a 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.