Index: runtime/vm/unit_test.cc |
diff --git a/runtime/vm/unit_test.cc b/runtime/vm/unit_test.cc |
index e1105a5de56c54f4efee46cea5b4b4501c290aa6..4f10eae995eb949f293b9349ce58eaf795a093ab 100644 |
--- a/runtime/vm/unit_test.cc |
+++ b/runtime/vm/unit_test.cc |
@@ -177,16 +177,16 @@ CodeGenTest::CodeGenTest(const char* name) |
void CodeGenTest::Compile() { |
- ParsedFunction parsed_function(function_); |
- parsed_function.SetNodeSequence(node_sequence_); |
- parsed_function.set_instantiator(NULL); |
- parsed_function.set_default_parameter_values(default_parameter_values_); |
- parsed_function.set_expression_temp_var( |
+ ParsedFunction* parsed_function = new ParsedFunction(function_); |
+ parsed_function->SetNodeSequence(node_sequence_); |
+ parsed_function->set_instantiator(NULL); |
+ parsed_function->set_default_parameter_values(default_parameter_values_); |
+ parsed_function->set_expression_temp_var( |
ParsedFunction::CreateExpressionTempVar(0)); |
- node_sequence_->scope()->AddVariable(parsed_function.expression_temp_var()); |
- parsed_function.AllocateVariables(); |
+ node_sequence_->scope()->AddVariable(parsed_function->expression_temp_var()); |
+ parsed_function->AllocateVariables(); |
const Error& error = |
- Error::Handle(Compiler::CompileParsedFunction(parsed_function)); |
+ Error::Handle(Compiler::CompileParsedFunction(*parsed_function)); |
EXPECT(error.IsNull()); |
} |