Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(241)

Unified Diff: runtime/vm/unit_test.cc

Issue 11228022: Cache parsed functions when inlining. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: virtual Created 8 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/scopes.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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());
}
« no previous file with comments | « runtime/vm/scopes.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698