Revision: 19345
Author: [email protected]
Date: Thu Feb 13 08:43:53 2014 UTC
Log: Internalize string keys in Keyed{Store,Load}IC.
[email protected]
BUG=v8:3144
LOG=N
Review URL: https://codereview.chromium.org/162983003
http://code.google.com/p/v8/source/detail?r=19345
Modified:
/branches/bleeding_edge/src/factory.cc
/branches/bleeding_edge/src/factory.h
/branches/bleeding_edge/src/ic.cc
/branches/bleeding_edge/src/objects.cc
/branches/bleeding_edge/test/cctest/test-api.cc
=======================================
--- /branches/bleeding_edge/src/factory.cc Tue Feb 11 09:29:51 2014 UTC
+++ /branches/bleeding_edge/src/factory.cc Thu Feb 13 08:43:53 2014 UTC
@@ -1298,12 +1298,6 @@
isolate()->heap()->CopyCode(*code, reloc_info),
Code);
}
-
-
-Handle<String> Factory::InternalizedStringFromString(Handle<String> value)
{
- CALL_HEAP_FUNCTION(isolate(),
- isolate()->heap()->InternalizeString(*value), String);
-}
Handle<JSObject> Factory::NewJSObject(Handle<JSFunction> constructor,
=======================================
--- /branches/bleeding_edge/src/factory.h Tue Feb 11 09:29:51 2014 UTC
+++ /branches/bleeding_edge/src/factory.h Thu Feb 13 08:43:53 2014 UTC
@@ -225,9 +225,6 @@
Handle<Context> previous,
Handle<ScopeInfo> scope_info);
- // Return the internalized version of the passed in string.
- Handle<String> InternalizedStringFromString(Handle<String> value);
-
// Allocate a new struct. The struct is pretenured (allocated directly
in
// the old generation).
Handle<Struct> NewStruct(InstanceType type);
=======================================
--- /branches/bleeding_edge/src/ic.cc Tue Feb 11 15:01:44 2014 UTC
+++ /branches/bleeding_edge/src/ic.cc Thu Feb 13 08:43:53 2014 UTC
@@ -983,6 +983,8 @@
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();
}
=======================================
--- /branches/bleeding_edge/src/objects.cc Tue Feb 11 15:01:44 2014 UTC
+++ /branches/bleeding_edge/src/objects.cc Thu Feb 13 08:43:53 2014 UTC
@@ -732,7 +732,7 @@
Handle<NameDictionary>
property_dictionary(object->property_dictionary());
if (!name->IsUniqueName()) {
- name = object->GetIsolate()->factory()->InternalizedStringFromString(
+ name = object->GetIsolate()->factory()->InternalizeString(
Handle<String>::cast(name));
}
@@ -2152,7 +2152,7 @@
Isolate* isolate = object->GetIsolate();
if (!name->IsUniqueName()) {
- name = isolate->factory()->InternalizedStringFromString(
+ name = isolate->factory()->InternalizeString(
Handle<String>::cast(name));
}
@@ -3135,7 +3135,7 @@
Handle<AccessorInfo> entry(AccessorInfo::cast(callbacks->get(i)));
if (entry->name()->IsUniqueName()) continue;
Handle<String> key =
- isolate->factory()->InternalizedStringFromString(
+ isolate->factory()->InternalizeString(
Handle<String>(String::cast(entry->name())));
entry->set_name(*key);
}
=======================================
--- /branches/bleeding_edge/test/cctest/test-api.cc Wed Feb 12 22:04:19
2014 UTC
+++ /branches/bleeding_edge/test/cctest/test-api.cc Thu Feb 13 08:43:53
2014 UTC
@@ -764,7 +764,7 @@
CcTest::heap()->CollectGarbage(i::NEW_SPACE); // in survivor space now
CcTest::heap()->CollectGarbage(i::NEW_SPACE); // in old gen now
i::Handle<i::String> isymbol =
- factory->InternalizedStringFromString(istring);
+ factory->InternalizeString(istring);
CHECK(isymbol->IsInternalizedString());
}
CcTest::heap()->CollectAllGarbage(i::Heap::kNoGCFlags);
@@ -784,7 +784,7 @@
CcTest::heap()->CollectGarbage(i::NEW_SPACE); // in survivor space now
CcTest::heap()->CollectGarbage(i::NEW_SPACE); // in old gen now
i::Handle<i::String> isymbol =
- factory->InternalizedStringFromString(istring);
+ factory->InternalizeString(istring);
CHECK(isymbol->IsInternalizedString());
}
CcTest::heap()->CollectAllGarbage(i::Heap::kNoGCFlags);
--
--
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.