Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(137)

Side by Side Diff: test/mjsunit/regress/regress-crbug-668414.js

Issue 2527173002: [runtime] Add missing @@IsConcatSpreadable check for FAST_DOUBLE_ELEMENTS (Closed)
Patch Set: Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/builtins/builtins-array.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2016 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 (function testSmiArrayConcat() {
6 var result = [].concat([-12]);
7
8 assertEquals(1, result.length);
9 assertEquals([-12], result);
10 })();
11
12 (function testDoubleArrayConcat() {
13 var result = [].concat([-1073741825]);
14
15 assertEquals(1, result.length);
16 assertEquals([-1073741825], result);
17 })();
18
19 (function testSmiArrayNonConcatSpreadable() {
20 var array = [-10];
21 array[Symbol.isConcatSpreadable] = false;
22 var result = [].concat(array);
23
24 assertEquals(1, result.length);
25 assertEquals(1, result[0].length);
26 assertEquals([-10], result[0]);
27 })();
28
29 (function testDoubleArrayNonConcatSpreadable() {
30 var array = [-1073741825];
31 array[Symbol.isConcatSpreadable] = false;
32 var result = [].concat(array);
33
34 assertEquals(1, result.length);
35 assertEquals(1, result[0].length);
36 assertEquals([-1073741825], result[0]);
37 })();
38
39 Array.prototype[Symbol.isConcatSpreadable] = false;
40
41
42 (function testSmiArray() {
43 var result = [].concat([-12]);
44
45 assertEquals(2, result.length);
46 assertEquals(0, result[0].length);
47 assertEquals(1, result[1].length);
48 assertEquals([-12], result[1]);
49 })();
50
51 (function testDoubleArray() {
52 var result = [].concat([-1073741825]);
53
54 assertEquals(2, result.length);
55 assertEquals(0, result[0].length);
56 assertEquals(1, result[1].length);
57 assertEquals([-1073741825], result[1]);
58 })();
OLDNEW
« no previous file with comments | « src/builtins/builtins-array.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698