| Index: src/ia32/lithium-ia32.cc
|
| diff --git a/src/ia32/lithium-ia32.cc b/src/ia32/lithium-ia32.cc
|
| index 51a9b62fb25b1fda34be603146569fc310595329..811d1561816a2d8e72ba44c48acc780e6a07f9ac 100644
|
| --- a/src/ia32/lithium-ia32.cc
|
| +++ b/src/ia32/lithium-ia32.cc
|
| @@ -2171,10 +2171,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));
|
| }
|
|
|
|
|