Commit 5110b400 authored by michael_dawson's avatar michael_dawson Committed by Commit bot

PPC: Make --always-opt also optimize top-level code.

Port 2d281e71

Original commit message:
This enables eager optimization of top-level code with TurboFan and
extends test coverage by triggering it with the --always-opt flag.
Script contexts are now also properly allocated in TurboFan.

R=titzer@chromium.org, mstarzinger@chromium.org,mbrandy@us.ibm.com
BUG=

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

Cr-Commit-Position: refs/heads/master@{#27726}
parent 9fc9d8bd
...@@ -182,6 +182,7 @@ bool LCodeGen::GeneratePrologue() { ...@@ -182,6 +182,7 @@ bool LCodeGen::GeneratePrologue() {
Comment(";;; Allocate local context"); Comment(";;; Allocate local context");
bool need_write_barrier = true; bool need_write_barrier = true;
// Argument to NewContext is the function, which is in r4. // Argument to NewContext is the function, which is in r4.
DCHECK(!info()->scope()->is_script_scope());
if (heap_slots <= FastNewContextStub::kMaximumSlots) { if (heap_slots <= FastNewContextStub::kMaximumSlots) {
FastNewContextStub stub(isolate(), heap_slots); FastNewContextStub stub(isolate(), heap_slots);
__ CallStub(&stub); __ CallStub(&stub);
......
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