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

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

Issue 868883002: Remove the dependency of Zone on Isolate (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix compilation issues Created 5 years, 11 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/instruction.cc ('k') | src/compiler/js-generic-lowering.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 #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/instruction.h" 8 #include "src/compiler/instruction.h"
9 #include "src/compiler/instruction-selector.h" 9 #include "src/compiler/instruction-selector.h"
10 #include "src/compiler/linkage.h" 10 #include "src/compiler/linkage.h"
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 } 136 }
137 137
138 InstructionOperand* Label(BasicBlock* block) { 138 InstructionOperand* Label(BasicBlock* block) {
139 int index = sequence()->AddImmediate(Constant(block->GetRpoNumber())); 139 int index = sequence()->AddImmediate(Constant(block->GetRpoNumber()));
140 return ImmediateOperand::Create(index, zone()); 140 return ImmediateOperand::Create(index, zone());
141 } 141 }
142 142
143 protected: 143 protected:
144 InstructionSelector* selector() const { return selector_; } 144 InstructionSelector* selector() const { return selector_; }
145 InstructionSequence* sequence() const { return selector()->sequence(); } 145 InstructionSequence* sequence() const { return selector()->sequence(); }
146 Isolate* isolate() const { return zone()->isolate(); }
147 Zone* zone() const { return selector()->instruction_zone(); } 146 Zone* zone() const { return selector()->instruction_zone(); }
148 147
149 private: 148 private:
150 static Constant ToConstant(const Node* node) { 149 static Constant ToConstant(const Node* node) {
151 switch (node->opcode()) { 150 switch (node->opcode()) {
152 case IrOpcode::kInt32Constant: 151 case IrOpcode::kInt32Constant:
153 return Constant(OpParameter<int32_t>(node)); 152 return Constant(OpParameter<int32_t>(node));
154 case IrOpcode::kInt64Constant: 153 case IrOpcode::kInt64Constant:
155 return Constant(OpParameter<int64_t>(node)); 154 return Constant(OpParameter<int64_t>(node));
156 case IrOpcode::kFloat32Constant: 155 case IrOpcode::kFloat32Constant:
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
355 : (frame_state_descriptor->GetTotalSize() + 354 : (frame_state_descriptor->GetTotalSize() +
356 1); // Include deopt id. 355 1); // Include deopt id.
357 } 356 }
358 }; 357 };
359 358
360 } // namespace compiler 359 } // namespace compiler
361 } // namespace internal 360 } // namespace internal
362 } // namespace v8 361 } // namespace v8
363 362
364 #endif // V8_COMPILER_INSTRUCTION_SELECTOR_IMPL_H_ 363 #endif // V8_COMPILER_INSTRUCTION_SELECTOR_IMPL_H_
OLDNEW
« no previous file with comments | « src/compiler/instruction.cc ('k') | src/compiler/js-generic-lowering.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698