| OLD | NEW |
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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 (function(global, utils) { | 5 (function(global, utils) { |
| 6 | 6 |
| 7 "use strict"; | 7 "use strict"; |
| 8 | 8 |
| 9 %CheckIsBootstrapping(); | 9 %CheckIsBootstrapping(); |
| 10 | 10 |
| (...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 112 "unscopables", unscopablesSymbol, | 112 "unscopables", unscopablesSymbol, |
| 113 ]); | 113 ]); |
| 114 | 114 |
| 115 utils.InstallFunctions(GlobalSymbol, DONT_ENUM, [ | 115 utils.InstallFunctions(GlobalSymbol, DONT_ENUM, [ |
| 116 "for", SymbolFor, | 116 "for", SymbolFor, |
| 117 "keyFor", SymbolKeyFor | 117 "keyFor", SymbolKeyFor |
| 118 ]); | 118 ]); |
| 119 | 119 |
| 120 %AddNamedProperty( | 120 %AddNamedProperty( |
| 121 GlobalSymbol.prototype, "constructor", GlobalSymbol, DONT_ENUM); | 121 GlobalSymbol.prototype, "constructor", GlobalSymbol, DONT_ENUM); |
| 122 utils.SetFunctionName(SymbolToPrimitive, toPrimitiveSymbol); | |
| 123 %AddNamedProperty( | |
| 124 GlobalSymbol.prototype, toPrimitiveSymbol, SymbolToPrimitive, | |
| 125 DONT_ENUM | READ_ONLY); | |
| 126 %AddNamedProperty( | 122 %AddNamedProperty( |
| 127 GlobalSymbol.prototype, toStringTagSymbol, "Symbol", DONT_ENUM | READ_ONLY); | 123 GlobalSymbol.prototype, toStringTagSymbol, "Symbol", DONT_ENUM | READ_ONLY); |
| 128 | 124 |
| 125 utils.InstallFunctions(GlobalSymbol.prototype, DONT_ENUM | READ_ONLY, [ |
| 126 toPrimitiveSymbol, SymbolToPrimitive |
| 127 ]); |
| 128 |
| 129 utils.InstallFunctions(GlobalSymbol.prototype, DONT_ENUM, [ | 129 utils.InstallFunctions(GlobalSymbol.prototype, DONT_ENUM, [ |
| 130 "toString", SymbolToString, | 130 "toString", SymbolToString, |
| 131 "valueOf", SymbolValueOf | 131 "valueOf", SymbolValueOf |
| 132 ]); | 132 ]); |
| 133 | 133 |
| 134 utils.InstallFunctions(GlobalObject, DONT_ENUM, [ | 134 utils.InstallFunctions(GlobalObject, DONT_ENUM, [ |
| 135 "getOwnPropertySymbols", ObjectGetOwnPropertySymbols | 135 "getOwnPropertySymbols", ObjectGetOwnPropertySymbols |
| 136 ]); | 136 ]); |
| 137 | 137 |
| 138 // ------------------------------------------------------------------- | 138 // ------------------------------------------------------------------- |
| 139 // Exports | 139 // Exports |
| 140 | 140 |
| 141 utils.Export(function(to) { | 141 utils.Export(function(to) { |
| 142 to.SymbolToString = SymbolToString; | 142 to.SymbolToString = SymbolToString; |
| 143 }) | 143 }) |
| 144 | 144 |
| 145 }) | 145 }) |
| OLD | NEW |