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

Side by Side Diff: src/compiler/instruction-selector-impl.h

Issue 652643002: [turbofan] remove graph from InstructionSequence (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: 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/instruction-selector.cc ('k') | test/cctest/compiler/test-instruction.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 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 #ifndef V8_COMPILER_INSTRUCTION_SELECTOR_IMPL_H_ 5 #ifndef V8_COMPILER_INSTRUCTION_SELECTOR_IMPL_H_
6 #define V8_COMPILER_INSTRUCTION_SELECTOR_IMPL_H_ 6 #define V8_COMPILER_INSTRUCTION_SELECTOR_IMPL_H_
7 7
8 #include "src/compiler/generic-node-inl.h" 8 #include "src/compiler/generic-node-inl.h"
9 #include "src/compiler/instruction.h" 9 #include "src/compiler/instruction.h"
10 #include "src/compiler/instruction-selector.h" 10 #include "src/compiler/instruction-selector.h"
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 int index = sequence()->AddImmediate(Constant(imm)); 127 int index = sequence()->AddImmediate(Constant(imm));
128 return ImmediateOperand::Create(index, zone()); 128 return ImmediateOperand::Create(index, zone());
129 } 129 }
130 130
131 InstructionOperand* Label(BasicBlock* block) { 131 InstructionOperand* Label(BasicBlock* block) {
132 // TODO(bmeurer): We misuse ImmediateOperand here. 132 // TODO(bmeurer): We misuse ImmediateOperand here.
133 return TempImmediate(block->id().ToInt()); 133 return TempImmediate(block->id().ToInt());
134 } 134 }
135 135
136 protected: 136 protected:
137 Graph* graph() const { return selector()->graph(); }
138 InstructionSelector* selector() const { return selector_; } 137 InstructionSelector* selector() const { return selector_; }
139 InstructionSequence* sequence() const { return selector()->sequence(); } 138 InstructionSequence* sequence() const { return selector()->sequence(); }
140 Isolate* isolate() const { return zone()->isolate(); } 139 Isolate* isolate() const { return zone()->isolate(); }
141 Zone* zone() const { return selector()->instruction_zone(); } 140 Zone* zone() const { return selector()->instruction_zone(); }
142 141
143 private: 142 private:
144 static Constant ToConstant(const Node* node) { 143 static Constant ToConstant(const Node* node) {
145 switch (node->opcode()) { 144 switch (node->opcode()) {
146 case IrOpcode::kInt32Constant: 145 case IrOpcode::kInt32Constant:
147 return Constant(OpParameter<int32_t>(node)); 146 return Constant(OpParameter<int32_t>(node));
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after
356 : (frame_state_descriptor->GetTotalSize() + 355 : (frame_state_descriptor->GetTotalSize() +
357 1); // Include deopt id. 356 1); // Include deopt id.
358 } 357 }
359 }; 358 };
360 359
361 } // namespace compiler 360 } // namespace compiler
362 } // namespace internal 361 } // namespace internal
363 } // namespace v8 362 } // namespace v8
364 363
365 #endif // V8_COMPILER_INSTRUCTION_SELECTOR_IMPL_H_ 364 #endif // V8_COMPILER_INSTRUCTION_SELECTOR_IMPL_H_
OLDNEW
« no previous file with comments | « src/compiler/instruction-selector.cc ('k') | test/cctest/compiler/test-instruction.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698