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

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

Issue 1513543003: [turbofan] Make MachineType a pair of enums. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Moar rebase Created 5 years 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-stub-assembler.cc ('k') | src/compiler/common-operator.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_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/compiler/frame-states.h" 8 #include "src/compiler/frame-states.h"
9 #include "src/machine-type.h" 9 #include "src/machine-type.h"
10 #include "src/zone-containers.h" 10 #include "src/zone-containers.h"
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 // Prediction whether throw-site is surrounded by any local catch-scope. 64 // Prediction whether throw-site is surrounded by any local catch-scope.
65 enum class IfExceptionHint { kLocallyUncaught, kLocallyCaught }; 65 enum class IfExceptionHint { kLocallyUncaught, kLocallyCaught };
66 66
67 size_t hash_value(IfExceptionHint hint); 67 size_t hash_value(IfExceptionHint hint);
68 68
69 std::ostream& operator<<(std::ostream&, IfExceptionHint); 69 std::ostream& operator<<(std::ostream&, IfExceptionHint);
70 70
71 71
72 class SelectParameters final { 72 class SelectParameters final {
73 public: 73 public:
74 explicit SelectParameters(MachineType type, 74 explicit SelectParameters(MachineRepresentation representation,
75 BranchHint hint = BranchHint::kNone) 75 BranchHint hint = BranchHint::kNone)
76 : type_(type), hint_(hint) {} 76 : representation_(representation), hint_(hint) {}
77 77
78 MachineType type() const { return type_; } 78 MachineRepresentation representation() const { return representation_; }
79 BranchHint hint() const { return hint_; } 79 BranchHint hint() const { return hint_; }
80 80
81 private: 81 private:
82 const MachineType type_; 82 const MachineRepresentation representation_;
83 const BranchHint hint_; 83 const BranchHint hint_;
84 }; 84 };
85 85
86 bool operator==(SelectParameters const&, SelectParameters const&); 86 bool operator==(SelectParameters const&, SelectParameters const&);
87 bool operator!=(SelectParameters const&, SelectParameters const&); 87 bool operator!=(SelectParameters const&, SelectParameters const&);
88 88
89 size_t hash_value(SelectParameters const& p); 89 size_t hash_value(SelectParameters const& p);
90 90
91 std::ostream& operator<<(std::ostream&, SelectParameters const& p); 91 std::ostream& operator<<(std::ostream&, SelectParameters const& p);
92 92
93 SelectParameters const& SelectParametersOf(const Operator* const); 93 SelectParameters const& SelectParametersOf(const Operator* const);
94 94
95 95
96 size_t ProjectionIndexOf(const Operator* const); 96 size_t ProjectionIndexOf(const Operator* const);
97 97
98 MachineRepresentation PhiRepresentationOf(const Operator* const);
99
98 100
99 // The {IrOpcode::kParameter} opcode represents an incoming parameter to the 101 // The {IrOpcode::kParameter} opcode represents an incoming parameter to the
100 // function. This class bundles the index and a debug name for such operators. 102 // function. This class bundles the index and a debug name for such operators.
101 class ParameterInfo final { 103 class ParameterInfo final {
102 public: 104 public:
103 ParameterInfo(int index, const char* debug_name) 105 ParameterInfo(int index, const char* debug_name)
104 : index_(index), debug_name_(debug_name) {} 106 : index_(index), debug_name_(debug_name) {}
105 107
106 int index() const { return index_; } 108 int index() const { return index_; }
107 const char* debug_name() const { return debug_name_; } 109 const char* debug_name() const { return debug_name_; }
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 const Operator* OsrValue(int index); 150 const Operator* OsrValue(int index);
149 151
150 const Operator* Int32Constant(int32_t); 152 const Operator* Int32Constant(int32_t);
151 const Operator* Int64Constant(int64_t); 153 const Operator* Int64Constant(int64_t);
152 const Operator* Float32Constant(volatile float); 154 const Operator* Float32Constant(volatile float);
153 const Operator* Float64Constant(volatile double); 155 const Operator* Float64Constant(volatile double);
154 const Operator* ExternalConstant(const ExternalReference&); 156 const Operator* ExternalConstant(const ExternalReference&);
155 const Operator* NumberConstant(volatile double); 157 const Operator* NumberConstant(volatile double);
156 const Operator* HeapConstant(const Handle<HeapObject>&); 158 const Operator* HeapConstant(const Handle<HeapObject>&);
157 159
158 const Operator* Select(MachineType, BranchHint = BranchHint::kNone); 160 const Operator* Select(MachineRepresentation, BranchHint = BranchHint::kNone);
159 const Operator* Phi(MachineType type, int value_input_count); 161 const Operator* Phi(MachineRepresentation representation,
162 int value_input_count);
160 const Operator* EffectPhi(int effect_input_count); 163 const Operator* EffectPhi(int effect_input_count);
161 const Operator* EffectSet(int arguments); 164 const Operator* EffectSet(int arguments);
162 const Operator* Guard(Type* type); 165 const Operator* Guard(Type* type);
163 const Operator* BeginRegion(); 166 const Operator* BeginRegion();
164 const Operator* FinishRegion(); 167 const Operator* FinishRegion();
165 const Operator* StateValues(int arguments); 168 const Operator* StateValues(int arguments);
166 const Operator* TypedStateValues(const ZoneVector<MachineType>* types); 169 const Operator* TypedStateValues(const ZoneVector<MachineType>* types);
167 const Operator* FrameState(BailoutId bailout_id, 170 const Operator* FrameState(BailoutId bailout_id,
168 OutputFrameStateCombine state_combine, 171 OutputFrameStateCombine state_combine,
169 const FrameStateFunctionInfo* function_info); 172 const FrameStateFunctionInfo* function_info);
(...skipping 19 matching lines...) Expand all
189 Zone* const zone_; 192 Zone* const zone_;
190 193
191 DISALLOW_COPY_AND_ASSIGN(CommonOperatorBuilder); 194 DISALLOW_COPY_AND_ASSIGN(CommonOperatorBuilder);
192 }; 195 };
193 196
194 } // namespace compiler 197 } // namespace compiler
195 } // namespace internal 198 } // namespace internal
196 } // namespace v8 199 } // namespace v8
197 200
198 #endif // V8_COMPILER_COMMON_OPERATOR_H_ 201 #endif // V8_COMPILER_COMMON_OPERATOR_H_
OLDNEW
« no previous file with comments | « src/compiler/code-stub-assembler.cc ('k') | src/compiler/common-operator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698