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 |
11 // ------------------------------------------------------------------- | 11 // ------------------------------------------------------------------- |
12 // Imports | 12 // Imports |
13 | 13 |
14 var GlobalObject = global.Object; | 14 var GlobalObject = global.Object; |
15 var GlobalSymbol = global.Symbol; | 15 var GlobalSymbol = global.Symbol; |
16 var hasInstanceSymbol = utils.ImportNow("has_instance_symbol"); | 16 var hasInstanceSymbol = utils.ImportNow("has_instance_symbol"); |
17 var isConcatSpreadableSymbol = | 17 var isConcatSpreadableSymbol = |
18 utils.ImportNow("is_concat_spreadable_symbol"); | 18 utils.ImportNow("is_concat_spreadable_symbol"); |
| 19 var isRegExpSymbol = utils.ImportNow("is_regexp_symbol"); |
19 var iteratorSymbol = utils.ImportNow("iterator_symbol"); | 20 var iteratorSymbol = utils.ImportNow("iterator_symbol"); |
20 var MakeTypeError; | 21 var MakeTypeError; |
21 var matchSymbol = utils.ImportNow("match_symbol"); | 22 var matchSymbol = utils.ImportNow("match_symbol"); |
22 var ObjectGetOwnPropertyKeys; | 23 var ObjectGetOwnPropertyKeys; |
23 var replaceSymbol = utils.ImportNow("replace_symbol"); | 24 var replaceSymbol = utils.ImportNow("replace_symbol"); |
24 var searchSymbol = utils.ImportNow("search_symbol"); | 25 var searchSymbol = utils.ImportNow("search_symbol"); |
25 var splitSymbol = utils.ImportNow("split_symbol"); | 26 var splitSymbol = utils.ImportNow("split_symbol"); |
26 var toPrimitiveSymbol = utils.ImportNow("to_primitive_symbol"); | 27 var toPrimitiveSymbol = utils.ImportNow("to_primitive_symbol"); |
27 var toStringTagSymbol = utils.ImportNow("to_string_tag_symbol"); | 28 var toStringTagSymbol = utils.ImportNow("to_string_tag_symbol"); |
28 var unscopablesSymbol = utils.ImportNow("unscopables_symbol"); | 29 var unscopablesSymbol = utils.ImportNow("unscopables_symbol"); |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
90 } | 91 } |
91 | 92 |
92 // ------------------------------------------------------------------- | 93 // ------------------------------------------------------------------- |
93 | 94 |
94 %FunctionSetPrototype(GlobalSymbol, new GlobalObject()); | 95 %FunctionSetPrototype(GlobalSymbol, new GlobalObject()); |
95 | 96 |
96 utils.InstallConstants(GlobalSymbol, [ | 97 utils.InstallConstants(GlobalSymbol, [ |
97 // TODO(rossberg): expose when implemented. | 98 // TODO(rossberg): expose when implemented. |
98 // "hasInstance", hasInstanceSymbol, | 99 // "hasInstance", hasInstanceSymbol, |
99 // "isConcatSpreadable", isConcatSpreadableSymbol, | 100 // "isConcatSpreadable", isConcatSpreadableSymbol, |
| 101 // "isRegExp", isRegExpSymbol, |
100 "iterator", iteratorSymbol, | 102 "iterator", iteratorSymbol, |
101 // TODO(yangguo): expose when implemented. | 103 // TODO(yangguo): expose when implemented. |
102 // "match", matchSymbol, | 104 // "match", matchSymbol, |
103 // "replace", replaceSymbol, | 105 // "replace", replaceSymbol, |
104 // "search", searchSymbol, | 106 // "search", searchSymbol, |
105 // "split, splitSymbol, | 107 // "split, splitSymbol, |
106 "toPrimitive", toPrimitiveSymbol, | 108 "toPrimitive", toPrimitiveSymbol, |
107 // TODO(dslomov, caitp): Currently defined in harmony-tostring.js --- | 109 // TODO(dslomov, caitp): Currently defined in harmony-tostring.js --- |
108 // Move here when shipping | 110 // Move here when shipping |
109 // "toStringTag", toStringTagSymbol, | 111 // "toStringTag", toStringTagSymbol, |
(...skipping 24 matching lines...) Expand all Loading... |
134 ]); | 136 ]); |
135 | 137 |
136 // ------------------------------------------------------------------- | 138 // ------------------------------------------------------------------- |
137 // Exports | 139 // Exports |
138 | 140 |
139 utils.Export(function(to) { | 141 utils.Export(function(to) { |
140 to.SymbolToString = SymbolToString; | 142 to.SymbolToString = SymbolToString; |
141 }) | 143 }) |
142 | 144 |
143 }) | 145 }) |
OLD | NEW |