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

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

Issue 1127543003: Revert of Reland "Wrap v8natives.js into a function." (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 7 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/collection.js ('k') | src/date.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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 'Set.prototype.values', this); 69 'Set.prototype.values', this);
70 } 70 }
71 return new SetIterator(this, ITERATOR_KIND_VALUES); 71 return new SetIterator(this, ITERATOR_KIND_VALUES);
72 } 72 }
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 $setFunctionName(SetIteratorSymbolIterator, symbolIterator); 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 ]);
94 94
95 %AddNamedProperty(GlobalSet.prototype, symbolIterator, SetValues, DONT_ENUM); 95 %AddNamedProperty(GlobalSet.prototype, symbolIterator, SetValues, DONT_ENUM);
96 96
97 $setIteratorNext = SetIteratorNextJS; 97 $setIteratorNext = SetIteratorNextJS;
98 $setValues = SetValues; 98 $setValues = SetValues;
99 99
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 'Map.prototype.values', this); 159 'Map.prototype.values', this);
160 } 160 }
161 return new MapIterator(this, ITERATOR_KIND_VALUES); 161 return new MapIterator(this, ITERATOR_KIND_VALUES);
162 } 162 }
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 $setFunctionName(MapIteratorSymbolIterator, symbolIterator); 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/collection.js ('k') | src/date.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698