OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 2269 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2280 } else { | 2280 } else { |
2281 val = UseRegister(instr->value()); | 2281 val = UseRegister(instr->value()); |
2282 } | 2282 } |
2283 | 2283 |
2284 // We only need a scratch register if we have a write barrier or we | 2284 // We only need a scratch register if we have a write barrier or we |
2285 // have a store into the properties array (not in-object-property). | 2285 // have a store into the properties array (not in-object-property). |
2286 LOperand* temp = (!is_in_object || needs_write_barrier || | 2286 LOperand* temp = (!is_in_object || needs_write_barrier || |
2287 needs_write_barrier_for_map) ? TempRegister() : NULL; | 2287 needs_write_barrier_for_map) ? TempRegister() : NULL; |
2288 | 2288 |
2289 LStoreNamedField* result = new(zone()) LStoreNamedField(obj, val, temp); | 2289 LStoreNamedField* result = new(zone()) LStoreNamedField(obj, val, temp); |
2290 if ((FLAG_track_fields && instr->field_representation().IsSmi()) || | 2290 if (FLAG_track_heap_object_fields && |
2291 (FLAG_track_heap_object_fields && | 2291 instr->field_representation().IsHeapObject()) { |
2292 instr->field_representation().IsHeapObject())) { | 2292 if (!instr->value()->type().IsHeapObject()) { |
2293 return AssignEnvironment(result); | 2293 return AssignEnvironment(result); |
| 2294 } |
2294 } | 2295 } |
2295 return result; | 2296 return result; |
2296 } | 2297 } |
2297 | 2298 |
2298 | 2299 |
2299 LInstruction* LChunkBuilder::DoStoreNamedGeneric(HStoreNamedGeneric* instr) { | 2300 LInstruction* LChunkBuilder::DoStoreNamedGeneric(HStoreNamedGeneric* instr) { |
2300 LOperand* object = UseFixed(instr->object(), rdx); | 2301 LOperand* object = UseFixed(instr->object(), rdx); |
2301 LOperand* value = UseFixed(instr->value(), rax); | 2302 LOperand* value = UseFixed(instr->value(), rax); |
2302 | 2303 |
2303 LStoreNamedGeneric* result = new(zone()) LStoreNamedGeneric(object, value); | 2304 LStoreNamedGeneric* result = new(zone()) LStoreNamedGeneric(object, value); |
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2567 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { | 2568 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { |
2568 LOperand* object = UseRegister(instr->object()); | 2569 LOperand* object = UseRegister(instr->object()); |
2569 LOperand* index = UseTempRegister(instr->index()); | 2570 LOperand* index = UseTempRegister(instr->index()); |
2570 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index)); | 2571 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index)); |
2571 } | 2572 } |
2572 | 2573 |
2573 | 2574 |
2574 } } // namespace v8::internal | 2575 } } // namespace v8::internal |
2575 | 2576 |
2576 #endif // V8_TARGET_ARCH_X64 | 2577 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |