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

Unified Diff: runtime/vm/stub_code_x64.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
« runtime/vm/stub_code_ia32.cc ('K') | « runtime/vm/stub_code_ia32.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/stub_code_x64.cc
===================================================================
--- runtime/vm/stub_code_x64.cc (revision 22083)
+++ runtime/vm/stub_code_x64.cc (working copy)
@@ -948,6 +948,22 @@
__ pushq(RDX);
__ pushq(RCX);
+ 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
+ __ movq(RCX, FieldAddress(RAX, Object::tags_offset()));
+ __ testq(RCX, Immediate(1 << RawObject::kRememberedBit));
+ __ j(EQUAL, &add_to_buffer, Assembler::kNearJump);
+ __ popq(RCX);
+ __ popq(RDX);
+ __ ret();
+
+ __ Bind(&add_to_buffer);
+ __ orq(RCX, Immediate(1 << RawObject::kRememberedBit));
+ __ movq(FieldAddress(RAX, Object::tags_offset()), RCX);
+
// Load the isolate out of the context.
// RAX: Address being stored
__ movq(RDX, FieldAddress(CTX, Context::isolate_offset()));
« runtime/vm/stub_code_ia32.cc ('K') | « runtime/vm/stub_code_ia32.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698