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

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

Issue 11377132: Support all fast elements kinds in the major array operations. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed comments (and rebased) Created 8 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « test/mjsunit/array-natives-elements.js ('k') | test/mjsunit/elements-kind.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2010 the V8 project authors. All rights reserved. 1 // Copyright 2010 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 272 matching lines...) Expand 10 before | Expand all | Expand 10 after
283 // Check slicing on arguments object when argument has been deleted by index. 283 // Check slicing on arguments object when argument has been deleted by index.
284 (function() { 284 (function() {
285 function func(x, y, z) { 285 function func(x, y, z) {
286 assertEquals(3, arguments.length); 286 assertEquals(3, arguments.length);
287 delete arguments[1]; 287 delete arguments[1];
288 assertEquals([x,,z], Array.prototype.slice.call(arguments, 0)); 288 assertEquals([x,,z], Array.prototype.slice.call(arguments, 0));
289 } 289 }
290 290
291 func('a', 'b', 'c'); 291 func('a', 'b', 'c');
292 })(); 292 })();
293
294 // Check slicing of holey objects with elements in the prototype
295 (function() {
296 function f() {
297 delete arguments[1];
298 arguments.__proto__[1] = 5;
299 var result = Array.prototype.slice.call(arguments);
300 delete arguments.__proto__[1];
301 assertEquals([1,5,3], result);
302 }
303 f(1,2,3);
304 })();
OLDNEW
« no previous file with comments | « test/mjsunit/array-natives-elements.js ('k') | test/mjsunit/elements-kind.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698