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

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

Issue 1149773003: Revert of Revert of Hook up more import/exports in natives. (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(global, utils) { 10 (function(global, utils) {
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 'Set.prototype.values', this); 63 'Set.prototype.values', this);
64 } 64 }
65 return new SetIterator(this, ITERATOR_KIND_VALUES); 65 return new SetIterator(this, ITERATOR_KIND_VALUES);
66 } 66 }
67 67
68 // ------------------------------------------------------------------- 68 // -------------------------------------------------------------------
69 69
70 %SetCode(SetIterator, SetIteratorConstructor); 70 %SetCode(SetIterator, SetIteratorConstructor);
71 %FunctionSetPrototype(SetIterator, {__proto__: $iteratorPrototype}); 71 %FunctionSetPrototype(SetIterator, {__proto__: $iteratorPrototype});
72 %FunctionSetInstanceClassName(SetIterator, 'Set Iterator'); 72 %FunctionSetInstanceClassName(SetIterator, 'Set Iterator');
73 $installFunctions(SetIterator.prototype, DONT_ENUM, [ 73 utils.InstallFunctions(SetIterator.prototype, DONT_ENUM, [
74 'next', SetIteratorNextJS 74 'next', SetIteratorNextJS
75 ]); 75 ]);
76 76
77 %AddNamedProperty(SetIterator.prototype, symbolToStringTag, 77 %AddNamedProperty(SetIterator.prototype, symbolToStringTag,
78 "Set Iterator", READ_ONLY | DONT_ENUM); 78 "Set Iterator", READ_ONLY | DONT_ENUM);
79 79
80 $installFunctions(GlobalSet.prototype, DONT_ENUM, [ 80 utils.InstallFunctions(GlobalSet.prototype, DONT_ENUM, [
81 'entries', SetEntries, 81 'entries', SetEntries,
82 'keys', SetValues, 82 'keys', SetValues,
83 'values', SetValues 83 'values', SetValues
84 ]); 84 ]);
85 85
86 %AddNamedProperty(GlobalSet.prototype, symbolIterator, SetValues, DONT_ENUM); 86 %AddNamedProperty(GlobalSet.prototype, symbolIterator, SetValues, DONT_ENUM);
87 87
88 $setIteratorNext = SetIteratorNextJS; 88 $setIteratorNext = SetIteratorNextJS;
89 $setValues = SetValues; 89 $setValues = SetValues;
90 90
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 'Map.prototype.values', this); 145 'Map.prototype.values', this);
146 } 146 }
147 return new MapIterator(this, ITERATOR_KIND_VALUES); 147 return new MapIterator(this, ITERATOR_KIND_VALUES);
148 } 148 }
149 149
150 // ------------------------------------------------------------------- 150 // -------------------------------------------------------------------
151 151
152 %SetCode(MapIterator, MapIteratorConstructor); 152 %SetCode(MapIterator, MapIteratorConstructor);
153 %FunctionSetPrototype(MapIterator, {__proto__: $iteratorPrototype}); 153 %FunctionSetPrototype(MapIterator, {__proto__: $iteratorPrototype});
154 %FunctionSetInstanceClassName(MapIterator, 'Map Iterator'); 154 %FunctionSetInstanceClassName(MapIterator, 'Map Iterator');
155 $installFunctions(MapIterator.prototype, DONT_ENUM, [ 155 utils.InstallFunctions(MapIterator.prototype, DONT_ENUM, [
156 'next', MapIteratorNextJS 156 'next', MapIteratorNextJS
157 ]); 157 ]);
158 158
159 %AddNamedProperty(MapIterator.prototype, symbolToStringTag, 159 %AddNamedProperty(MapIterator.prototype, symbolToStringTag,
160 "Map Iterator", READ_ONLY | DONT_ENUM); 160 "Map Iterator", READ_ONLY | DONT_ENUM);
161 161
162 162
163 $installFunctions(GlobalMap.prototype, DONT_ENUM, [ 163 utils.InstallFunctions(GlobalMap.prototype, DONT_ENUM, [
164 'entries', MapEntries, 164 'entries', MapEntries,
165 'keys', MapKeys, 165 'keys', MapKeys,
166 'values', MapValues 166 'values', MapValues
167 ]); 167 ]);
168 168
169 %AddNamedProperty(GlobalMap.prototype, symbolIterator, MapEntries, DONT_ENUM); 169 %AddNamedProperty(GlobalMap.prototype, symbolIterator, MapEntries, DONT_ENUM);
170 170
171 $mapEntries = MapEntries; 171 $mapEntries = MapEntries;
172 $mapIteratorNext = MapIteratorNextJS; 172 $mapIteratorNext = MapIteratorNextJS;
173 173
174 }) 174 })
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