v8/test/mjsunit/compiler/regress-4413-1.js
bmeurer 9c8262f11e [builtins] Make sure argument count is always valid for C++ builtins.
When calling into C++ builtins, we need to make sure that the argument
count register contains the correct number of arguments, otherwise the
CEntryStub will not be able to leave the stack in the correct state.

R=ishell@chromium.org
BUG=v8:4413
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#31120}
2015-10-06 08:23:51 +00:00

16 lines
391 B
JavaScript

// 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 --turbo-asm
var foo = (function(stdlib) {
"use asm";
var bar = stdlib.Symbol;
function foo() { return bar("lala"); }
return foo;
})(this);
%OptimizeFunctionOnNextCall(foo);
foo();