Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(334)

Side by Side Diff: src/js/symbol.js

Issue 1683043003: Implement symbol @@hasInstance for ES6 instanceof support. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix broken test. Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/heap-symbols.h ('k') | test/cctest/cctest.status » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 })
OLDNEW
« no previous file with comments | « src/heap-symbols.h ('k') | test/cctest/cctest.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698