Chromium Code Reviews| 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 2453 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2464 // We only need a scratch register if we have a write barrier or we | 2464 // We only need a scratch register if we have a write barrier or we |
| 2465 // have a store into the properties array (not in-object-property). | 2465 // have a store into the properties array (not in-object-property). |
| 2466 LOperand* temp = (!is_in_object || needs_write_barrier || | 2466 LOperand* temp = (!is_in_object || needs_write_barrier || |
| 2467 needs_write_barrier_for_map) ? TempRegister() : NULL; | 2467 needs_write_barrier_for_map) ? TempRegister() : NULL; |
| 2468 | 2468 |
| 2469 // We need a temporary register for write barrier of the map field. | 2469 // We need a temporary register for write barrier of the map field. |
| 2470 LOperand* temp_map = needs_write_barrier_for_map ? TempRegister() : NULL; | 2470 LOperand* temp_map = needs_write_barrier_for_map ? TempRegister() : NULL; |
| 2471 | 2471 |
| 2472 LStoreNamedField* result = | 2472 LStoreNamedField* result = |
| 2473 new(zone()) LStoreNamedField(obj, val, temp, temp_map); | 2473 new(zone()) LStoreNamedField(obj, val, temp, temp_map); |
| 2474 if ((FLAG_track_fields && instr->field_representation().IsSmi()) || | 2474 if (FLAG_track_fields && instr->field_representation().IsSmi()) { |
| 2475 (FLAG_track_heap_object_fields && | 2475 if (!instr->value()->range()->IsInSmiRange()) { |
|
danno
2013/06/06 07:54:19
See comment above.
| |
| 2476 instr->field_representation().IsHeapObject())) { | 2476 return AssignEnvironment(result); |
| 2477 return AssignEnvironment(result); | 2477 } |
| 2478 } else if (FLAG_track_heap_object_fields && | |
| 2479 instr->field_representation().IsHeapObject()) { | |
| 2480 if (!instr->value()->type().IsHeapObject()) { | |
| 2481 return AssignEnvironment(result); | |
| 2482 } | |
| 2478 } | 2483 } |
| 2479 return result; | 2484 return result; |
| 2480 } | 2485 } |
| 2481 | 2486 |
| 2482 | 2487 |
| 2483 LInstruction* LChunkBuilder::DoStoreNamedGeneric(HStoreNamedGeneric* instr) { | 2488 LInstruction* LChunkBuilder::DoStoreNamedGeneric(HStoreNamedGeneric* instr) { |
| 2484 LOperand* context = UseFixed(instr->context(), esi); | 2489 LOperand* context = UseFixed(instr->context(), esi); |
| 2485 LOperand* object = UseFixed(instr->object(), edx); | 2490 LOperand* object = UseFixed(instr->object(), edx); |
| 2486 LOperand* value = UseFixed(instr->value(), eax); | 2491 LOperand* value = UseFixed(instr->value(), eax); |
| 2487 | 2492 |
| (...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2773 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { | 2778 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { |
| 2774 LOperand* object = UseRegister(instr->object()); | 2779 LOperand* object = UseRegister(instr->object()); |
| 2775 LOperand* index = UseTempRegister(instr->index()); | 2780 LOperand* index = UseTempRegister(instr->index()); |
| 2776 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index)); | 2781 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index)); |
| 2777 } | 2782 } |
| 2778 | 2783 |
| 2779 | 2784 |
| 2780 } } // namespace v8::internal | 2785 } } // namespace v8::internal |
| 2781 | 2786 |
| 2782 #endif // V8_TARGET_ARCH_IA32 | 2787 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |