Commit 75ad4cc2 authored by cdai2's avatar cdai2

X87: Parsing: Make Scope not know about Isolate.

port 5d68529b (r26546)

original commit message:

   Parsing: Make Scope not know about Isolate.

  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=
R=weiliang.lin@intel.com

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

Cr-Commit-Position: refs/heads/master@{#26590}
parent 02fc74ea
......@@ -190,7 +190,7 @@ void FullCodeGenerator::Generate() {
// Argument to NewContext is the function, which is still in edi.
if (FLAG_harmony_scoping && info->scope()->is_script_scope()) {
__ push(edi);
__ 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