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

Side by Side Diff: src/symbol.js

Issue 1323543002: [runtime] Replace %to_string_fun with %_ToString. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@ToStringStub
Patch Set: REBASE. Fixes Created 5 years, 2 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/string-iterator.js ('k') | src/uri.js » ('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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 function SymbolValueOf() { 51 function SymbolValueOf() {
52 if (!(IS_SYMBOL(this) || IS_SYMBOL_WRAPPER(this))) { 52 if (!(IS_SYMBOL(this) || IS_SYMBOL_WRAPPER(this))) {
53 throw MakeTypeError(kIncompatibleMethodReceiver, 53 throw MakeTypeError(kIncompatibleMethodReceiver,
54 "Symbol.prototype.valueOf", this); 54 "Symbol.prototype.valueOf", this);
55 } 55 }
56 return %_ValueOf(this); 56 return %_ValueOf(this);
57 } 57 }
58 58
59 59
60 function SymbolFor(key) { 60 function SymbolFor(key) {
61 key = TO_STRING_INLINE(key); 61 key = TO_STRING(key);
62 var registry = %SymbolRegistry(); 62 var registry = %SymbolRegistry();
63 if (IS_UNDEFINED(registry.for[key])) { 63 if (IS_UNDEFINED(registry.for[key])) {
64 var symbol = %CreateSymbol(key); 64 var symbol = %CreateSymbol(key);
65 registry.for[key] = symbol; 65 registry.for[key] = symbol;
66 registry.keyFor[symbol] = key; 66 registry.keyFor[symbol] = key;
67 } 67 }
68 return registry.for[key]; 68 return registry.for[key];
69 } 69 }
70 70
71 71
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 ]); 125 ]);
126 126
127 // ------------------------------------------------------------------- 127 // -------------------------------------------------------------------
128 // Exports 128 // Exports
129 129
130 utils.Export(function(to) { 130 utils.Export(function(to) {
131 to.SymbolToString = SymbolToString; 131 to.SymbolToString = SymbolToString;
132 }) 132 })
133 133
134 }) 134 })
OLDNEW
« no previous file with comments | « src/string-iterator.js ('k') | src/uri.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698