Commit f43aa0bc authored by danno's avatar danno Committed by Commit bot

[turbofan] Correctly call ArrayNoArgumentConstructor stub from TF code

BUG=chromium:612412
LOG=N

Review-Url: https://codereview.chromium.org/1999783004
Cr-Commit-Position: refs/heads/master@{#36448}
parent 26569a47
...@@ -441,7 +441,8 @@ void JSGenericLowering::LowerJSCreateArray(Node* node) { ...@@ -441,7 +441,8 @@ void JSGenericLowering::LowerJSCreateArray(Node* node) {
CallDescriptor::kNeedsFrameState); CallDescriptor::kNeedsFrameState);
node->ReplaceInput(0, jsgraph()->HeapConstant(stub.GetCode())); node->ReplaceInput(0, jsgraph()->HeapConstant(stub.GetCode()));
node->InsertInput(graph()->zone(), 2, jsgraph()->HeapConstant(site)); node->InsertInput(graph()->zone(), 2, jsgraph()->HeapConstant(site));
node->InsertInput(graph()->zone(), 3, jsgraph()->UndefinedConstant()); node->InsertInput(graph()->zone(), 3, jsgraph()->Int32Constant(0));
node->InsertInput(graph()->zone(), 4, jsgraph()->UndefinedConstant());
NodeProperties::ChangeOp(node, common()->Call(desc)); NodeProperties::ChangeOp(node, common()->Call(desc));
} else if (arity == 1) { } else if (arity == 1) {
// TODO(bmeurer): Optimize for the 0 length non-holey case? // TODO(bmeurer): Optimize for the 0 length non-holey case?
......
// Copyright 2015 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 counter() { return {x: 0} || this }
var f = (function() {
"use asm";
return function g(c1, c2) {
for (var x = 0 ; x < 10; ++x) {
if (x == 5) %OptimizeOsr();
c1();
}
}
})();
g = (function() { f((Array), counter()); });
g();
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