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

Unified Diff: src/ic.cc

Issue 162983003: Internalize string keys in Keyed{Store,Load}IC. (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 | « src/factory.cc ('k') | src/objects.cc » ('j') | 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 e1405396c1fe90cec1c272f3c7192175c4aad924..0377ba97b2e35ae2cbd4db0d21370f0e54c08379 100644
--- a/src/ic.cc
+++ b/src/ic.cc
@@ -983,6 +983,8 @@ 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();
}
« no previous file with comments | « src/factory.cc ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698