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

Unified Diff: src/stub-cache.cc

Issue 12296026: ES6 symbols: Implement Symbol intrinsic and basic functionality (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed more comments Created 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/runtime.cc ('k') | src/symbol.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/stub-cache.cc
diff --git a/src/stub-cache.cc b/src/stub-cache.cc
index c481a74c24fc75538ce10f818bafdd64c02443aa..e8f53a1bfcf57571e3b14ea9f43786828648878b 100644
--- a/src/stub-cache.cc
+++ b/src/stub-cache.cc
@@ -572,6 +572,8 @@ Handle<Code> StubCache::ComputeCallConstant(int argc,
CheckType check = RECEIVER_MAP_CHECK;
if (object->IsString()) {
check = STRING_CHECK;
+ } else if (object->IsSymbol()) {
+ check = SYMBOL_CHECK;
} else if (object->IsNumber()) {
check = NUMBER_CHECK;
} else if (object->IsBoolean()) {
@@ -613,7 +615,8 @@ Handle<Code> StubCache::ComputeCallField(int argc,
// TODO(1233596): We cannot do receiver map check for non-JS objects
// because they may be represented as immediates without a
// map. Instead, we check against the map in the holder.
- if (object->IsNumber() || object->IsBoolean() || object->IsString()) {
+ if (object->IsNumber() || object->IsSymbol() ||
+ object->IsBoolean() || object->IsString()) {
object = holder;
}
@@ -651,7 +654,8 @@ Handle<Code> StubCache::ComputeCallInterceptor(int argc,
// TODO(1233596): We cannot do receiver map check for non-JS objects
// because they may be represented as immediates without a
// map. Instead, we check against the map in the holder.
- if (object->IsNumber() || object->IsBoolean() || object->IsString()) {
+ if (object->IsNumber() || object->IsSymbol() ||
+ object->IsBoolean() || object->IsString()) {
object = holder;
}
« no previous file with comments | « src/runtime.cc ('k') | src/symbol.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698