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

Unified Diff: runtime/vm/stub_code_ia32.cc

Issue 14307013: - Remember the fact that an object has been added to the (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 8 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
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

Powered by Google App Engine
This is Rietveld 408576698