Reviewers: Jakob,

Description:
Do not internalize in TryConvertKey.

[email protected]

Please review this at https://codereview.chromium.org/163213002/

SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge

Affected files (+4, -6 lines):
  M src/ic.cc


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;


--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to