| 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() { | 10 (function() { |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 Loading... |
| 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 })(); |
| OLD | NEW |