Author: [EMAIL PROTECTED]
Date: Thu Nov 20 08:31:22 2008
New Revision: 806
Modified:
branches/bleeding_edge/src/stub-cache-ia32.cc
Log:
Minor cleanup code in GenerateStoreField.
Review URL: http://codereview.chromium.org/11276
Modified: branches/bleeding_edge/src/stub-cache-ia32.cc
==============================================================================
--- branches/bleeding_edge/src/stub-cache-ia32.cc (original)
+++ branches/bleeding_edge/src/stub-cache-ia32.cc Thu Nov 20 08:31:22 2008
@@ -401,16 +401,6 @@
return;
}
- // Adjust for the number of properties stored in the object. Even in the
- // face of a transition we can use the old map here because the size of
the
- // object and the number of in-object properties is not going to change.
- index -= object->map()->inobject_properties();
-
- if (index >= 0) {
- // Get the properties array (optimistically).
- __ mov(scratch, FieldOperand(receiver_reg,
JSObject::kPropertiesOffset));
- }
-
if (transition != NULL) {
// Update the map of the object; no write barrier updating is
// needed because the map is never in new space.
@@ -418,6 +408,11 @@
Immediate(Handle<Map>(transition)));
}
+ // Adjust for the number of properties stored in the object. Even in the
+ // face of a transition we can use the old map here because the size of
the
+ // object and the number of in-object properties is not going to change.
+ index -= object->map()->inobject_properties();
+
if (index < 0) {
// Set the property straight into the object.
int offset = object->map()->instance_size() + (index * kPointerSize);
@@ -430,6 +425,8 @@
} else {
// Write to the properties array.
int offset = index * kPointerSize + Array::kHeaderSize;
+ // Get the properties array (optimistically).
+ __ mov(scratch, FieldOperand(receiver_reg,
JSObject::kPropertiesOffset));
__ mov(FieldOperand(scratch, offset), eax);
// Update the write barrier for the array address.
--~--~---------~--~----~------------~-------~--~----~
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
-~----------~----~----~----~------~----~------~--~---