OLD | NEW |
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 #include "src/compiler/common-operator.h" | 5 #include "src/compiler/common-operator.h" |
6 | 6 |
7 #include "src/assembler.h" | 7 #include "src/assembler.h" |
8 #include "src/base/lazy-instance.h" | 8 #include "src/base/lazy-instance.h" |
9 #include "src/compiler/linkage.h" | 9 #include "src/compiler/linkage.h" |
10 #include "src/unique.h" | 10 #include "src/unique.h" |
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
143 | 143 |
144 | 144 |
145 const Operator* CommonOperatorBuilder::Int64Constant(int64_t value) { | 145 const Operator* CommonOperatorBuilder::Int64Constant(int64_t value) { |
146 return new (zone()) Operator1<int64_t>( | 146 return new (zone()) Operator1<int64_t>( |
147 IrOpcode::kInt64Constant, Operator::kPure, 0, 1, "Int64Constant", value); | 147 IrOpcode::kInt64Constant, Operator::kPure, 0, 1, "Int64Constant", value); |
148 } | 148 } |
149 | 149 |
150 | 150 |
151 const Operator* CommonOperatorBuilder::Float32Constant(volatile float value) { | 151 const Operator* CommonOperatorBuilder::Float32Constant(volatile float value) { |
152 return new (zone()) | 152 return new (zone()) |
153 Operator1<float>(IrOpcode::kFloat32Constant, Operator::kPure, 0, 1, | 153 Operator1<float, base::bit_equal_to<float>, base::bit_hash<float>>( |
154 "Float32Constant", value); | 154 IrOpcode::kFloat32Constant, Operator::kPure, 0, 1, "Float32Constant", |
| 155 value); |
155 } | 156 } |
156 | 157 |
157 | 158 |
158 const Operator* CommonOperatorBuilder::Float64Constant(volatile double value) { | 159 const Operator* CommonOperatorBuilder::Float64Constant(volatile double value) { |
159 return new (zone()) | 160 return new (zone()) |
160 Operator1<double>(IrOpcode::kFloat64Constant, Operator::kPure, 0, 1, | 161 Operator1<double, base::bit_equal_to<double>, base::bit_hash<double>>( |
161 "Float64Constant", value); | 162 IrOpcode::kFloat64Constant, Operator::kPure, 0, 1, "Float64Constant", |
| 163 value); |
162 } | 164 } |
163 | 165 |
164 | 166 |
165 const Operator* CommonOperatorBuilder::ExternalConstant( | 167 const Operator* CommonOperatorBuilder::ExternalConstant( |
166 const ExternalReference& value) { | 168 const ExternalReference& value) { |
167 return new (zone()) | 169 return new (zone()) |
168 Operator1<ExternalReference>(IrOpcode::kExternalConstant, Operator::kPure, | 170 Operator1<ExternalReference>(IrOpcode::kExternalConstant, Operator::kPure, |
169 0, 1, "ExternalConstant", value); | 171 0, 1, "ExternalConstant", value); |
170 } | 172 } |
171 | 173 |
172 | 174 |
173 const Operator* CommonOperatorBuilder::NumberConstant(volatile double value) { | 175 const Operator* CommonOperatorBuilder::NumberConstant(volatile double value) { |
174 return new (zone()) | 176 return new (zone()) |
175 Operator1<double>(IrOpcode::kNumberConstant, Operator::kPure, 0, 1, | 177 Operator1<double, base::bit_equal_to<double>, base::bit_hash<double>>( |
176 "NumberConstant", value); | 178 IrOpcode::kNumberConstant, Operator::kPure, 0, 1, "NumberConstant", |
| 179 value); |
177 } | 180 } |
178 | 181 |
179 | 182 |
180 const Operator* CommonOperatorBuilder::HeapConstant( | 183 const Operator* CommonOperatorBuilder::HeapConstant( |
181 const Unique<HeapObject>& value) { | 184 const Unique<HeapObject>& value) { |
182 return new (zone()) Operator1<Unique<HeapObject>>( | 185 return new (zone()) Operator1<Unique<HeapObject>>( |
183 IrOpcode::kHeapConstant, Operator::kPure, 0, 1, "HeapConstant", value); | 186 IrOpcode::kHeapConstant, Operator::kPure, 0, 1, "HeapConstant", value); |
184 } | 187 } |
185 | 188 |
186 | 189 |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
249 | 252 |
250 | 253 |
251 const Operator* CommonOperatorBuilder::Projection(size_t index) { | 254 const Operator* CommonOperatorBuilder::Projection(size_t index) { |
252 return new (zone()) Operator1<size_t>(IrOpcode::kProjection, Operator::kPure, | 255 return new (zone()) Operator1<size_t>(IrOpcode::kProjection, Operator::kPure, |
253 1, 1, "Projection", index); | 256 1, 1, "Projection", index); |
254 } | 257 } |
255 | 258 |
256 } // namespace compiler | 259 } // namespace compiler |
257 } // namespace internal | 260 } // namespace internal |
258 } // namespace v8 | 261 } // namespace v8 |
OLD | NEW |