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

Side by Side Diff: src/harmony-array.js

Issue 1009443002: Hide Symbol implementation in a closure. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 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/harmony-tostring.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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 'use strict'; 5 'use strict';
6 6
7 // This file relies on the fact that the following declaration has been made 7 // This file relies on the fact that the following declaration has been made
8 // in runtime.js: 8 // in runtime.js:
9 // var $Array = global.Array; 9 // var $Array = global.Array;
10 10
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 } 204 }
205 array.length = length; 205 array.length = length;
206 return array; 206 return array;
207 } 207 }
208 208
209 // ------------------------------------------------------------------- 209 // -------------------------------------------------------------------
210 210
211 function HarmonyArrayExtendSymbolPrototype() { 211 function HarmonyArrayExtendSymbolPrototype() {
212 %CheckIsBootstrapping(); 212 %CheckIsBootstrapping();
213 213
214 InstallConstants($Symbol, $Array( 214 InstallConstants(global.Symbol, $Array(
215 // TODO(dslomov, caitp): Move to symbol.js when shipping 215 // TODO(dslomov, caitp): Move to symbol.js when shipping
216 "isConcatSpreadable", symbolIsConcatSpreadable 216 "isConcatSpreadable", symbolIsConcatSpreadable
217 )); 217 ));
218 } 218 }
219 219
220 HarmonyArrayExtendSymbolPrototype(); 220 HarmonyArrayExtendSymbolPrototype();
221 221
222 function HarmonyArrayExtendArrayPrototype() { 222 function HarmonyArrayExtendArrayPrototype() {
223 %CheckIsBootstrapping(); 223 %CheckIsBootstrapping();
224 224
225 %FunctionSetLength(ArrayFrom, 1); 225 %FunctionSetLength(ArrayFrom, 1);
226 226
227 // Set up non-enumerable functions on the Array object. 227 // Set up non-enumerable functions on the Array object.
228 InstallFunctions($Array, DONT_ENUM, $Array( 228 InstallFunctions($Array, DONT_ENUM, $Array(
229 "from", ArrayFrom, 229 "from", ArrayFrom,
230 "of", ArrayOf 230 "of", ArrayOf
231 )); 231 ));
232 232
233 // Set up the non-enumerable functions on the Array prototype object. 233 // Set up the non-enumerable functions on the Array prototype object.
234 InstallFunctions($Array.prototype, DONT_ENUM, $Array( 234 InstallFunctions($Array.prototype, DONT_ENUM, $Array(
235 "find", ArrayFind, 235 "find", ArrayFind,
236 "findIndex", ArrayFindIndex, 236 "findIndex", ArrayFindIndex,
237 "fill", ArrayFill 237 "fill", ArrayFill
238 )); 238 ));
239 } 239 }
240 240
241 HarmonyArrayExtendArrayPrototype(); 241 HarmonyArrayExtendArrayPrototype();
OLDNEW
« no previous file with comments | « no previous file | src/harmony-tostring.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698