| OLD | NEW |
| 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 Loading... |
| 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 utils.InstallFunctions(SetIterator.prototype, DONT_ENUM, [ | 73 $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 utils.InstallFunctions(GlobalSet.prototype, DONT_ENUM, [ | 80 $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 Loading... |
| 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 utils.InstallFunctions(MapIterator.prototype, DONT_ENUM, [ | 155 $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 utils.InstallFunctions(GlobalMap.prototype, DONT_ENUM, [ | 163 $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 }) |
| OLD | NEW |