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

Unified Diff: src/ia32/lithium-codegen-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/lithium-codegen-ia32.cc
diff --git a/src/ia32/lithium-codegen-ia32.cc b/src/ia32/lithium-codegen-ia32.cc
index 020518db0d0c6e60223e0278cf0ffbe4d61852b4..2b1d2967bbfa1af189534b454a147240b9324737 100644
--- a/src/ia32/lithium-codegen-ia32.cc
+++ b/src/ia32/lithium-codegen-ia32.cc
@@ -1937,20 +1937,30 @@ void LCodeGen::DoLoadGlobal(LLoadGlobal* instr) {
void LCodeGen::DoStoreGlobal(LStoreGlobal* instr) {
+ Register object = ToRegister(instr->temp1());
+ Register scratch = ToRegister(instr->temp2());
Register value = ToRegister(instr->InputAt(0));
- Operand cell_operand = Operand::Cell(instr->hydrogen()->cell());
+ Handle<JSGlobalPropertyCell> cell_handle(instr->hydrogen()->cell());
// If the cell we are storing to contains the hole it could have
// been deleted from the property dictionary. In that case, we need
// to update the property details in the property dictionary to mark
// it as no longer deleted. We deoptimize in that case.
if (instr->hydrogen()->check_hole_value()) {
- __ cmp(cell_operand, Factory::the_hole_value());
+ __ cmp(Operand::Cell(cell_handle), Factory::the_hole_value());
DeoptimizeIf(equal, instr->environment());
}
// Store the value.
- __ mov(cell_operand, value);
+ __ mov(object, Immediate(cell_handle));
+ __ mov(FieldOperand(object, JSGlobalPropertyCell::kValueOffset), value);
+
+ NearLabel done;
+ __ test(value, Immediate(kSmiTagMask));
+ __ j(zero, &done);
+ __ IncrementalMarkingRecordWrite(object, value, scratch);
Erik Corry 2011/02/22 12:27:19 This looks rather horrible in terms of some perfor
Vyacheslav Egorov (Chromium) 2011/02/23 14:31:46 Yes.
+ __ bind(&done);
+
}

Powered by Google App Engine
This is Rietveld 408576698