b51053d89e
In the process: - add volatile types for FastJSArray and remove the length_fast accessor from JSArray with the application of more rigorous typing. - add micro benchmarks for testing all the interesting slice cases Also update a few assorted places in .tq code to make them more idiomatic. The original version of this patch had an overly agressive assert that has been loosened. TBR=jgruber@chromium.org Change-Id: I56870862f4b124d1b38372daa326182a526c874c Reviewed-on: https://chromium-review.googlesource.com/c/1291375 Reviewed-by: Daniel Clifford <danno@chromium.org> Commit-Queue: Daniel Clifford <danno@chromium.org> Cr-Commit-Position: refs/heads/master@{#56829}
36 lines
677 B
JavaScript
36 lines
677 B
JavaScript
// Copyright 2017 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.
|
|
|
|
(function () {
|
|
function f() {
|
|
arguments.length = -5;
|
|
Array.prototype.slice.call(arguments);
|
|
}
|
|
f('a')
|
|
})();
|
|
|
|
(function () {
|
|
function f() {
|
|
arguments.length = 2.3;
|
|
Array.prototype.slice.call(arguments);
|
|
}
|
|
f('a')
|
|
})();
|
|
|
|
(function () {
|
|
function f( __v_59960) {
|
|
arguments.length = -5;
|
|
Array.prototype.slice.call(arguments);
|
|
}
|
|
f('a')
|
|
})();
|
|
|
|
(function () {
|
|
function f( __v_59960) {
|
|
arguments.length = 2.3;
|
|
Array.prototype.slice.call(arguments);
|
|
}
|
|
f('a')
|
|
})();
|