v8/test/mjsunit/es6/regress/regress-5598.js
caitp cbadac5528 [builtins] fix Allocate() call in ReduceStringIterator()
Use a NumberConstant op rather than an Int32Constant to make assertions in
v8::internal::compiler::EscapeAnalysis::ProcessAllocation() happy.

BUG=v8:5598
R=bmeurer@chromium.org, franzih@chromium.org

Review-Url: https://codereview.chromium.org/2478643002
Cr-Commit-Position: refs/heads/master@{#40746}
2016-11-04 05:45:15 +00:00

17 lines
333 B
JavaScript

// 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: --turbo --turbo-escape --allow-natives-syntax
function fn(a) {
var [b] = a;
return b;
}
fn('a');
fn('a');
%OptimizeFunctionOnNextCall(fn);
fn('a');