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

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

Issue 606403003: Refactor BasicBlock, no inheritance from GenericNode (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Attempt n+1 to address the size_t madness Created 6 years, 2 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 | Annotate | Revision Log
« no previous file with comments | « src/compiler/code-generator.cc ('k') | src/compiler/instruction.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 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/compiler/code-generator.h" 8 #include "src/compiler/code-generator.h"
9 #include "src/compiler/common-operator.h" 9 #include "src/compiler/common-operator.h"
10 #include "src/compiler/generic-graph.h" 10 #include "src/compiler/generic-graph.h"
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 58
59 Handle<HeapObject> InputHeapObject(int index) { 59 Handle<HeapObject> InputHeapObject(int index) {
60 return ToHeapObject(instr_->InputAt(index)); 60 return ToHeapObject(instr_->InputAt(index));
61 } 61 }
62 62
63 Label* InputLabel(int index) { 63 Label* InputLabel(int index) {
64 return gen_->code()->GetLabel(InputBlock(index)); 64 return gen_->code()->GetLabel(InputBlock(index));
65 } 65 }
66 66
67 BasicBlock* InputBlock(int index) { 67 BasicBlock* InputBlock(int index) {
68 NodeId block_id = static_cast<NodeId>(InputInt32(index)); 68 int block_id = InputInt32(index);
69 // operand should be a block id. 69 return gen_->schedule()->GetBlockById(BasicBlock::Id::FromInt(block_id));
70 DCHECK(block_id >= 0);
71 DCHECK(block_id < gen_->schedule()->BasicBlockCount());
72 return gen_->schedule()->GetBlockById(block_id);
73 } 70 }
74 71
75 Register OutputRegister(int index = 0) { 72 Register OutputRegister(int index = 0) {
76 return ToRegister(instr_->OutputAt(index)); 73 return ToRegister(instr_->OutputAt(index));
77 } 74 }
78 75
79 DoubleRegister OutputDoubleRegister() { 76 DoubleRegister OutputDoubleRegister() {
80 return ToDoubleRegister(instr_->Output()); 77 return ToDoubleRegister(instr_->Output());
81 } 78 }
82 79
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 #if V8_TARGET_ARCH_ARM64 || V8_TARGET_ARCH_ARM 120 #if V8_TARGET_ARCH_ARM64 || V8_TARGET_ARCH_ARM
124 masm->CheckConstPool(true, false); 121 masm->CheckConstPool(true, false);
125 #endif 122 #endif
126 } 123 }
127 124
128 } // namespace compiler 125 } // namespace compiler
129 } // namespace internal 126 } // namespace internal
130 } // namespace v8 127 } // namespace v8
131 128
132 #endif // V8_COMPILER_CODE_GENERATOR_IMPL_H 129 #endif // V8_COMPILER_CODE_GENERATOR_IMPL_H
OLDNEW
« no previous file with comments | « src/compiler/code-generator.cc ('k') | src/compiler/instruction.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698