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

Unified Diff: src/heap.cc

Issue 265553003: StringTable::Lookup*IfExist() handlified. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 8 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/heap.h ('k') | src/objects.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap.cc
diff --git a/src/heap.cc b/src/heap.cc
index 2c5d9862f83cdd093afbaf8d6ea50029c7816ee6..afe0faaecaefb53a62dda969444f44468dcc737f 100644
--- a/src/heap.cc
+++ b/src/heap.cc
@@ -4675,15 +4675,6 @@ void Heap::Verify() {
#endif
-bool Heap::InternalizeStringIfExists(String* string, String** result) {
- if (string->IsInternalizedString()) {
- *result = string;
- return true;
- }
- return string_table()->LookupStringIfExists(string, result);
-}
-
-
void Heap::ZapFromSpace() {
NewSpacePageIterator it(new_space_.FromSpaceStart(),
new_space_.FromSpaceEnd());
@@ -6262,12 +6253,11 @@ void KeyedLookupCache::Update(Handle<Map> map,
Handle<Name> name,
int field_offset) {
if (!name->IsUniqueName()) {
- String* internalized_string;
- if (!map->GetIsolate()->heap()->InternalizeStringIfExists(
- String::cast(*name), &internalized_string)) {
+ if (!StringTable::InternalizeStringIfExists(name->GetIsolate(),
+ Handle<String>::cast(name)).
+ ToHandle(&name)) {
return;
}
- name = handle(internalized_string);
}
// This cache is cleared only between mark compact passes, so we expect the
// cache to only contain old space names.
« no previous file with comments | « src/heap.h ('k') | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698