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

Unified Diff: src/objects.cc

Issue 350023002: More Map methods moved to private part. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed comment and rebased Created 6 years, 6 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.cc » ('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 2f6f86ba6d425586f4c3915fa4cb01b85d01b16a..08a192fbeb720a5a71439c4cd11253bf2b10f7c4 100644
--- a/src/objects.cc
+++ b/src/objects.cc
@@ -2123,7 +2123,7 @@ void JSObject::MigrateToMap(Handle<JSObject> object, Handle<Map> new_map) {
}
-// To migrate an fast instance to a fast map:
+// To migrate a fast instance to a fast map:
// - First check whether the instance needs to be rewritten. If not, simply
// change the map.
// - Otherwise, allocate a fixed array large enough to hold all fields, in
@@ -3979,8 +3979,7 @@ void JSObject::WriteToField(int descriptor, Object* value) {
}
-static void SetPropertyToField(LookupResult* lookup,
- Handle<Object> value) {
+void JSObject::SetPropertyToField(LookupResult* lookup, Handle<Object> value) {
if (lookup->type() == CONSTANT || !lookup->CanHoldValue(value)) {
Representation field_representation = value->OptimalRepresentation();
Handle<HeapType> field_type = value->OptimalType(
@@ -3994,10 +3993,10 @@ static void SetPropertyToField(LookupResult* lookup,
}
-static void ConvertAndSetOwnProperty(LookupResult* lookup,
- Handle<Name> name,
- Handle<Object> value,
- PropertyAttributes attributes) {
+void JSObject::ConvertAndSetOwnProperty(LookupResult* lookup,
+ Handle<Name> name,
+ Handle<Object> value,
+ PropertyAttributes attributes) {
Handle<JSObject> object(lookup->holder());
if (object->TooManyFastProperties()) {
JSObject::NormalizeProperties(object, CLEAR_INOBJECT_PROPERTIES, 0);
@@ -4024,10 +4023,10 @@ static void ConvertAndSetOwnProperty(LookupResult* lookup,
}
-static void SetPropertyToFieldWithAttributes(LookupResult* lookup,
- Handle<Name> name,
- Handle<Object> value,
- PropertyAttributes attributes) {
+void JSObject::SetPropertyToFieldWithAttributes(LookupResult* lookup,
+ Handle<Name> name,
+ Handle<Object> value,
+ PropertyAttributes attributes) {
if (lookup->GetAttributes() == attributes) {
if (value->IsUninitialized()) return;
SetPropertyToField(lookup, value);
@@ -4677,8 +4676,8 @@ void JSObject::MigrateFastToSlow(Handle<JSObject> object,
}
-void JSObject::TransformToFastProperties(Handle<JSObject> object,
- int unused_property_fields) {
+void JSObject::MigrateSlowToFast(Handle<JSObject> object,
+ int unused_property_fields) {
if (object->HasFastProperties()) return;
ASSERT(!object->IsGlobalObject());
Isolate* isolate = object->GetIsolate();
@@ -9913,7 +9912,7 @@ void JSObject::OptimizeAsPrototype(Handle<JSObject> object) {
// Make sure prototypes are fast objects and their maps have the bit set
// so they remain fast.
if (!object->HasFastProperties()) {
- TransformToFastProperties(object, 0);
+ MigrateSlowToFast(object, 0);
}
}
« no previous file with comments | « src/objects.h ('k') | src/runtime.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698