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}
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);