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

Side by Side Diff: src/unscopables.js

Issue 446023002: Enable ES6 iteration by default (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Moved tests to es6, fixed duplicate ExtendArrayPrototype name in unscopables.js Created 6 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « src/preparser.cc ('k') | test/cctest/test-parsing.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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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 // var $Array = global.Array; 8 // var $Array = global.Array;
9 // var $Symbol = global.Symbol; 9 // var $Symbol = global.Symbol;
10 10
11 function ExtendSymbol() { 11 function UnscopablesExtendSymbol() {
12 %CheckIsBootstrapping(); 12 %CheckIsBootstrapping();
13 InstallConstants($Symbol, $Array( 13 InstallConstants($Symbol, $Array(
14 "unscopables", symbolUnscopables 14 "unscopables", symbolUnscopables
15 )); 15 ));
16 } 16 }
17 17
18 ExtendSymbol(); 18 UnscopablesExtendSymbol();
19 19
20 20
21 var arrayUnscopables = { 21 var arrayUnscopables = {
22 __proto__: null, 22 __proto__: null,
23 copyWithin: true, 23 copyWithin: true,
24 entries: true, 24 entries: true,
25 fill: true, 25 fill: true,
26 find: true, 26 find: true,
27 findIndex: true, 27 findIndex: true,
28 keys: true, 28 keys: true,
29 values: true, 29 values: true,
30 }; 30 };
31 31
32 32
33 function ExtendArrayPrototype() { 33 function UnscopablesExtendArrayPrototype() {
34 %CheckIsBootstrapping(); 34 %CheckIsBootstrapping();
35 %AddNamedProperty($Array.prototype, symbolUnscopables, arrayUnscopables, 35 %AddNamedProperty($Array.prototype, symbolUnscopables, arrayUnscopables,
36 DONT_ENUM | READ_ONLY); 36 DONT_ENUM | READ_ONLY);
37 } 37 }
38 38
39 ExtendArrayPrototype(); 39 UnscopablesExtendArrayPrototype();
OLDNEW
« no previous file with comments | « src/preparser.cc ('k') | test/cctest/test-parsing.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698