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

Side by Side Diff: src/array.js

Issue 8566009: Remove hidden prototype for builtin functions. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 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 | « no previous file | src/collection.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 1367 matching lines...) Expand 10 before | Expand all | Expand 10 after
1378 if (!IS_UNDEFINED(len)) { 1378 if (!IS_UNDEFINED(len)) {
1379 %FunctionSetLength(f, len); 1379 %FunctionSetLength(f, len);
1380 } 1380 }
1381 return f; 1381 return f;
1382 } 1382 }
1383 1383
1384 // Set up non-enumerable functions of the Array.prototype object and 1384 // Set up non-enumerable functions of the Array.prototype object and
1385 // set their names. 1385 // set their names.
1386 // Manipulate the length of some of the functions to meet 1386 // Manipulate the length of some of the functions to meet
1387 // expectations set by ECMA-262 or Mozilla. 1387 // expectations set by ECMA-262 or Mozilla.
1388 InstallFunctionsOnHiddenPrototype($Array.prototype, DONT_ENUM, $Array( 1388 InstallFunctions($Array.prototype, DONT_ENUM, $Array(
1389 "toString", getFunction("toString", ArrayToString), 1389 "toString", getFunction("toString", ArrayToString),
1390 "toLocaleString", getFunction("toLocaleString", ArrayToLocaleString), 1390 "toLocaleString", getFunction("toLocaleString", ArrayToLocaleString),
1391 "join", getFunction("join", ArrayJoin), 1391 "join", getFunction("join", ArrayJoin),
1392 "pop", getFunction("pop", ArrayPop), 1392 "pop", getFunction("pop", ArrayPop),
1393 "push", getFunction("push", ArrayPush, 1), 1393 "push", getFunction("push", ArrayPush, 1),
1394 "concat", getFunction("concat", ArrayConcat, 1), 1394 "concat", getFunction("concat", ArrayConcat, 1),
1395 "reverse", getFunction("reverse", ArrayReverse), 1395 "reverse", getFunction("reverse", ArrayReverse),
1396 "shift", getFunction("shift", ArrayShift), 1396 "shift", getFunction("shift", ArrayShift),
1397 "unshift", getFunction("unshift", ArrayUnshift, 1), 1397 "unshift", getFunction("unshift", ArrayUnshift, 1),
1398 "slice", getFunction("slice", ArraySlice, 2), 1398 "slice", getFunction("slice", ArraySlice, 2),
(...skipping 16 matching lines...) Expand all
1415 // exposed to user code. 1415 // exposed to user code.
1416 // Adding only the functions that are actually used. 1416 // Adding only the functions that are actually used.
1417 SetUpLockedPrototype(InternalArray, $Array(), $Array( 1417 SetUpLockedPrototype(InternalArray, $Array(), $Array(
1418 "join", getFunction("join", ArrayJoin), 1418 "join", getFunction("join", ArrayJoin),
1419 "pop", getFunction("pop", ArrayPop), 1419 "pop", getFunction("pop", ArrayPop),
1420 "push", getFunction("push", ArrayPush) 1420 "push", getFunction("push", ArrayPush)
1421 )); 1421 ));
1422 } 1422 }
1423 1423
1424 SetUpArray(); 1424 SetUpArray();
OLDNEW
« no previous file with comments | « no previous file | src/collection.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698