| 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 812 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 823 // the instruction end. | 823 // the instruction end. |
| 824 LGap* gap = GapAt(gap_index); | 824 LGap* gap = GapAt(gap_index); |
| 825 LParallelMove* move = gap->GetOrCreateParallelMove(LGap::BEFORE, zone()); | 825 LParallelMove* move = gap->GetOrCreateParallelMove(LGap::BEFORE, zone()); |
| 826 move->AddMove(first_output, range->GetSpillOperand(), zone()); | 826 move->AddMove(first_output, range->GetSpillOperand(), zone()); |
| 827 } | 827 } |
| 828 } | 828 } |
| 829 | 829 |
| 830 // Handle fixed input operands of second instruction. | 830 // Handle fixed input operands of second instruction. |
| 831 if (second != NULL) { | 831 if (second != NULL) { |
| 832 for (UseIterator it(second); !it.Done(); it.Advance()) { | 832 for (UseIterator it(second); !it.Done(); it.Advance()) { |
| 833 if (it.Current() == NULL) continue; |
| 833 LUnallocated* cur_input = LUnallocated::cast(it.Current()); | 834 LUnallocated* cur_input = LUnallocated::cast(it.Current()); |
| 834 if (cur_input->HasFixedPolicy()) { | 835 if (cur_input->HasFixedPolicy()) { |
| 835 LUnallocated* input_copy = cur_input->CopyUnconstrained(zone()); | 836 LUnallocated* input_copy = cur_input->CopyUnconstrained(zone()); |
| 836 bool is_tagged = HasTaggedValue(cur_input->virtual_register()); | 837 bool is_tagged = HasTaggedValue(cur_input->virtual_register()); |
| 837 AllocateFixed(cur_input, gap_index + 1, is_tagged); | 838 AllocateFixed(cur_input, gap_index + 1, is_tagged); |
| 838 AddConstraintsGapMove(gap_index, input_copy, cur_input); | 839 AddConstraintsGapMove(gap_index, input_copy, cur_input); |
| 839 } else if (cur_input->policy() == LUnallocated::WRITABLE_REGISTER) { | 840 } else if (cur_input->policy() == LUnallocated::WRITABLE_REGISTER) { |
| 840 // The live range of writable input registers always goes until the end | 841 // The live range of writable input registers always goes until the end |
| 841 // of the instruction. | 842 // of the instruction. |
| 842 ASSERT(!cur_input->IsUsedAtStart()); | 843 ASSERT(!cur_input->IsUsedAtStart()); |
| (...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 966 LiveRange* range = FixedDoubleLiveRangeFor(i); | 967 LiveRange* range = FixedDoubleLiveRangeFor(i); |
| 967 range->AddUseInterval(curr_position, | 968 range->AddUseInterval(curr_position, |
| 968 curr_position.InstructionEnd(), | 969 curr_position.InstructionEnd(), |
| 969 zone_); | 970 zone_); |
| 970 } | 971 } |
| 971 } | 972 } |
| 972 } | 973 } |
| 973 | 974 |
| 974 for (UseIterator it(instr); !it.Done(); it.Advance()) { | 975 for (UseIterator it(instr); !it.Done(); it.Advance()) { |
| 975 LOperand* input = it.Current(); | 976 LOperand* input = it.Current(); |
| 977 if (input == NULL) continue; |
| 976 | 978 |
| 977 LifetimePosition use_pos; | 979 LifetimePosition use_pos; |
| 978 if (input->IsUnallocated() && | 980 if (input->IsUnallocated() && |
| 979 LUnallocated::cast(input)->IsUsedAtStart()) { | 981 LUnallocated::cast(input)->IsUsedAtStart()) { |
| 980 use_pos = curr_position; | 982 use_pos = curr_position; |
| 981 } else { | 983 } else { |
| 982 use_pos = curr_position.InstructionEnd(); | 984 use_pos = curr_position.InstructionEnd(); |
| 983 } | 985 } |
| 984 | 986 |
| 985 Use(block_start_position, use_pos, input, NULL); | 987 Use(block_start_position, use_pos, input, NULL); |
| (...skipping 1131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2117 LiveRange* current = live_ranges()->at(i); | 2119 LiveRange* current = live_ranges()->at(i); |
| 2118 if (current != NULL) current->Verify(); | 2120 if (current != NULL) current->Verify(); |
| 2119 } | 2121 } |
| 2120 } | 2122 } |
| 2121 | 2123 |
| 2122 | 2124 |
| 2123 #endif | 2125 #endif |
| 2124 | 2126 |
| 2125 | 2127 |
| 2126 } } // namespace v8::internal | 2128 } } // namespace v8::internal |
| OLD | NEW |