v8/test/mjsunit/regress/regress-crbug-661949.js
bmeurer 10033749fd [turbofan] CheckBounds cannot be used within asm.js.
Also properly deal with constant indices for String element access in
the JSNativeContextSpecialization.

BUG=chromium:661949
R=jarin@chromium.org

Review-Url: https://codereview.chromium.org/2474013002
Cr-Commit-Position: refs/heads/master@{#40723}
2016-11-03 12:35:04 +00:00

16 lines
336 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: --allow-natives-syntax
var foo = (function() {
'use asm';
function foo() { ''[0]; }
return foo;
})();
foo();
%OptimizeFunctionOnNextCall(foo);
foo();