OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "src/base/adapters.h" | 5 #include "src/base/adapters.h" |
6 #include "src/compiler/linkage.h" | 6 #include "src/compiler/linkage.h" |
7 #include "src/compiler/register-allocator.h" | 7 #include "src/compiler/register-allocator.h" |
8 #include "src/string-stream.h" | 8 #include "src/string-stream.h" |
9 | 9 |
10 namespace v8 { | 10 namespace v8 { |
(...skipping 1349 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1360 bool assigned = false; | 1360 bool assigned = false; |
1361 if (first_output->HasFixedPolicy()) { | 1361 if (first_output->HasFixedPolicy()) { |
1362 int output_vreg = first_output->virtual_register(); | 1362 int output_vreg = first_output->virtual_register(); |
1363 UnallocatedOperand output_copy(UnallocatedOperand::ANY, output_vreg); | 1363 UnallocatedOperand output_copy(UnallocatedOperand::ANY, output_vreg); |
1364 bool is_tagged = IsReference(output_vreg); | 1364 bool is_tagged = IsReference(output_vreg); |
1365 AllocateFixed(first_output, instr_index, is_tagged); | 1365 AllocateFixed(first_output, instr_index, is_tagged); |
1366 | 1366 |
1367 // This value is produced on the stack, we never need to spill it. | 1367 // This value is produced on the stack, we never need to spill it. |
1368 if (first_output->IsStackSlot()) { | 1368 if (first_output->IsStackSlot()) { |
1369 DCHECK(StackSlotOperand::cast(first_output)->index() < | 1369 DCHECK(StackSlotOperand::cast(first_output)->index() < |
1370 data()->frame()->GetSpillSlotCount()); | 1370 data()->frame()->GetTotalFrameSlotCount()); |
1371 range->SetSpillOperand(StackSlotOperand::cast(first_output)); | 1371 range->SetSpillOperand(StackSlotOperand::cast(first_output)); |
1372 range->SetSpillStartIndex(instr_index + 1); | 1372 range->SetSpillStartIndex(instr_index + 1); |
1373 assigned = true; | 1373 assigned = true; |
1374 } | 1374 } |
1375 data()->AddGapMove(instr_index + 1, Instruction::START, *first_output, | 1375 data()->AddGapMove(instr_index + 1, Instruction::START, *first_output, |
1376 output_copy); | 1376 output_copy); |
1377 } | 1377 } |
1378 // Make sure we add a gap move for spilling (if we have not done | 1378 // Make sure we add a gap move for spilling (if we have not done |
1379 // so already). | 1379 // so already). |
1380 if (!assigned) { | 1380 if (!assigned) { |
(...skipping 1678 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3059 auto eliminate = moves->PrepareInsertAfter(move); | 3059 auto eliminate = moves->PrepareInsertAfter(move); |
3060 to_insert.push_back(move); | 3060 to_insert.push_back(move); |
3061 if (eliminate != nullptr) to_eliminate.push_back(eliminate); | 3061 if (eliminate != nullptr) to_eliminate.push_back(eliminate); |
3062 } | 3062 } |
3063 } | 3063 } |
3064 | 3064 |
3065 | 3065 |
3066 } // namespace compiler | 3066 } // namespace compiler |
3067 } // namespace internal | 3067 } // namespace internal |
3068 } // namespace v8 | 3068 } // namespace v8 |
OLD | NEW |