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 // TODO(rossberg): expose when implemented. | 78 "hasInstance", hasInstanceSymbol, |
79 // "hasInstance", hasInstanceSymbol, | |
80 "isConcatSpreadable", isConcatSpreadableSymbol, | 79 "isConcatSpreadable", isConcatSpreadableSymbol, |
81 "iterator", iteratorSymbol, | 80 "iterator", iteratorSymbol, |
82 // TODO(yangguo): expose when implemented. | 81 // TODO(yangguo): expose when implemented. |
83 // "match", matchSymbol, | 82 // "match", matchSymbol, |
84 // "replace", replaceSymbol, | 83 // "replace", replaceSymbol, |
85 // "search", searchSymbol, | 84 // "search", searchSymbol, |
86 // "split, splitSymbol, | 85 // "split, splitSymbol, |
87 "toPrimitive", toPrimitiveSymbol, | 86 "toPrimitive", toPrimitiveSymbol, |
88 // TODO(dslomov, caitp): Currently defined in harmony-tostring.js --- | 87 // TODO(dslomov, caitp): Currently defined in harmony-tostring.js --- |
89 // Move here when shipping | 88 // Move here when shipping |
(...skipping 19 matching lines...) Expand all Loading... |
109 ]); | 108 ]); |
110 | 109 |
111 // ------------------------------------------------------------------- | 110 // ------------------------------------------------------------------- |
112 // Exports | 111 // Exports |
113 | 112 |
114 utils.Export(function(to) { | 113 utils.Export(function(to) { |
115 to.SymbolToString = SymbolToString; | 114 to.SymbolToString = SymbolToString; |
116 }) | 115 }) |
117 | 116 |
118 }) | 117 }) |
OLD | NEW |