v8/test/mjsunit/regress/regress-crbug-871886.js
Tobias Tebbi 5b74a7ee63 [csa] avoid FixedDoubleArray CAST on empty FixedArray
Bug: chromium:871886
Change-Id: I91c6099ebaa064575db1ee3d7354e02cd42bbfd2
Reviewed-on: https://chromium-review.googlesource.com/1166906
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55010}
2018-08-09 10:00:25 +00:00

12 lines
280 B
JavaScript

// Copyright 2018 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.
let arr = [1.5, 2.5];
arr.slice(0,
{ valueOf: function () {
arr.length = 0;
return 2;
}
});