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

Unified Diff: runtime/vm/compiler.cc

Issue 11364166: Make sure that ParsedFunction holds onto zone handles. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 1 month 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/code_descriptors_test.cc ('k') | runtime/vm/parser.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/compiler.cc
===================================================================
--- runtime/vm/compiler.cc (revision 14716)
+++ runtime/vm/compiler.cc (working copy)
@@ -435,7 +435,8 @@
TIMERSCOPE(time_compilation);
Timer per_compile_timer(FLAG_trace_compiler, "Compilation time");
per_compile_timer.Start();
- ParsedFunction* parsed_function = new ParsedFunction(function);
+ ParsedFunction* parsed_function = new ParsedFunction(
+ Function::ZoneHandle(function.raw()));
if (FLAG_trace_compiler) {
OS::Print("Compiling %sfunction: '%s' @ token %"Pd"\n",
(optimized ? "optimized " : ""),
@@ -561,7 +562,7 @@
// The function needs to be associated with a named Class: the interface
// Function fits the bill.
const char* kEvalConst = "eval_const";
- const Function& func = Function::Handle(Function::New(
+ const Function& func = Function::ZoneHandle(Function::New(
String::Handle(Symbols::New(kEvalConst)),
RawFunction::kConstImplicitGetter,
true, // static function.
@@ -582,7 +583,7 @@
// here.
ParsedFunction* parsed_function = new ParsedFunction(func);
parsed_function->SetNodeSequence(fragment);
- parsed_function->set_default_parameter_values(Array::Handle());
+ parsed_function->set_default_parameter_values(Array::ZoneHandle());
parsed_function->set_expression_temp_var(
ParsedFunction::CreateExpressionTempVar(0));
fragment->scope()->AddVariable(parsed_function->expression_temp_var());
« no previous file with comments | « runtime/vm/code_descriptors_test.cc ('k') | runtime/vm/parser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698