Commit 4dbfde37 authored by balazs.kilvady's avatar balazs.kilvady Committed by Commit bot

MIPS: Parsing: Make Scope not know about Isolate.

Port 5d68529b

Original commit message:
Scope, like Parser, must be able to operate independent of Isolate and the V8
heap (for background parsing). After the heap-independent phase, there is a heap
dependent phase, during which we do operations such as scope anaylysis.

This CL makes the phases explicit by not telling Scope about the Isolate too
early (during the heap-independent phase, Scope should know nothing about
Isolate). This decreases the probability of accidental code changes which would
add heap-dependent operations into the heap-independent phase.

BUG=

Review URL: https://codereview.chromium.org/911073004

Cr-Commit-Position: refs/heads/master@{#26553}
parent 59c55842
......@@ -206,7 +206,7 @@ void FullCodeGenerator::Generate() {
bool need_write_barrier = true;
if (FLAG_harmony_scoping && info->scope()->is_script_scope()) {
__ push(a1);
__ Push(info->scope()->GetScopeInfo());
__ Push(info->scope()->GetScopeInfo(info->isolate()));
__ CallRuntime(Runtime::kNewScriptContext, 2);
} else if (heap_slots <= FastNewContextStub::kMaximumSlots) {
FastNewContextStub stub(isolate(), heap_slots);
......
......@@ -203,7 +203,7 @@ void FullCodeGenerator::Generate() {
bool need_write_barrier = true;
if (FLAG_harmony_scoping && info->scope()->is_script_scope()) {
__ push(a1);
__ Push(info->scope()->GetScopeInfo());
__ Push(info->scope()->GetScopeInfo(info->isolate()));
__ CallRuntime(Runtime::kNewScriptContext, 2);
} else if (heap_slots <= FastNewContextStub::kMaximumSlots) {
FastNewContextStub stub(isolate(), heap_slots);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment