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

Unified Diff: src/ic.cc

Issue 163213002: Do not internalize in TryConvertKey. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ic.cc
diff --git a/src/ic.cc b/src/ic.cc
index 0377ba97b2e35ae2cbd4db0d21370f0e54c08379..be29662436d6570887c1f8dec33778002476f214 100644
--- a/src/ic.cc
+++ b/src/ic.cc
@@ -983,8 +983,6 @@ static Handle<Object> TryConvertKey(Handle<Object> key, Isolate* isolate) {
key = Handle<Smi>(Smi::FromInt(int_value), isolate);
}
}
- } else if (key->IsString()) {
- key = isolate->factory()->InternalizeString(Handle<String>::cast(key));
} else if (key->IsUndefined()) {
key = isolate->factory()->undefined_string();
}
@@ -1063,8 +1061,8 @@ MaybeObject* KeyedLoadIC::Load(Handle<Object> object, Handle<Object> key) {
MaybeObject* maybe_object = NULL;
Handle<Code> stub = generic_stub();
- // Check for values that can be converted into an internalized string directly
- // or is representable as a smi.
+ // Check for non-string values that can be converted into an
+ // internalized string directly or is representable as a smi.
key = TryConvertKey(key, isolate());
if (key->IsInternalizedString()) {
@@ -1660,8 +1658,8 @@ MaybeObject* KeyedStoreIC::Store(Handle<Object> object,
return *result;
}
- // Check for values that can be converted into an internalized string directly
- // or is representable as a smi.
+ // Check for non-string values that can be converted into an
+ // internalized string directly or is representable as a smi.
key = TryConvertKey(key, isolate());
MaybeObject* maybe_object = NULL;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698