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 1346 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1357 bool assigned = false; | 1357 bool assigned = false; |
1358 if (first_output->HasFixedPolicy()) { | 1358 if (first_output->HasFixedPolicy()) { |
1359 int output_vreg = first_output->virtual_register(); | 1359 int output_vreg = first_output->virtual_register(); |
1360 UnallocatedOperand output_copy(UnallocatedOperand::ANY, output_vreg); | 1360 UnallocatedOperand output_copy(UnallocatedOperand::ANY, output_vreg); |
1361 bool is_tagged = IsReference(output_vreg); | 1361 bool is_tagged = IsReference(output_vreg); |
1362 AllocateFixed(first_output, instr_index, is_tagged); | 1362 AllocateFixed(first_output, instr_index, is_tagged); |
1363 | 1363 |
1364 // This value is produced on the stack, we never need to spill it. | 1364 // This value is produced on the stack, we never need to spill it. |
1365 if (first_output->IsStackSlot()) { | 1365 if (first_output->IsStackSlot()) { |
1366 DCHECK(StackSlotOperand::cast(first_output)->index() < | 1366 DCHECK(StackSlotOperand::cast(first_output)->index() < |
1367 data()->frame()->GetSpillSlotCount()); | 1367 data()->frame()->GetTotalFrameSlotCount()); |
1368 range->SetSpillOperand(StackSlotOperand::cast(first_output)); | 1368 range->SetSpillOperand(StackSlotOperand::cast(first_output)); |
1369 range->SetSpillStartIndex(instr_index + 1); | 1369 range->SetSpillStartIndex(instr_index + 1); |
1370 assigned = true; | 1370 assigned = true; |
1371 } | 1371 } |
1372 data()->AddGapMove(instr_index + 1, Instruction::START, *first_output, | 1372 data()->AddGapMove(instr_index + 1, Instruction::START, *first_output, |
1373 output_copy); | 1373 output_copy); |
1374 } | 1374 } |
1375 // Make sure we add a gap move for spilling (if we have not done | 1375 // Make sure we add a gap move for spilling (if we have not done |
1376 // so already). | 1376 // so already). |
1377 if (!assigned) { | 1377 if (!assigned) { |
(...skipping 1678 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3056 auto eliminate = moves->PrepareInsertAfter(move); | 3056 auto eliminate = moves->PrepareInsertAfter(move); |
3057 to_insert.push_back(move); | 3057 to_insert.push_back(move); |
3058 if (eliminate != nullptr) to_eliminate.push_back(eliminate); | 3058 if (eliminate != nullptr) to_eliminate.push_back(eliminate); |
3059 } | 3059 } |
3060 } | 3060 } |
3061 | 3061 |
3062 | 3062 |
3063 } // namespace compiler | 3063 } // namespace compiler |
3064 } // namespace internal | 3064 } // namespace internal |
3065 } // namespace v8 | 3065 } // namespace v8 |
OLD | NEW |