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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 | 68 |
69 | 69 |
70 function SymbolKeyFor(symbol) { | 70 function SymbolKeyFor(symbol) { |
71 if (!IS_SYMBOL(symbol)) throw MakeTypeError(kSymbolKeyFor, symbol); | 71 if (!IS_SYMBOL(symbol)) throw MakeTypeError(kSymbolKeyFor, symbol); |
72 return %SymbolRegistry().keyFor[symbol]; | 72 return %SymbolRegistry().keyFor[symbol]; |
73 } | 73 } |
74 | 74 |
75 // ------------------------------------------------------------------- | 75 // ------------------------------------------------------------------- |
76 | 76 |
77 utils.InstallConstants(GlobalSymbol, [ | 77 utils.InstallConstants(GlobalSymbol, [ |
78 "hasInstance", hasInstanceSymbol, | 78 // TODO(rossberg): expose when implemented. |
| 79 // "hasInstance", hasInstanceSymbol, |
79 "isConcatSpreadable", isConcatSpreadableSymbol, | 80 "isConcatSpreadable", isConcatSpreadableSymbol, |
80 "iterator", iteratorSymbol, | 81 "iterator", iteratorSymbol, |
81 // TODO(yangguo): expose when implemented. | 82 // TODO(yangguo): expose when implemented. |
82 // "match", matchSymbol, | 83 // "match", matchSymbol, |
83 // "replace", replaceSymbol, | 84 // "replace", replaceSymbol, |
84 // "search", searchSymbol, | 85 // "search", searchSymbol, |
85 // "split, splitSymbol, | 86 // "split, splitSymbol, |
86 "toPrimitive", toPrimitiveSymbol, | 87 "toPrimitive", toPrimitiveSymbol, |
87 // TODO(dslomov, caitp): Currently defined in harmony-tostring.js --- | 88 // TODO(dslomov, caitp): Currently defined in harmony-tostring.js --- |
88 // Move here when shipping | 89 // Move here when shipping |
(...skipping 19 matching lines...) Expand all Loading... |
108 ]); | 109 ]); |
109 | 110 |
110 // ------------------------------------------------------------------- | 111 // ------------------------------------------------------------------- |
111 // Exports | 112 // Exports |
112 | 113 |
113 utils.Export(function(to) { | 114 utils.Export(function(to) { |
114 to.SymbolToString = SymbolToString; | 115 to.SymbolToString = SymbolToString; |
115 }) | 116 }) |
116 | 117 |
117 }) | 118 }) |
OLD | NEW |