Chromium Code Reviews| Index: src/ia32/macro-assembler-ia32.cc |
| diff --git a/src/ia32/macro-assembler-ia32.cc b/src/ia32/macro-assembler-ia32.cc |
| index 440954cae6ca0a3c1a4053f529f2b377d076eb57..22e22b1d68910b662568f9ace274eaf53427e829 100644 |
| --- a/src/ia32/macro-assembler-ia32.cc |
| +++ b/src/ia32/macro-assembler-ia32.cc |
| @@ -32,6 +32,7 @@ |
| #include "bootstrapper.h" |
| #include "codegen.h" |
| #include "debug.h" |
| +#include "macro-assembler-ia32-inl.h" |
| #include "runtime.h" |
| #include "serialize.h" |
| @@ -216,6 +217,15 @@ void MacroAssembler::RecordWrite(Register object, |
| FLAG_incremental_marking == false) { |
| return; |
| } |
| + |
| + if (FLAG_debug_code) { |
| + NearLabel ok; |
| + cmp(value, Operand(address, 0)); |
| + j(equal, &ok); |
| + Abort("Registers did not match in write barrier"); |
| + bind(&ok); |
| + } |
| + |
| // First, check if a write barrier is even needed. The tests below |
| // catch stores of Smis and stores into young gen. |
| NearLabel done; |
| @@ -227,12 +237,21 @@ void MacroAssembler::RecordWrite(Register object, |
| j(zero, &done); |
| } |
| + CheckPageFlag(value, |
| + value, |
|
Erik Corry
2011/05/11 18:53:57
Add comment that value is used as scratch here.
Vyacheslav Egorov (Chromium)
2011/05/13 11:06:52
Done.
|
| + MemoryChunk::CONTAINS_INTERESTING_VALUES, |
| + zero, |
| + &done); |
| + CheckPageFlag(object, |
| + value, |
| + MemoryChunk::CONTAINS_INTERESTING_DESTINATIONS, |
| + zero, |
| + &done); |
| + |
| RecordWriteStub stub(object, value, address, emit_remembered_set, fp_mode); |
| CallStub(&stub); |
| - if (smi_check == INLINE_SMI_CHECK) { |
| - bind(&done); |
| - } |
| + bind(&done); |
| // Clobber clobbered registers when running with the debug-code flag |
| // turned on to provoke errors. |