Do not internalize in TryConvertKey.

R=jkummerow@chromium.org

Review URL: https://codereview.chromium.org/163213002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19346 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
yangguo@chromium.org 2014-02-13 09:36:20 +00:00
parent fb22b7b05e
commit 6d0077c30c

View File

@ -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;