| Index: runtime/vm/compiler.cc
|
| ===================================================================
|
| --- runtime/vm/compiler.cc (revision 43075)
|
| +++ runtime/vm/compiler.cc (working copy)
|
| @@ -942,15 +942,17 @@
|
| const Function& function,
|
| bool optimized,
|
| intptr_t osr_id) {
|
| - Isolate* isolate = Isolate::Current();
|
| - StackZone zone(isolate);
|
| + Thread* thread = Thread::Current();
|
| + Isolate* isolate = thread->isolate();
|
| + StackZone stack_zone(isolate);
|
| + Zone* zone = stack_zone.GetZone();
|
| LongJumpScope jump;
|
| if (setjmp(*jump.Set()) == 0) {
|
| TIMERSCOPE(isolate, time_compilation);
|
| Timer per_compile_timer(FLAG_trace_compiler, "Compilation time");
|
| per_compile_timer.Start();
|
| - ParsedFunction* parsed_function = new(isolate) ParsedFunction(
|
| - isolate, Function::ZoneHandle(isolate, function.raw()));
|
| + ParsedFunction* parsed_function = new(zone) ParsedFunction(
|
| + thread, Function::ZoneHandle(zone, function.raw()));
|
| if (FLAG_trace_compiler) {
|
| OS::Print("Compiling %s%sfunction: '%s' @ token %" Pd ", size %" Pd "\n",
|
| (osr_id == Isolate::kNoDeoptId ? "" : "osr "),
|
| @@ -1147,7 +1149,8 @@
|
|
|
|
|
| RawObject* Compiler::ExecuteOnce(SequenceNode* fragment) {
|
| - Isolate* isolate = Isolate::Current();
|
| + Thread* thread = Thread::Current();
|
| + Isolate* isolate = thread->isolate();
|
| LongJumpScope jump;
|
| if (setjmp(*jump.Set()) == 0) {
|
| if (FLAG_trace_compiler) {
|
| @@ -1180,7 +1183,7 @@
|
| // We compile the function here, even though InvokeFunction() below
|
| // would compile func automatically. We are checking fewer invariants
|
| // here.
|
| - ParsedFunction* parsed_function = new ParsedFunction(isolate, func);
|
| + ParsedFunction* parsed_function = new ParsedFunction(thread, func);
|
| parsed_function->SetNodeSequence(fragment);
|
| parsed_function->set_default_parameter_values(Object::null_array());
|
| fragment->scope()->AddVariable(parsed_function->EnsureExpressionTemp());
|
|
|