| Index: src/x64/lithium-x64.cc
|
| diff --git a/src/x64/lithium-x64.cc b/src/x64/lithium-x64.cc
|
| index bb2545048338e7b41ef717d9901bf0ab7db64221..2095a5db43b56600cbbc4e917306fcf775957de7 100644
|
| --- a/src/x64/lithium-x64.cc
|
| +++ b/src/x64/lithium-x64.cc
|
| @@ -2031,9 +2031,10 @@ LInstruction* LChunkBuilder::DoStoreContextSlot(HStoreContextSlot* instr) {
|
|
|
|
|
| LInstruction* LChunkBuilder::DoLoadNamedField(HLoadNamedField* instr) {
|
| - ASSERT(instr->representation().IsTagged());
|
| LOperand* obj = UseRegisterAtStart(instr->object());
|
| - return DefineAsRegister(new(zone()) LLoadNamedField(obj));
|
| + LOperand* temp = instr->representation().IsDouble() ? TempRegister() : NULL;
|
| + ASSERT(temp == NULL || FLAG_track_double_fields);
|
| + return DefineAsRegister(new(zone()) LLoadNamedField(obj, temp));
|
| }
|
|
|
|
|
| @@ -2270,8 +2271,12 @@ LInstruction* LChunkBuilder::DoStoreNamedField(HStoreNamedField* instr) {
|
| LOperand* val;
|
| if (needs_write_barrier) {
|
| val = UseTempRegister(instr->value());
|
| - } else if (StoreConstantValueAllowed(instr->value())) {
|
| + } else if (StoreConstantValueAllowed(instr->value()) &&
|
| + !(FLAG_track_double_fields &&
|
| + instr->field_representation().IsDouble())) {
|
| val = UseRegisterOrConstant(instr->value());
|
| + } else if (FLAG_track_fields && instr->field_representation().IsSmi()) {
|
| + val = UseTempRegister(instr->value());
|
| } else {
|
| val = UseRegister(instr->value());
|
| }
|
| @@ -2281,7 +2286,12 @@ LInstruction* LChunkBuilder::DoStoreNamedField(HStoreNamedField* instr) {
|
| LOperand* temp = (!instr->is_in_object() || needs_write_barrier ||
|
| 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;
|
| }
|
|
|
|
|
|
|