PPC: Make --always-opt also optimize top-level code.
authormichael_dawson <michael_dawson@ca.ibm.com>
Thu, 9 Apr 2015 22:14:23 +0000 (15:14 -0700)
committerCommit bot <commit-bot@chromium.org>
Thu, 9 Apr 2015 22:14:33 +0000 (22:14 +0000)
Port 2d281e71ac49058ef5696f4255ff1fa30796bc5e

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}

src/ppc/lithium-codegen-ppc.cc

index da3a84b..c05a677 100644 (file)
@@ -182,6 +182,7 @@ bool LCodeGen::GeneratePrologue() {
     Comment(";;; Allocate local context");
     bool need_write_barrier = true;
     // Argument to NewContext is the function, which is in r4.
+    DCHECK(!info()->scope()->is_script_scope());
     if (heap_slots <= FastNewContextStub::kMaximumSlots) {
       FastNewContextStub stub(isolate(), heap_slots);
       __ CallStub(&stub);