| Index: src/mips/lithium-mips.cc
|
| diff --git a/src/mips/lithium-mips.cc b/src/mips/lithium-mips.cc
|
| index c2f89867d77577a7a7b59d19209d03466647d9a5..753c663bb79f0625ca217270832fc6aa1c267362 100644
|
| --- a/src/mips/lithium-mips.cc
|
| +++ b/src/mips/lithium-mips.cc
|
| @@ -1988,8 +1988,8 @@ LInstruction* LChunkBuilder::DoStoreContextSlot(HStoreContextSlot* instr) {
|
|
|
|
|
| LInstruction* LChunkBuilder::DoLoadNamedField(HLoadNamedField* instr) {
|
| - return DefineAsRegister(
|
| - new(zone()) LLoadNamedField(UseRegisterAtStart(instr->object())));
|
| + LOperand* obj = UseRegisterAtStart(instr->object());
|
| + return DefineAsRegister(new(zone()) LLoadNamedField(obj));
|
| }
|
|
|
|
|
| @@ -2194,14 +2194,20 @@ LInstruction* LChunkBuilder::DoStoreNamedField(HStoreNamedField* instr) {
|
| : UseRegisterAtStart(instr->object());
|
| }
|
|
|
| - LOperand* val = needs_write_barrier
|
| - ? UseTempRegister(instr->value())
|
| - : UseRegister(instr->value());
|
| + LOperand* val =
|
| + needs_write_barrier ||
|
| + (FLAG_track_fields && instr->field_representation().IsSmi())
|
| + ? UseTempRegister(instr->value()) : UseRegister(instr->value());
|
|
|
| // We need a temporary register for write barrier of the map field.
|
| LOperand* temp = needs_write_barrier_for_map ? TempRegister() : NULL;
|
|
|
| - return new(zone()) LStoreNamedField(obj, val, temp);
|
| + LStoreNamedField* result = new(zone()) LStoreNamedField(obj, val, temp);
|
| + if ((FLAG_track_fields && instr->field_representation().IsSmi()) ||
|
| + (FLAG_track_double_fields && instr->field_representation().IsDouble())) {
|
| + return AssignEnvironment(result);
|
| + }
|
| + return result;
|
| }
|
|
|
|
|
|
|