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 "use strict"; | 5 "use strict"; |
6 | 6 |
7 // This file relies on the fact that the following declaration has been made | 7 // This file relies on the fact that the following declaration has been made |
8 // in runtime.js: | 8 // in runtime.js: |
9 // var $Array = global.Array; | 9 // var $Array = global.Array; |
10 | 10 |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
106 "isRegExp", symbolIsRegExp, | 106 "isRegExp", symbolIsRegExp, |
107 "iterator", symbolIterator, | 107 "iterator", symbolIterator, |
108 "toStringTag", symbolToStringTag, | 108 "toStringTag", symbolToStringTag, |
109 "unscopables", symbolUnscopables | 109 "unscopables", symbolUnscopables |
110 )); | 110 )); |
111 InstallFunctions($Symbol, DONT_ENUM, $Array( | 111 InstallFunctions($Symbol, DONT_ENUM, $Array( |
112 "for", SymbolFor, | 112 "for", SymbolFor, |
113 "keyFor", SymbolKeyFor | 113 "keyFor", SymbolKeyFor |
114 )); | 114 )); |
115 | 115 |
116 %SetProperty($Symbol.prototype, "constructor", $Symbol, DONT_ENUM); | 116 %AddProperty($Symbol.prototype, "constructor", $Symbol, DONT_ENUM); |
117 InstallFunctions($Symbol.prototype, DONT_ENUM, $Array( | 117 InstallFunctions($Symbol.prototype, DONT_ENUM, $Array( |
118 "toString", SymbolToString, | 118 "toString", SymbolToString, |
119 "valueOf", SymbolValueOf | 119 "valueOf", SymbolValueOf |
120 )); | 120 )); |
121 } | 121 } |
122 | 122 |
123 SetUpSymbol(); | 123 SetUpSymbol(); |
124 | 124 |
125 | 125 |
126 function ExtendObject() { | 126 function ExtendObject() { |
127 %CheckIsBootstrapping(); | 127 %CheckIsBootstrapping(); |
128 | 128 |
129 InstallFunctions($Object, DONT_ENUM, $Array( | 129 InstallFunctions($Object, DONT_ENUM, $Array( |
130 "getOwnPropertySymbols", ObjectGetOwnPropertySymbols | 130 "getOwnPropertySymbols", ObjectGetOwnPropertySymbols |
131 )); | 131 )); |
132 } | 132 } |
133 | 133 |
134 ExtendObject(); | 134 ExtendObject(); |
OLD | NEW |