5f1ae66d56
Added a new %HasComplexElements runtime function (meaning elements that are non-writable, non-configurable, or have getters and setters) and use it in UseSparseVariant to filter out cases where the sparse optimizations can cause V8 to fall out of spec compliance. Renamed SmartMove/SmartSlice to SparseMove/SparseSlice and guarded them with the new and improved UseSparseVariant. These two changes combine let us pass nearly every test in bug-2615.js, as well as fixing reverse and join on sparse arrays. Note that there are various test changes in this patch that correct existing tests to match the correct-by-spec behavior. This patch depends on https://codereview.chromium.org/666883009, which better-aligns the behavior of SmartMove with SimpleMove. BUG=v8:2615,v8:3612,v8:3621 LOG=y R=mstarzinger@chromium.org Review URL: https://codereview.chromium.org/656423004 git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24855 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
20 lines
446 B
JavaScript
20 lines
446 B
JavaScript
// Copyright 2014 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 __f_6() {
|
|
var __v_7 = [0];
|
|
%PreventExtensions(__v_7);
|
|
for (var __v_6 = -2; __v_6 < 19; __v_6++) __v_7.shift();
|
|
__f_7(__v_7);
|
|
}
|
|
__f_6();
|
|
__f_6();
|
|
%OptimizeFunctionOnNextCall(__f_6);
|
|
__f_6();
|
|
function __f_7(__v_7) {
|
|
__v_7.pop();
|
|
}
|