Chromium Code Reviews| Index: runtime/vm/assembler_ia32.h |
| =================================================================== |
| --- runtime/vm/assembler_ia32.h (revision 42599) |
| +++ runtime/vm/assembler_ia32.h (working copy) |
| @@ -536,6 +536,7 @@ |
| void testl(Register reg1, Register reg2); |
| void testl(Register reg, const Immediate& imm); |
| + void testb(const Address& address, const Immediate& imm); |
| void andl(Register dst, const Immediate& imm); |
| void andl(Register dst, Register src); |
| @@ -668,6 +669,14 @@ |
| void CompareObject(Register reg, const Object& object); |
| void LoadDoubleConstant(XmmRegister dst, double value); |
| + // When storing into a heap object field, knowledge of the previous content |
| + // is expressed through these constants. |
| + enum FieldContent { |
| + kEmptySmiOrNull, // Empty = garbage/zapped in release/debug mode. |
|
Ivan Posva
2015/01/08 19:34:51
Does this mean an empty Smi or kEmptyOrSmiOrNull?
koda
2015/01/08 20:25:34
Renamed to clarify.
|
| + kHeapObjectOrSmi, |
| + kOnlySmi, |
| + }; |
| + |
| void StoreIntoObject(Register object, // Object we are storing into. |
| const Address& dest, // Where we are storing into. |
| Register value, // Value we are storing. |
| @@ -675,10 +684,22 @@ |
| void StoreIntoObjectNoBarrier(Register object, |
| const Address& dest, |
| - Register value); |
| + Register value, |
| + FieldContent old_content = kHeapObjectOrSmi); |
| + void InitializeFieldNoBarrier(Register object, |
| + const Address& dest, |
| + Register value) { |
| + return StoreIntoObjectNoBarrier(object, dest, value, kEmptySmiOrNull); |
| + } |
| void StoreIntoObjectNoBarrier(Register object, |
| const Address& dest, |
| - const Object& value); |
| + const Object& value, |
| + FieldContent old_content = kHeapObjectOrSmi); |
| + void InitializeFieldNoBarrier(Register object, |
| + const Address& dest, |
| + const Object& value) { |
| + return StoreIntoObjectNoBarrier(object, dest, value, kEmptySmiOrNull); |
| + } |
| // Stores a Smi value into a heap object field that always contains a Smi. |
| void StoreIntoSmiField(const Address& dest, Register value); |
| @@ -945,11 +966,17 @@ |
| void StoreIntoObjectFilterNoSmi(Register object, |
| Register value, |
| Label* no_update); |
| - |
| - // Analogous to VerifiedMemory::Verify(address, kWordSize). |
| - void VerifyHeapWord(const Address& address); |
| - // Analogous to VerifiedMemory::Write. |
| - void VerifiedWrite(const Address& dest, Register value); |
| +#if defined(DEBUG) |
| + void VerifyUninitialized(const Address& address); |
| + void VerifyObjectOrSmi(const Address& address); |
| + void VerifySmi(const Address& address, const char* stop_msg = "Expected Smi"); |
| +#endif // DEBUG |
| + // Like VerifiedMemory::Verify(address, kWordSize) and ::Write, but also, |
| + // in DEBUG mode, verifies that 'address' has content of type 'old_content'. |
| + void VerifyHeapWord(const Address& address, FieldContent old_content); |
| + void VerifiedWrite(const Address& dest, |
| + Register value, |
| + FieldContent old_content); |
| void UnverifiedStoreOldObject(const Address& dest, const Object& value); |
| int32_t jit_cookie(); |