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

Unified Diff: src/objects.cc

Issue 236823003: Reland "Handlify Runtime::InitializeIntrinsicFunctionNames." (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: fix 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 cadfb506f72868ac16a80a422c8e7e636036c8ea..dc72238725b04fa48c3391f5f019c063911de677 100644
--- a/src/objects.cc
+++ b/src/objects.cc
@@ -629,17 +629,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,
@@ -659,8 +648,8 @@ void JSObject::SetNormalizedProperty(Handle<JSObject> object,
store_value = object->GetIsolate()->factory()->NewPropertyCell(value);
}
- property_dictionary =
- NameDictionaryAdd(property_dictionary, name, store_value, details);
+ property_dictionary = NameDictionary::AddNameEntry(
+ property_dictionary, name, store_value, details);
object->set_properties(*property_dictionary);
return;
}
@@ -1940,7 +1929,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::AddNameEntry(dict, name, value, details);
if (*dict != *result) object->set_properties(*result);
}
@@ -4499,7 +4489,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::AddNameEntry(dictionary, key, value, d);
break;
}
case FIELD: {
@@ -4508,7 +4498,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::AddNameEntry(dictionary, key, value, d);
break;
}
case CALLBACKS: {
@@ -4516,7 +4506,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::AddNameEntry(dictionary, key, value, d);
break;
}
case INTERCEPTOR:
@@ -14291,6 +14281,16 @@ template
int HashTable<SeededNumberDictionaryShape, uint32_t>::FindEntry(uint32_t);
+Handle<NameDictionary> NameDictionary::AddNameEntry(Handle<NameDictionary> dict,
+ Handle<Name> name,
+ Handle<Object> value,
+ PropertyDetails details) {
+ CALL_HEAP_FUNCTION(dict->GetIsolate(),
+ dict->Add(*name, *value, details),
+ NameDictionary);
+}
+
+
Handle<Object> JSObject::PrepareSlowElementsForSort(
Handle<JSObject> object, uint32_t limit) {
CALL_HEAP_FUNCTION(object->GetIsolate(),
@@ -14822,7 +14822,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::AddNameEntry(
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