| OLD | NEW |
| 1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 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 919 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 930 | 930 |
| 931 if (summary->IsCall()) { | 931 if (summary->IsCall()) { |
| 932 for (int i = 0; i < Register::kNumAllocatableRegisters; ++i) { | 932 for (int i = 0; i < Register::kNumAllocatableRegisters; ++i) { |
| 933 if (output == NULL || !output->IsRegister() || | 933 if (output == NULL || !output->IsRegister() || |
| 934 output->index() != i) { | 934 output->index() != i) { |
| 935 LiveRange* range = FixedLiveRangeFor(i); | 935 LiveRange* range = FixedLiveRangeFor(i); |
| 936 range->AddUseInterval(curr_position, | 936 range->AddUseInterval(curr_position, |
| 937 curr_position.InstructionEnd()); | 937 curr_position.InstructionEnd()); |
| 938 } | 938 } |
| 939 } | 939 } |
| 940 } |
| 941 |
| 942 if (summary->IsCall() || summary->IsSaveDoubles()) { |
| 940 for (int i = 0; i < DoubleRegister::kNumAllocatableRegisters; ++i) { | 943 for (int i = 0; i < DoubleRegister::kNumAllocatableRegisters; ++i) { |
| 941 if (output == NULL || !output->IsDoubleRegister() || | 944 if (output == NULL || !output->IsDoubleRegister() || |
| 942 output->index() != i) { | 945 output->index() != i) { |
| 943 LiveRange* range = FixedDoubleLiveRangeFor(i); | 946 LiveRange* range = FixedDoubleLiveRangeFor(i); |
| 944 range->AddUseInterval(curr_position, | 947 range->AddUseInterval(curr_position, |
| 945 curr_position.InstructionEnd()); | 948 curr_position.InstructionEnd()); |
| 946 } | 949 } |
| 947 } | 950 } |
| 948 } | 951 } |
| 949 | 952 |
| (...skipping 620 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1570 } | 1573 } |
| 1571 return GENERAL_REGISTERS; | 1574 return GENERAL_REGISTERS; |
| 1572 } | 1575 } |
| 1573 | 1576 |
| 1574 | 1577 |
| 1575 void LAllocator::MarkAsCall() { | 1578 void LAllocator::MarkAsCall() { |
| 1576 current_summary()->MarkAsCall(); | 1579 current_summary()->MarkAsCall(); |
| 1577 } | 1580 } |
| 1578 | 1581 |
| 1579 | 1582 |
| 1583 void LAllocator::MarkAsSaveDoubles() { |
| 1584 current_summary()->MarkAsSaveDoubles(); |
| 1585 } |
| 1586 |
| 1587 |
| 1580 void LAllocator::RecordDefinition(HInstruction* instr, LUnallocated* operand) { | 1588 void LAllocator::RecordDefinition(HInstruction* instr, LUnallocated* operand) { |
| 1581 operand->set_virtual_register(instr->id()); | 1589 operand->set_virtual_register(instr->id()); |
| 1582 current_summary()->SetOutput(operand); | 1590 current_summary()->SetOutput(operand); |
| 1583 } | 1591 } |
| 1584 | 1592 |
| 1585 | 1593 |
| 1586 void LAllocator::RecordTemporary(LUnallocated* operand) { | 1594 void LAllocator::RecordTemporary(LUnallocated* operand) { |
| 1587 ASSERT(next_virtual_register_ < LUnallocated::kMaxVirtualRegisters); | 1595 ASSERT(next_virtual_register_ < LUnallocated::kMaxVirtualRegisters); |
| 1588 if (!operand->HasFixedPolicy()) { | 1596 if (!operand->HasFixedPolicy()) { |
| 1589 operand->set_virtual_register(next_virtual_register_++); | 1597 operand->set_virtual_register(next_virtual_register_++); |
| (...skipping 517 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2107 LiveRange* current = live_ranges()->at(i); | 2115 LiveRange* current = live_ranges()->at(i); |
| 2108 if (current != NULL) current->Verify(); | 2116 if (current != NULL) current->Verify(); |
| 2109 } | 2117 } |
| 2110 } | 2118 } |
| 2111 | 2119 |
| 2112 | 2120 |
| 2113 #endif | 2121 #endif |
| 2114 | 2122 |
| 2115 | 2123 |
| 2116 } } // namespace v8::internal | 2124 } } // namespace v8::internal |
| OLD | NEW |