Directly set the value in the descriptors pointer to avoid checks.
authorverwaest@chromium.org <verwaest@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Thu, 13 Sep 2012 16:48:31 +0000 (16:48 +0000)
committerverwaest@chromium.org <verwaest@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Thu, 13 Sep 2012 16:48:31 +0000 (16:48 +0000)
This is the only place from where we are allowed to modify the value of
the descriptors pointer.

Review URL: https://chromiumcodereview.appspot.com/10905266

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12500 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

src/objects.cc

index 0bcabdf..3c193a5 100644 (file)
@@ -1810,7 +1810,8 @@ MaybeObject* JSObject::ConvertTransitionToMapTransition(
     // new_map and install its descriptors in the old_map. Since the old_map
     // stores the descriptors for the new_map, remove the transition array of
     // the new_map that is only in place to store the descriptors.
-    old_map->transitions()->set_descriptors(new_map->instance_descriptors());
+    old_map->transitions()->descriptors_pointer()->set_value(
+        new_map->instance_descriptors());
     new_map->ClearTransitions(GetHeap());
     old_map->set_owns_descriptors(false);
     Map* map;