| Index: src/ia32/lithium-ia32.cc
|
| diff --git a/src/ia32/lithium-ia32.cc b/src/ia32/lithium-ia32.cc
|
| index 1c8d075dcb8713e8ff40ccc3cf3de3bf8b8d6d77..6be247bef781ca63b6903467f1b40e1197bdf666 100644
|
| --- a/src/ia32/lithium-ia32.cc
|
| +++ b/src/ia32/lithium-ia32.cc
|
| @@ -2193,10 +2193,17 @@ LInstruction* LChunkBuilder::DoStoreContextSlot(HStoreContextSlot* instr) {
|
|
|
|
|
| LInstruction* LChunkBuilder::DoLoadNamedField(HLoadNamedField* instr) {
|
| - LOperand* obj = (instr->access().IsExternalMemory() &&
|
| - instr->access().offset() == 0)
|
| - ? UseRegisterOrConstantAtStart(instr->object())
|
| - : UseRegisterAtStart(instr->object());
|
| + LOperand* obj;
|
| + if (instr->access().read_barrier()) {
|
| + DCHECK(!instr->access().IsExternalMemory());
|
| + obj = UseRegister(instr->object());
|
| + } else {
|
| + // With no read barrier we can have the same register for the object and
|
| + // the field.
|
| + obj = (instr->access().IsExternalMemory() && instr->access().offset() == 0)
|
| + ? UseRegisterOrConstantAtStart(instr->object())
|
| + : UseRegisterAtStart(instr->object());
|
| + }
|
| return DefineAsRegister(new(zone()) LLoadNamedField(obj));
|
| }
|
|
|
|
|