Commit 6d90507a authored by rmcilroy's avatar rmcilroy Committed by Commit bot

[Turbofan] Disable JSFrameSpecialization for interpreted frames.

JSFrameSpecialization depends on the layout of the frame and doesn't work
with interpreted frames. Disable it since it is only used for OSR from asmjs code, which shouldn't go through the bytecode graph builder in many cases.

BUG=669517

Review-Url: https://codereview.chromium.org/2538823002
Cr-Commit-Position: refs/heads/master@{#41387}
parent a1473f53
......@@ -27,6 +27,9 @@ Reduction JSFrameSpecialization::Reduce(Node* node) {
}
Reduction JSFrameSpecialization::ReduceOsrValue(Node* node) {
// JSFrameSpecialization should never run on interpreted frames, since the
// code below assumes standard stack frame layouts.
DCHECK(!frame()->is_interpreted());
DCHECK_EQ(IrOpcode::kOsrValue, node->opcode());
Handle<Object> value;
int index = OsrValueIndexOf(node->op());
......
......@@ -550,7 +550,9 @@ class PipelineCompilationJob final : public CompilationJob {
PipelineCompilationJob::Status PipelineCompilationJob::PrepareJobImpl() {
if (info()->shared_info()->asm_function()) {
if (info()->osr_frame()) info()->MarkAsFrameSpecializing();
if (info()->osr_frame() && !info()->is_optimizing_from_bytecode()) {
info()->MarkAsFrameSpecializing();
}
info()->MarkAsFunctionContextSpecializing();
} else {
if (!FLAG_always_opt) {
......
// Copyright 2016 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --allow-natives-syntax
(function() {
"use asm";
return function() {
for (var i = 0; i < 10; i++) {
if (i == 5) {
%OptimizeOsr();
}
}
with (Object());
}
})()();
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