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

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

Issue 6542047: Basic implementation of incremental marking. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/gc
Patch Set: Created 9 years, 10 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: src/ia32/stub-cache-ia32.cc
diff --git a/src/ia32/stub-cache-ia32.cc b/src/ia32/stub-cache-ia32.cc
index c95cf97146a9443f0ba5641e530a27d08b4067da..bf947cb59e095b682690608fd49bde5ee0f1c541 100644
--- a/src/ia32/stub-cache-ia32.cc
+++ b/src/ia32/stub-cache-ia32.cc
@@ -1498,6 +1498,8 @@ MaybeObject* CallStubCompiler::CompileArrayPushCall(Object* object,
__ bind(&with_write_barrier);
+ __ IncrementalMarkingRecordWrite(ebx, ecx, edx);
+
__ InNewSpace(ebx, ecx, equal, &exit);
__ RecordWriteHelper(ebx, edx, ecx, kDontSaveFPRegs);
@@ -2583,13 +2585,9 @@ MaybeObject* StoreStubCompiler::CompileStoreGlobal(GlobalObject* object,
Immediate(Handle<Map>(object->map())));
__ j(not_equal, &miss, not_taken);
-
// Compute the cell operand to use.
- Operand cell_operand = Operand::Cell(Handle<JSGlobalPropertyCell>(cell));
- if (Serializer::enabled()) {
- __ mov(ecx, Immediate(Handle<JSGlobalPropertyCell>(cell)));
- cell_operand = FieldOperand(ecx, JSGlobalPropertyCell::kValueOffset);
- }
+ __ mov(ebx, Immediate(Handle<JSGlobalPropertyCell>(cell)));
+ Operand cell_operand = FieldOperand(ebx, JSGlobalPropertyCell::kValueOffset);
// Check that the value in the cell is not the hole. If it is, this
// cell could have been deleted and reintroducing the global needs
@@ -2600,6 +2598,15 @@ MaybeObject* StoreStubCompiler::CompileStoreGlobal(GlobalObject* object,
// Store the value in the cell.
__ mov(cell_operand, eax);
+ Label done;
+ __ test(eax, Immediate(kSmiTagMask));
+ __ j(zero, &done);
+
+ __ mov(ecx, eax);
+ __ IncrementalMarkingRecordWrite(ebx, ecx, edx);
+
+ // Return the value (register eax).
+ __ bind(&done);
// Return the value (register eax).
__ IncrementCounter(&Counters::named_store_global_inline, 1);

Powered by Google App Engine
This is Rietveld 408576698