Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(62)

Side by Side Diff: src/compiler/register-allocator-verifier.cc

Issue 1513543003: [turbofan] Make MachineType a pair of enums. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Moar rebase Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/compiler/register-allocator.cc ('k') | src/compiler/representation-change.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/bit-vector.h" 5 #include "src/bit-vector.h"
6 #include "src/compiler/instruction.h" 6 #include "src/compiler/instruction.h"
7 #include "src/compiler/register-allocator-verifier.h" 7 #include "src/compiler/register-allocator-verifier.h"
8 8
9 namespace v8 { 9 namespace v8 {
10 namespace internal { 10 namespace internal {
(...skipping 699 matching lines...) Expand 10 before | Expand all | Expand 10 after
710 if (instr->IsCall()) { 710 if (instr->IsCall()) {
711 current->DropRegisters(config()); 711 current->DropRegisters(config());
712 } 712 }
713 for (size_t i = 0; i < instr->OutputCount(); ++i, ++count) { 713 for (size_t i = 0; i < instr->OutputCount(); ++i, ++count) {
714 int virtual_register = op_constraints[count].virtual_register_; 714 int virtual_register = op_constraints[count].virtual_register_;
715 OperandMap::MapValue* value = 715 OperandMap::MapValue* value =
716 current->Define(zone(), instr->OutputAt(i), virtual_register); 716 current->Define(zone(), instr->OutputAt(i), virtual_register);
717 if (op_constraints[count].type_ == kRegisterAndSlot) { 717 if (op_constraints[count].type_ == kRegisterAndSlot) {
718 const AllocatedOperand* reg_op = 718 const AllocatedOperand* reg_op =
719 AllocatedOperand::cast(instr->OutputAt(i)); 719 AllocatedOperand::cast(instr->OutputAt(i));
720 MachineType mt = reg_op->machine_type(); 720 MachineRepresentation rep = reg_op->representation();
721 const AllocatedOperand* stack_op = AllocatedOperand::New( 721 const AllocatedOperand* stack_op = AllocatedOperand::New(
722 zone(), LocationOperand::LocationKind::STACK_SLOT, mt, 722 zone(), LocationOperand::LocationKind::STACK_SLOT, rep,
723 op_constraints[i].spilled_slot_); 723 op_constraints[i].spilled_slot_);
724 auto insert_result = 724 auto insert_result =
725 current->map().insert(std::make_pair(stack_op, value)); 725 current->map().insert(std::make_pair(stack_op, value));
726 DCHECK(insert_result.second); 726 DCHECK(insert_result.second);
727 USE(insert_result); 727 USE(insert_result);
728 } 728 }
729 } 729 }
730 } 730 }
731 } 731 }
732 } 732 }
733 733
734 } // namespace compiler 734 } // namespace compiler
735 } // namespace internal 735 } // namespace internal
736 } // namespace v8 736 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/register-allocator.cc ('k') | src/compiler/representation-change.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698