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

Unified Diff: runtime/vm/stub_code_arm.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_arm.cc
===================================================================
--- runtime/vm/stub_code_arm.cc (revision 22083)
+++ runtime/vm/stub_code_arm.cc (working copy)
@@ -876,6 +876,21 @@
// Save values being destroyed.
__ PushList((1 << R1) | (1 << R2) | (1 << R3));
+ 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
+ __ ldr(R2, FieldAddress(R0, Object::tags_offset()));
+ __ tst(R2, ShifterOperand(1 << RawObject::kRememberedBit));
+ __ b(&add_to_buffer, EQ);
+ __ PopList((1 << R1) | (1 << R2) | (1 << R3));
+ __ Ret();
+
+ __ Bind(&add_to_buffer);
+ __ orr(R2, R2, ShifterOperand(1 << RawObject::kRememberedBit));
+ __ str(R2, FieldAddress(R0, Object::tags_offset()));
+
// Load the isolate out of the context.
// Spilled: R1, R2, R3.
// R0: address being stored.

Powered by Google App Engine
This is Rietveld 408576698