Changes in src/GenPoly/Box.cc [2d80111:02fdb8e]
- File:
-
- 1 edited
-
src/GenPoly/Box.cc (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/GenPoly/Box.cc
r2d80111 r02fdb8e 657 657 paramExpr = new AddressExpr( paramExpr ); 658 658 } // if 659 arg = appExpr-> args.insert( arg, paramExpr ); // add argument to function call659 arg = appExpr->get_args().insert( arg, paramExpr ); // add argument to function call 660 660 arg++; 661 661 // Build a comma expression to call the function and emulate a normal return. 662 662 CommaExpr *commaExpr = new CommaExpr( appExpr, retExpr ); 663 commaExpr-> env = appExpr->env;664 appExpr-> env = nullptr;663 commaExpr->set_env( appExpr->get_env() ); 664 appExpr->set_env( 0 ); 665 665 return commaExpr; 666 666 } … … 708 708 // if ( ! function->get_returnVals().empty() && isPolyType( function->get_returnVals().front()->get_type(), tyVars ) ) { 709 709 if ( isDynRet( function, tyVars ) ) { 710 ret = addRetParam( appExpr, function-> returnVals.front()->get_type(), arg );710 ret = addRetParam( appExpr, function->get_returnVals().front()->get_type(), arg ); 711 711 } // if 712 712 std::string mangleName = mangleAdapterName( function, tyVars ); … … 715 715 // cast adaptee to void (*)(), since it may have any type inside a polymorphic function 716 716 Type * adapteeType = new PointerType( Type::Qualifiers(), new FunctionType( Type::Qualifiers(), true ) ); 717 appExpr->get_args().push_front( new CastExpr( appExpr-> function, adapteeType ) );717 appExpr->get_args().push_front( new CastExpr( appExpr->get_function(), adapteeType ) ); 718 718 appExpr->set_function( new NameExpr( adapterName ) ); // xxx - result is never set on NameExpr 719 719 … … 725 725 if ( ! needsBoxing( param, arg->result, exprTyVars, env ) ) return; 726 726 727 if ( arg-> get_lvalue() ) {727 if ( arg->result->get_lvalue() ) { 728 728 // argument expression may be CFA lvalue, but not C lvalue -- apply generalizedLvalue transformations. 729 729 // if ( VariableExpr * varExpr = dynamic_cast< VariableExpr * >( arg ) ) {
Note:
See TracChangeset
for help on using the changeset viewer.