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 2460 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2471 // We only need a scratch register if we have a write barrier or we | 2471 // We only need a scratch register if we have a write barrier or we |
2472 // have a store into the properties array (not in-object-property). | 2472 // have a store into the properties array (not in-object-property). |
2473 LOperand* temp = (!is_in_object || needs_write_barrier || | 2473 LOperand* temp = (!is_in_object || needs_write_barrier || |
2474 needs_write_barrier_for_map) ? TempRegister() : NULL; | 2474 needs_write_barrier_for_map) ? TempRegister() : NULL; |
2475 | 2475 |
2476 // We need a temporary register for write barrier of the map field. | 2476 // We need a temporary register for write barrier of the map field. |
2477 LOperand* temp_map = needs_write_barrier_for_map ? TempRegister() : NULL; | 2477 LOperand* temp_map = needs_write_barrier_for_map ? TempRegister() : NULL; |
2478 | 2478 |
2479 LStoreNamedField* result = | 2479 LStoreNamedField* result = |
2480 new(zone()) LStoreNamedField(obj, val, temp, temp_map); | 2480 new(zone()) LStoreNamedField(obj, val, temp, temp_map); |
2481 if ((FLAG_track_fields && instr->field_representation().IsSmi()) || | 2481 if (FLAG_track_heap_object_fields && |
2482 (FLAG_track_heap_object_fields && | 2482 instr->field_representation().IsHeapObject()) { |
2483 instr->field_representation().IsHeapObject())) { | 2483 if (!instr->value()->type().IsHeapObject()) { |
2484 return AssignEnvironment(result); | 2484 return AssignEnvironment(result); |
| 2485 } |
2485 } | 2486 } |
2486 return result; | 2487 return result; |
2487 } | 2488 } |
2488 | 2489 |
2489 | 2490 |
2490 LInstruction* LChunkBuilder::DoStoreNamedGeneric(HStoreNamedGeneric* instr) { | 2491 LInstruction* LChunkBuilder::DoStoreNamedGeneric(HStoreNamedGeneric* instr) { |
2491 LOperand* context = UseFixed(instr->context(), esi); | 2492 LOperand* context = UseFixed(instr->context(), esi); |
2492 LOperand* object = UseFixed(instr->object(), edx); | 2493 LOperand* object = UseFixed(instr->object(), edx); |
2493 LOperand* value = UseFixed(instr->value(), eax); | 2494 LOperand* value = UseFixed(instr->value(), eax); |
2494 | 2495 |
(...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2780 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { | 2781 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { |
2781 LOperand* object = UseRegister(instr->object()); | 2782 LOperand* object = UseRegister(instr->object()); |
2782 LOperand* index = UseTempRegister(instr->index()); | 2783 LOperand* index = UseTempRegister(instr->index()); |
2783 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index)); | 2784 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index)); |
2784 } | 2785 } |
2785 | 2786 |
2786 | 2787 |
2787 } } // namespace v8::internal | 2788 } } // namespace v8::internal |
2788 | 2789 |
2789 #endif // V8_TARGET_ARCH_IA32 | 2790 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |