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

Unified Diff: src/objects.cc

Issue 236133005: Handlify Runtime::InitializeIntrinsicFunctionNames. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: addressed comments. 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/objects.h ('k') | src/runtime.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects.cc
diff --git a/src/objects.cc b/src/objects.cc
index 4061f61a8c17b45b89cd2393bbbae3a0810446f5..d35110fdb56f3dfa7d9b25a324ec56e2908eb5c2 100644
--- a/src/objects.cc
+++ b/src/objects.cc
@@ -633,17 +633,6 @@ void JSObject::SetNormalizedProperty(Handle<JSObject> object,
}
-// TODO(mstarzinger): Temporary wrapper until handlified.
-static Handle<NameDictionary> NameDictionaryAdd(Handle<NameDictionary> dict,
- Handle<Name> name,
- Handle<Object> value,
- PropertyDetails details) {
- CALL_HEAP_FUNCTION(dict->GetIsolate(),
- dict->Add(*name, *value, details),
- NameDictionary);
-}
-
-
void JSObject::SetNormalizedProperty(Handle<JSObject> object,
Handle<Name> name,
Handle<Object> value,
@@ -664,7 +653,7 @@ void JSObject::SetNormalizedProperty(Handle<JSObject> object,
}
property_dictionary =
- NameDictionaryAdd(property_dictionary, name, store_value, details);
+ NameDictionary::Add(property_dictionary, name, store_value, details);
object->set_properties(*property_dictionary);
return;
}
@@ -1944,7 +1933,8 @@ void JSObject::AddSlowProperty(Handle<JSObject> object,
value = cell;
}
PropertyDetails details = PropertyDetails(attributes, NORMAL, 0);
- Handle<NameDictionary> result = NameDictionaryAdd(dict, name, value, details);
+ Handle<NameDictionary> result =
+ NameDictionary::Add(dict, name, value, details);
if (*dict != *result) object->set_properties(*result);
}
@@ -4503,7 +4493,7 @@ void JSObject::NormalizeProperties(Handle<JSObject> object,
Handle<Object> value(descs->GetConstant(i), isolate);
PropertyDetails d = PropertyDetails(
details.attributes(), NORMAL, i + 1);
- dictionary = NameDictionaryAdd(dictionary, key, value, d);
+ dictionary = NameDictionary::Add(dictionary, key, value, d);
break;
}
case FIELD: {
@@ -4512,7 +4502,7 @@ void JSObject::NormalizeProperties(Handle<JSObject> object,
object->RawFastPropertyAt(descs->GetFieldIndex(i)), isolate);
PropertyDetails d =
PropertyDetails(details.attributes(), NORMAL, i + 1);
- dictionary = NameDictionaryAdd(dictionary, key, value, d);
+ dictionary = NameDictionary::Add(dictionary, key, value, d);
break;
}
case CALLBACKS: {
@@ -4520,7 +4510,7 @@ void JSObject::NormalizeProperties(Handle<JSObject> object,
Handle<Object> value(descs->GetCallbacksObject(i), isolate);
PropertyDetails d = PropertyDetails(
details.attributes(), CALLBACKS, i + 1);
- dictionary = NameDictionaryAdd(dictionary, key, value, d);
+ dictionary = NameDictionary::Add(dictionary, key, value, d);
break;
}
case INTERCEPTOR:
@@ -14303,6 +14293,17 @@ template
int HashTable<SeededNumberDictionaryShape, uint32_t>::FindEntry(uint32_t);
+Handle<NameDictionary> NameDictionary::Add(Handle<NameDictionary> dict,
+ Handle<Name> name,
+ Handle<Object> value,
+ PropertyDetails details) {
+ CALL_HEAP_FUNCTION(dict->GetIsolate(),
+ Handle<Dictionary>::cast(dict)->Add(
+ *name, *value, details),
+ NameDictionary);
+}
+
+
Handle<Object> JSObject::PrepareSlowElementsForSort(
Handle<JSObject> object, uint32_t limit) {
CALL_HEAP_FUNCTION(object->GetIsolate(),
@@ -14834,7 +14835,7 @@ Handle<PropertyCell> JSGlobalObject::EnsurePropertyCell(
isolate->factory()->the_hole_value());
PropertyDetails details(NONE, NORMAL, 0);
details = details.AsDeleted();
- Handle<NameDictionary> dictionary = NameDictionaryAdd(
+ Handle<NameDictionary> dictionary = NameDictionary::Add(
handle(global->property_dictionary()), name, cell, details);
global->set_properties(*dictionary);
return cell;
« no previous file with comments | « src/objects.h ('k') | src/runtime.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698