Index: runtime/vm/stub_code_ia32.cc |
=================================================================== |
--- runtime/vm/stub_code_ia32.cc (revision 22083) |
+++ runtime/vm/stub_code_ia32.cc (working copy) |
@@ -959,6 +959,22 @@ |
__ pushl(EDX); |
__ pushl(ECX); |
+ Label add_to_buffer; |
+ // Check whether this object has already been remembered. Skip adding to the |
+ // store buffer if the object is in the store buffer already. |
+ // Spilled: EDX, ECX |
+ // EAX: Address being stored |
+ __ movl(ECX, FieldAddress(EAX, Object::tags_offset())); |
Vyacheslav Egorov (Google)
2013/04/27 19:34:46
I wonder if doing testl with memory operand before
Ivan Posva
2013/05/03 21:01:37
Different CL.
|
+ __ testl(ECX, Immediate(1 << RawObject::kRememberedBit)); |
+ __ j(EQUAL, &add_to_buffer, Assembler::kNearJump); |
+ __ popl(ECX); |
+ __ popl(EDX); |
+ __ ret(); |
+ |
+ __ Bind(&add_to_buffer); |
+ __ orl(ECX, Immediate(1 << RawObject::kRememberedBit)); |
+ __ movl(FieldAddress(EAX, Object::tags_offset()), ECX); |
+ |
// Load the isolate out of the context. |
// Spilled: EDX, ECX |
// EAX: Address being stored |