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

Side by Side Diff: src/collection-iterator.js

Issue 1093183006: [es6] Map/Set size getter should have "get size" name (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Use IS_UNDEFINED instead Created 5 years, 8 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/array-iterator.js ('k') | src/generator.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 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 var $mapEntries; 5 var $mapEntries;
6 var $mapIteratorNext; 6 var $mapIteratorNext;
7 var $setIteratorNext; 7 var $setIteratorNext;
8 var $setValues; 8 var $setValues;
9 9
10 (function() { 10 (function() {
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 73
74 // ------------------------------------------------------------------- 74 // -------------------------------------------------------------------
75 75
76 %SetCode(SetIterator, SetIteratorConstructor); 76 %SetCode(SetIterator, SetIteratorConstructor);
77 %FunctionSetPrototype(SetIterator, new GlobalObject()); 77 %FunctionSetPrototype(SetIterator, new GlobalObject());
78 %FunctionSetInstanceClassName(SetIterator, 'Set Iterator'); 78 %FunctionSetInstanceClassName(SetIterator, 'Set Iterator');
79 InstallFunctions(SetIterator.prototype, DONT_ENUM, [ 79 InstallFunctions(SetIterator.prototype, DONT_ENUM, [
80 'next', SetIteratorNextJS 80 'next', SetIteratorNextJS
81 ]); 81 ]);
82 82
83 %FunctionSetName(SetIteratorSymbolIterator, '[Symbol.iterator]'); 83 SetFunctionName(SetIteratorSymbolIterator, symbolIterator);
84 %AddNamedProperty(SetIterator.prototype, symbolIterator, 84 %AddNamedProperty(SetIterator.prototype, symbolIterator,
85 SetIteratorSymbolIterator, DONT_ENUM); 85 SetIteratorSymbolIterator, DONT_ENUM);
86 %AddNamedProperty(SetIterator.prototype, symbolToStringTag, 86 %AddNamedProperty(SetIterator.prototype, symbolToStringTag,
87 "Set Iterator", READ_ONLY | DONT_ENUM); 87 "Set Iterator", READ_ONLY | DONT_ENUM);
88 88
89 InstallFunctions(GlobalSet.prototype, DONT_ENUM, [ 89 InstallFunctions(GlobalSet.prototype, DONT_ENUM, [
90 'entries', SetEntries, 90 'entries', SetEntries,
91 'keys', SetValues, 91 'keys', SetValues,
92 'values', SetValues 92 'values', SetValues
93 ]); 93 ]);
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 163
164 // ------------------------------------------------------------------- 164 // -------------------------------------------------------------------
165 165
166 %SetCode(MapIterator, MapIteratorConstructor); 166 %SetCode(MapIterator, MapIteratorConstructor);
167 %FunctionSetPrototype(MapIterator, new GlobalObject()); 167 %FunctionSetPrototype(MapIterator, new GlobalObject());
168 %FunctionSetInstanceClassName(MapIterator, 'Map Iterator'); 168 %FunctionSetInstanceClassName(MapIterator, 'Map Iterator');
169 InstallFunctions(MapIterator.prototype, DONT_ENUM, [ 169 InstallFunctions(MapIterator.prototype, DONT_ENUM, [
170 'next', MapIteratorNextJS 170 'next', MapIteratorNextJS
171 ]); 171 ]);
172 172
173 %FunctionSetName(MapIteratorSymbolIterator, '[Symbol.iterator]'); 173 SetFunctionName(MapIteratorSymbolIterator, symbolIterator);
174 %AddNamedProperty(MapIterator.prototype, symbolIterator, 174 %AddNamedProperty(MapIterator.prototype, symbolIterator,
175 MapIteratorSymbolIterator, DONT_ENUM); 175 MapIteratorSymbolIterator, DONT_ENUM);
176 %AddNamedProperty(MapIterator.prototype, symbolToStringTag, 176 %AddNamedProperty(MapIterator.prototype, symbolToStringTag,
177 "Map Iterator", READ_ONLY | DONT_ENUM); 177 "Map Iterator", READ_ONLY | DONT_ENUM);
178 178
179 179
180 InstallFunctions(GlobalMap.prototype, DONT_ENUM, [ 180 InstallFunctions(GlobalMap.prototype, DONT_ENUM, [
181 'entries', MapEntries, 181 'entries', MapEntries,
182 'keys', MapKeys, 182 'keys', MapKeys,
183 'values', MapValues 183 'values', MapValues
184 ]); 184 ]);
185 185
186 %AddNamedProperty(GlobalMap.prototype, symbolIterator, MapEntries, DONT_ENUM); 186 %AddNamedProperty(GlobalMap.prototype, symbolIterator, MapEntries, DONT_ENUM);
187 187
188 $mapEntries = MapEntries; 188 $mapEntries = MapEntries;
189 $mapIteratorNext = MapIteratorNextJS; 189 $mapIteratorNext = MapIteratorNextJS;
190 190
191 })(); 191 })();
OLDNEW
« no previous file with comments | « src/array-iterator.js ('k') | src/generator.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698