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

Side by Side Diff: src/array.js

Issue 903004: Some cosmetic issues. (Closed)
Patch Set: foobar Created 10 years, 9 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 | « no previous file | src/ia32/stub-cache-ia32.cc » ('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 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 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 1089 matching lines...) Expand 10 before | Expand all | Expand 10 after
1100 "isArray", ArrayIsArray 1100 "isArray", ArrayIsArray
1101 )); 1101 ));
1102 1102
1103 var specialFunctions = %SpecialArrayFunctions({}); 1103 var specialFunctions = %SpecialArrayFunctions({});
1104 1104
1105 function getFunction(name, jsBuiltin, len) { 1105 function getFunction(name, jsBuiltin, len) {
1106 var f = jsBuiltin; 1106 var f = jsBuiltin;
1107 if (specialFunctions.hasOwnProperty(name)) { 1107 if (specialFunctions.hasOwnProperty(name)) {
1108 f = specialFunctions[name]; 1108 f = specialFunctions[name];
1109 } 1109 }
1110 if (arguments.length == 3) { 1110 if (!IS_UNDEFINED(len)) {
1111 %FunctionSetLength(f, len); 1111 %FunctionSetLength(f, len);
1112 } 1112 }
1113 return f; 1113 return f;
1114 } 1114 }
1115 1115
1116 // Setup non-enumerable functions of the Array.prototype object and 1116 // Setup non-enumerable functions of the Array.prototype object and
1117 // set their names. 1117 // set their names.
1118 // Manipulate the length of some of the functions to meet 1118 // Manipulate the length of some of the functions to meet
1119 // expectations set by ECMA-262 or Mozilla. 1119 // expectations set by ECMA-262 or Mozilla.
1120 InstallFunctionsOnHiddenPrototype($Array.prototype, DONT_ENUM, $Array( 1120 InstallFunctionsOnHiddenPrototype($Array.prototype, DONT_ENUM, $Array(
(...skipping 18 matching lines...) Expand all
1139 "lastIndexOf", getFunction("lastIndexOf", ArrayLastIndexOf, 1), 1139 "lastIndexOf", getFunction("lastIndexOf", ArrayLastIndexOf, 1),
1140 "reduce", getFunction("reduce", ArrayReduce, 1), 1140 "reduce", getFunction("reduce", ArrayReduce, 1),
1141 "reduceRight", getFunction("reduceRight", ArrayReduceRight, 1) 1141 "reduceRight", getFunction("reduceRight", ArrayReduceRight, 1)
1142 )); 1142 ));
1143 1143
1144 %FinishArrayPrototypeSetup($Array.prototype); 1144 %FinishArrayPrototypeSetup($Array.prototype);
1145 } 1145 }
1146 1146
1147 1147
1148 SetupArray(); 1148 SetupArray();
OLDNEW
« no previous file with comments | « no previous file | src/ia32/stub-cache-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698