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

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

Issue 1226063002: Guard @@isConcatSpreadable behind a flag (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: stage new option so test262 passes Created 5 years, 5 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 | « src/flag-definitions.h ('k') | src/harmony-concat-spreadable.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 (function(global, utils) { 5 (function(global, utils) {
6 6
7 'use strict'; 7 'use strict';
8 8
9 %CheckIsBootstrapping(); 9 %CheckIsBootstrapping();
10 10
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after
280 var array = %IsConstructor(constructor) ? new constructor(length) : []; 280 var array = %IsConstructor(constructor) ? new constructor(length) : [];
281 for (var i = 0; i < length; i++) { 281 for (var i = 0; i < length; i++) {
282 AddArrayElement(constructor, array, i, %_Arguments(i)); 282 AddArrayElement(constructor, array, i, %_Arguments(i));
283 } 283 }
284 array.length = length; 284 array.length = length;
285 return array; 285 return array;
286 } 286 }
287 287
288 // ------------------------------------------------------------------- 288 // -------------------------------------------------------------------
289 289
290 utils.InstallConstants(GlobalSymbol, [
291 // TODO(dslomov, caitp): Move to symbol.js when shipping
292 "isConcatSpreadable", symbolIsConcatSpreadable
293 ]);
294
295 %FunctionSetLength(ArrayCopyWithin, 2); 290 %FunctionSetLength(ArrayCopyWithin, 2);
296 %FunctionSetLength(ArrayFrom, 1); 291 %FunctionSetLength(ArrayFrom, 1);
297 %FunctionSetLength(ArrayFill, 1); 292 %FunctionSetLength(ArrayFill, 1);
298 %FunctionSetLength(ArrayFind, 1); 293 %FunctionSetLength(ArrayFind, 1);
299 %FunctionSetLength(ArrayFindIndex, 1); 294 %FunctionSetLength(ArrayFindIndex, 1);
300 295
301 // Set up non-enumerable functions on the Array object. 296 // Set up non-enumerable functions on the Array object.
302 utils.InstallFunctions(GlobalArray, DONT_ENUM, [ 297 utils.InstallFunctions(GlobalArray, DONT_ENUM, [
303 "from", ArrayFrom, 298 "from", ArrayFrom,
304 "of", ArrayOf 299 "of", ArrayOf
(...skipping 12 matching lines...) Expand all
317 312
318 utils.Export(function(to) { 313 utils.Export(function(to) {
319 to.ArrayFrom = ArrayFrom; 314 to.ArrayFrom = ArrayFrom;
320 to.InnerArrayCopyWithin = InnerArrayCopyWithin; 315 to.InnerArrayCopyWithin = InnerArrayCopyWithin;
321 to.InnerArrayFill = InnerArrayFill; 316 to.InnerArrayFill = InnerArrayFill;
322 to.InnerArrayFind = InnerArrayFind; 317 to.InnerArrayFind = InnerArrayFind;
323 to.InnerArrayFindIndex = InnerArrayFindIndex; 318 to.InnerArrayFindIndex = InnerArrayFindIndex;
324 }); 319 });
325 320
326 }) 321 })
OLDNEW
« no previous file with comments | « src/flag-definitions.h ('k') | src/harmony-concat-spreadable.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698