Changes in src/GenPoly/Box.cc [ba3706f:1a4bef3]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/GenPoly/Box.cc
rba3706f r1a4bef3 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.