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

Side by Side Diff: src/compiler/common-operator.h

Issue 545153002: [turbofan] Add MachineType to Phi. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Add test case. Created 6 years, 3 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/change-lowering-unittest.cc ('k') | src/compiler/graph-builder.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_COMMON_OPERATOR_H_ 5 #ifndef V8_COMPILER_COMMON_OPERATOR_H_
6 #define V8_COMPILER_COMMON_OPERATOR_H_ 6 #define V8_COMPILER_COMMON_OPERATOR_H_
7 7
8 #include "src/v8.h"
9
10 #include "src/assembler.h" 8 #include "src/assembler.h"
11 #include "src/compiler/linkage.h" 9 #include "src/compiler/linkage.h"
10 #include "src/compiler/machine-type.h"
12 #include "src/compiler/opcodes.h" 11 #include "src/compiler/opcodes.h"
13 #include "src/compiler/operator.h" 12 #include "src/compiler/operator.h"
14 #include "src/unique.h" 13 #include "src/unique.h"
15 14
16 namespace v8 { 15 namespace v8 {
17 namespace internal { 16 namespace internal {
18 17
19 class OStream; 18 class OStream;
20 19
21 namespace compiler { 20 namespace compiler {
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 } 134 }
136 Operator* NumberConstant(double value) { 135 Operator* NumberConstant(double value) {
137 return new (zone_) 136 return new (zone_)
138 Operator1<double>(IrOpcode::kNumberConstant, Operator::kPure, 0, 1, 137 Operator1<double>(IrOpcode::kNumberConstant, Operator::kPure, 0, 1,
139 "NumberConstant", value); 138 "NumberConstant", value);
140 } 139 }
141 Operator* HeapConstant(Unique<Object> value) { 140 Operator* HeapConstant(Unique<Object> value) {
142 return new (zone_) Operator1<Unique<Object> >( 141 return new (zone_) Operator1<Unique<Object> >(
143 IrOpcode::kHeapConstant, Operator::kPure, 0, 1, "HeapConstant", value); 142 IrOpcode::kHeapConstant, Operator::kPure, 0, 1, "HeapConstant", value);
144 } 143 }
145 Operator* Phi(int arguments) { 144 Operator* Phi(MachineType type, int arguments) {
146 DCHECK(arguments > 0); // Disallow empty phis. 145 DCHECK(arguments > 0); // Disallow empty phis.
147 return new (zone_) Operator1<int>(IrOpcode::kPhi, Operator::kPure, 146 return new (zone_) Operator1<MachineType>(IrOpcode::kPhi, Operator::kPure,
148 arguments, 1, "Phi", arguments); 147 arguments, 1, "Phi", type);
149 } 148 }
150 Operator* EffectPhi(int arguments) { 149 Operator* EffectPhi(int arguments) {
151 DCHECK(arguments > 0); // Disallow empty phis. 150 DCHECK(arguments > 0); // Disallow empty phis.
152 return new (zone_) Operator1<int>(IrOpcode::kEffectPhi, Operator::kPure, 0, 151 return new (zone_) Operator1<int>(IrOpcode::kEffectPhi, Operator::kPure, 0,
153 0, "EffectPhi", arguments); 152 0, "EffectPhi", arguments);
154 } 153 }
155 Operator* ControlEffect() { 154 Operator* ControlEffect() {
156 return new (zone_) SimpleOperator(IrOpcode::kControlEffect, Operator::kPure, 155 return new (zone_) SimpleOperator(IrOpcode::kControlEffect, Operator::kPure,
157 0, 0, "ControlEffect"); 156 0, 0, "ControlEffect");
158 } 157 }
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
313 template <typename T> 312 template <typename T>
314 inline T ValueOf(const Operator* op) { 313 inline T ValueOf(const Operator* op) {
315 return CommonOperatorTraits<T>::ValueOf(op); 314 return CommonOperatorTraits<T>::ValueOf(op);
316 } 315 }
317 316
318 } // namespace compiler 317 } // namespace compiler
319 } // namespace internal 318 } // namespace internal
320 } // namespace v8 319 } // namespace v8
321 320
322 #endif // V8_COMPILER_COMMON_OPERATOR_H_ 321 #endif // V8_COMPILER_COMMON_OPERATOR_H_
OLDNEW
« no previous file with comments | « src/compiler/change-lowering-unittest.cc ('k') | src/compiler/graph-builder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698