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

Side by Side Diff: test/mjsunit/undeletable-functions.js

Issue 650043: Faster moving FixedArray elements around. (Closed)
Patch Set: First round of Soren's comments Created 10 years, 10 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/fuzz-natives.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 2009 the V8 project authors. All rights reserved. 1 // Copyright 2009 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 21 matching lines...) Expand all
32 // version back by deleting the new definition. 32 // version back by deleting the new definition.
33 33
34 var array; 34 var array;
35 35
36 array = [ 36 array = [
37 "toString", "toLocaleString", "join", "pop", "push", "concat", "reverse", 37 "toString", "toLocaleString", "join", "pop", "push", "concat", "reverse",
38 "shift", "unshift", "slice", "splice", "sort", "filter", "forEach", "some", 38 "shift", "unshift", "slice", "splice", "sort", "filter", "forEach", "some",
39 "every", "map", "indexOf", "lastIndexOf", "reduce", "reduceRight"]; 39 "every", "map", "indexOf", "lastIndexOf", "reduce", "reduceRight"];
40 CheckJSCSemantics(Array.prototype, array, "Array prototype"); 40 CheckJSCSemantics(Array.prototype, array, "Array prototype");
41 41
42 var old_Array_prototype = Array.prototype;
43 var new_Array_prototype = {};
44 Array.prototype = new_Array_prototype;
45 assertEquals(old_Array_prototype, Array.prototype);
46
42 array = [ 47 array = [
43 "toString", "toDateString", "toTimeString", "toLocaleString", 48 "toString", "toDateString", "toTimeString", "toLocaleString",
44 "toLocaleDateString", "toLocaleTimeString", "valueOf", "getTime", 49 "toLocaleDateString", "toLocaleTimeString", "valueOf", "getTime",
45 "getFullYear", "getUTCFullYear", "getMonth", "getUTCMonth", "getDate", 50 "getFullYear", "getUTCFullYear", "getMonth", "getUTCMonth", "getDate",
46 "getUTCDate", "getDay", "getUTCDay", "getHours", "getUTCHours", "getMinutes", 51 "getUTCDate", "getDay", "getUTCDay", "getHours", "getUTCHours", "getMinutes",
47 "getUTCMinutes", "getSeconds", "getUTCSeconds", "getMilliseconds", 52 "getUTCMinutes", "getSeconds", "getUTCSeconds", "getMilliseconds",
48 "getUTCMilliseconds", "getTimezoneOffset", "setTime", "setMilliseconds", 53 "getUTCMilliseconds", "getTimezoneOffset", "setTime", "setMilliseconds",
49 "setUTCMilliseconds", "setSeconds", "setUTCSeconds", "setMinutes", 54 "setUTCMilliseconds", "setSeconds", "setUTCSeconds", "setMinutes",
50 "setUTCMinutes", "setHours", "setUTCHours", "setDate", "setUTCDate", 55 "setUTCMinutes", "setHours", "setUTCHours", "setDate", "setUTCDate",
51 "setMonth", "setUTCMonth", "setFullYear", "setUTCFullYear", "toGMTString", 56 "setMonth", "setUTCMonth", "setFullYear", "setUTCFullYear", "toGMTString",
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 if (!type[prop]) return; 177 if (!type[prop]) return;
173 assertTrue(type.hasOwnProperty(prop), "inherited: " + prop); 178 assertTrue(type.hasOwnProperty(prop), "inherited: " + prop);
174 var deleted = delete type[prop]; 179 var deleted = delete type[prop];
175 assertFalse(deleted, "delete operator returned true: " + prop); 180 assertFalse(deleted, "delete operator returned true: " + prop);
176 assertTrue(type.hasOwnProperty(prop), "not there after delete: " + prop); 181 assertTrue(type.hasOwnProperty(prop), "not there after delete: " + prop);
177 type[prop] = "foo"; 182 type[prop] = "foo";
178 assertEquals("foo", type[prop], "overwritable: " + prop); 183 assertEquals("foo", type[prop], "overwritable: " + prop);
179 } 184 }
180 185
181 print("OK"); 186 print("OK");
OLDNEW
« no previous file with comments | « test/mjsunit/fuzz-natives.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698