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

Side by Side Diff: test/mjsunit/array-feedback.js

Issue 1086873003: Array() in optimized code can create with wrong ElementsKind in corner cases. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Address comments and test failure. Created 5 years, 8 months 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 | « test/mjsunit/array-constructor-feedback.js ('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
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 create1(0); 84 create1(0);
85 a = create1(0); 85 a = create1(0);
86 assertFalse(isHoley(a)); 86 assertFalse(isHoley(a));
87 assertKind(elements_kind.fast_smi_only, a); 87 assertKind(elements_kind.fast_smi_only, a);
88 a[0] = "hello"; 88 a[0] = "hello";
89 b = create1(10); 89 b = create1(10);
90 assertTrue(isHoley(b)); 90 assertTrue(isHoley(b));
91 assertKind(elements_kind.fast, b); 91 assertKind(elements_kind.fast, b);
92 92
93 a = create1(100000); 93 a = create1(100000);
94 assertKind(elements_kind.fast_smi_only, a); 94 assertKind(elements_kind.fast, a);
95 95
96 function create3(arg1, arg2, arg3) { 96 function create3(arg1, arg2, arg3) {
97 return Array(arg1, arg2, arg3); 97 return Array(arg1, arg2, arg3);
98 } 98 }
99 99
100 create3(1,2,3); 100 create3(1,2,3);
101 create3(1,2,3); 101 create3(1,2,3);
102 a = create3(1,2,3); 102 a = create3(1,2,3);
103 a[0] = 3.035; 103 a[0] = 3.035;
104 assertKind(elements_kind.fast_double, a); 104 assertKind(elements_kind.fast_double, a);
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 } 199 }
200 200
201 var realmBArray = Realm.eval(realmB, "Array"); 201 var realmBArray = Realm.eval(realmB, "Array");
202 instanceof_check(Array); 202 instanceof_check(Array);
203 instanceof_check(Array); 203 instanceof_check(Array);
204 instanceof_check(Array); 204 instanceof_check(Array);
205 instanceof_check(realmBArray); 205 instanceof_check(realmBArray);
206 instanceof_check(realmBArray); 206 instanceof_check(realmBArray);
207 instanceof_check(realmBArray); 207 instanceof_check(realmBArray);
208 })(); 208 })();
OLDNEW
« no previous file with comments | « test/mjsunit/array-constructor-feedback.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698