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

Side by Side Diff: src/compiler/code-generator-impl.h

Issue 951553005: [turbofan] remove dependence of InstructionBlock on BasicBlock (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 9 months 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/code-generator.cc ('k') | src/compiler/graph-visualizer.cc » ('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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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 #ifndef V8_COMPILER_CODE_GENERATOR_IMPL_H_ 5 #ifndef V8_COMPILER_CODE_GENERATOR_IMPL_H_
6 #define V8_COMPILER_CODE_GENERATOR_IMPL_H_ 6 #define V8_COMPILER_CODE_GENERATOR_IMPL_H_
7 7
8 #include "src/code-stubs.h" 8 #include "src/code-stubs.h"
9 #include "src/compiler/code-generator.h" 9 #include "src/compiler/code-generator.h"
10 #include "src/compiler/instruction.h" 10 #include "src/compiler/instruction.h"
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 uint8_t InputInt6(size_t index) { 56 uint8_t InputInt6(size_t index) {
57 return static_cast<uint8_t>(InputInt32(index) & 0x3F); 57 return static_cast<uint8_t>(InputInt32(index) & 0x3F);
58 } 58 }
59 59
60 Handle<HeapObject> InputHeapObject(size_t index) { 60 Handle<HeapObject> InputHeapObject(size_t index) {
61 return ToHeapObject(instr_->InputAt(index)); 61 return ToHeapObject(instr_->InputAt(index));
62 } 62 }
63 63
64 Label* InputLabel(size_t index) { return ToLabel(instr_->InputAt(index)); } 64 Label* InputLabel(size_t index) { return ToLabel(instr_->InputAt(index)); }
65 65
66 BasicBlock::RpoNumber InputRpo(size_t index) { 66 RpoNumber InputRpo(size_t index) {
67 return ToRpoNumber(instr_->InputAt(index)); 67 return ToRpoNumber(instr_->InputAt(index));
68 } 68 }
69 69
70 Register OutputRegister(size_t index = 0) { 70 Register OutputRegister(size_t index = 0) {
71 return ToRegister(instr_->OutputAt(index)); 71 return ToRegister(instr_->OutputAt(index));
72 } 72 }
73 73
74 Register TempRegister(size_t index) { 74 Register TempRegister(size_t index) {
75 return ToRegister(instr_->TempAt(index)); 75 return ToRegister(instr_->TempAt(index));
76 } 76 }
77 77
78 DoubleRegister OutputDoubleRegister() { 78 DoubleRegister OutputDoubleRegister() {
79 return ToDoubleRegister(instr_->Output()); 79 return ToDoubleRegister(instr_->Output());
80 } 80 }
81 81
82 // -- Conversions for operands ----------------------------------------------- 82 // -- Conversions for operands -----------------------------------------------
83 83
84 Label* ToLabel(InstructionOperand* op) { 84 Label* ToLabel(InstructionOperand* op) {
85 return gen_->GetLabel(ToRpoNumber(op)); 85 return gen_->GetLabel(ToRpoNumber(op));
86 } 86 }
87 87
88 BasicBlock::RpoNumber ToRpoNumber(InstructionOperand* op) { 88 RpoNumber ToRpoNumber(InstructionOperand* op) {
89 return ToConstant(op).ToRpoNumber(); 89 return ToConstant(op).ToRpoNumber();
90 } 90 }
91 91
92 Register ToRegister(InstructionOperand* op) { 92 Register ToRegister(InstructionOperand* op) {
93 DCHECK(op->IsRegister()); 93 DCHECK(op->IsRegister());
94 return Register::FromAllocationIndex(op->index()); 94 return Register::FromAllocationIndex(op->index());
95 } 95 }
96 96
97 DoubleRegister ToDoubleRegister(InstructionOperand* op) { 97 DoubleRegister ToDoubleRegister(InstructionOperand* op) {
98 DCHECK(op->IsDoubleRegister()); 98 DCHECK(op->IsDoubleRegister());
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 #elif V8_TARGET_ARCH_IA32 || V8_TARGET_ARCH_X64 151 #elif V8_TARGET_ARCH_IA32 || V8_TARGET_ARCH_X64
152 masm->ud2(); 152 masm->ud2();
153 #endif 153 #endif
154 } 154 }
155 155
156 } // namespace compiler 156 } // namespace compiler
157 } // namespace internal 157 } // namespace internal
158 } // namespace v8 158 } // namespace v8
159 159
160 #endif // V8_COMPILER_CODE_GENERATOR_IMPL_H 160 #endif // V8_COMPILER_CODE_GENERATOR_IMPL_H
OLDNEW
« no previous file with comments | « src/compiler/code-generator.cc ('k') | src/compiler/graph-visualizer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698