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

Side by Side Diff: test/mjsunit/regress/regress-581.js

Issue 1159433003: Use GetProperty for getting elements. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Addressed comments Created 5 years, 6 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
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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 17 matching lines...) Expand all
28 var pow30 = Math.pow(2, 30); 28 var pow30 = Math.pow(2, 30);
29 var pow31 = Math.pow(2, 31); 29 var pow31 = Math.pow(2, 31);
30 30
31 var a = []; 31 var a = [];
32 a[pow31] = 31; 32 a[pow31] = 31;
33 33
34 assertEquals(pow31 + 1, a.length); 34 assertEquals(pow31 + 1, a.length);
35 assertThrows(function() { a.concat(a); }, RangeError); 35 assertThrows(function() { a.concat(a); }, RangeError);
36 36
37 var b = []; 37 var b = [];
38 b[pow31 - 2] = 32; 38 b[pow31 - 3] = 32;
39 b[pow31 - 2] = "out_of_bounds";
39 var ab = a.concat(b); 40 var ab = a.concat(b);
40 assertEquals(2 * pow31 - 1, ab.length); 41 assertEquals(2 * pow31 - 1, ab.length);
41 assertEquals(31, ab[pow31]); 42 assertEquals(31, ab[pow31]);
42 assertEquals(32, ab[2 * pow31 - 1]); 43 assertEquals(32, ab[2 * pow31 - 2]);
44 assertEquals(undefined, ab[2 * pow31 - 1]);
43 45
44 var c = []; 46 var c = [];
45 c[pow30] = 30; 47 c[pow30] = 30;
46 assertThrows(function() { c.concat(c, a); }, RangeError); 48 assertThrows(function() { c.concat(c, a); }, RangeError);
OLDNEW
« no previous file with comments | « test/mjsunit/es6/indexed-integer-exotics.js ('k') | test/mjsunit/regress/regress-splice-large-index.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698