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

Unified Diff: src/stub-cache-ia32.cc

Issue 11276: Minor cleanup code in GenerateStoreField. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 12 years, 1 month 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/stub-cache-ia32.cc
===================================================================
--- src/stub-cache-ia32.cc (revision 787)
+++ src/stub-cache-ia32.cc (working copy)
@@ -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));
iposva 2008/11/20 01:10:57 Moving the load of the properties pointer down her
Feng Qian 2008/11/20 16:30:47 Running V8 bench suite (Richards, DeltaBlue, Crypt
__ mov(FieldOperand(scratch, offset), eax);
// Update the write barrier for the array address.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698