OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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/simplified-operator.h" | 5 #include "src/compiler/simplified-operator.h" |
6 | 6 |
7 #include "src/base/lazy-instance.h" | 7 #include "src/base/lazy-instance.h" |
8 #include "src/compiler/opcodes.h" | 8 #include "src/compiler/opcodes.h" |
9 #include "src/compiler/operator.h" | 9 #include "src/compiler/operator.h" |
10 #include "src/types.h" | 10 #include "src/types.h" |
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
247 | 247 |
248 | 248 |
249 #define GET_FROM_CACHE(Name, properties, input_count) \ | 249 #define GET_FROM_CACHE(Name, properties, input_count) \ |
250 const Operator* SimplifiedOperatorBuilder::Name() { return &cache_.k##Name; } | 250 const Operator* SimplifiedOperatorBuilder::Name() { return &cache_.k##Name; } |
251 PURE_OP_LIST(GET_FROM_CACHE) | 251 PURE_OP_LIST(GET_FROM_CACHE) |
252 NO_THROW_OP_LIST(GET_FROM_CACHE) | 252 NO_THROW_OP_LIST(GET_FROM_CACHE) |
253 #undef GET_FROM_CACHE | 253 #undef GET_FROM_CACHE |
254 | 254 |
255 | 255 |
256 const Operator* SimplifiedOperatorBuilder::ReferenceEqual(Type* type) { | 256 const Operator* SimplifiedOperatorBuilder::ReferenceEqual(Type* type) { |
257 // TODO(titzer): What about the type parameter? | |
258 return new (zone()) Operator(IrOpcode::kReferenceEqual, | 257 return new (zone()) Operator(IrOpcode::kReferenceEqual, |
259 Operator::kCommutative | Operator::kPure, | 258 Operator::kCommutative | Operator::kPure, |
260 "ReferenceEqual", 2, 0, 0, 1, 0, 0); | 259 "ReferenceEqual", 2, 0, 0, 1, 0, 0); |
261 } | 260 } |
262 | 261 |
263 | 262 |
264 const Operator* SimplifiedOperatorBuilder::Allocate(PretenureFlag pretenure) { | 263 const Operator* SimplifiedOperatorBuilder::Allocate(PretenureFlag pretenure) { |
265 return new (zone()) | 264 return new (zone()) |
266 Operator1<PretenureFlag>(IrOpcode::kAllocate, Operator::kNoThrow, | 265 Operator1<PretenureFlag>(IrOpcode::kAllocate, Operator::kNoThrow, |
267 "Allocate", 1, 1, 1, 1, 1, 0, pretenure); | 266 "Allocate", 1, 1, 1, 1, 1, 0, pretenure); |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
308 Operator1<Type>(IrOpcode::k##Name, Operator::kNoThrow | properties, \ | 307 Operator1<Type>(IrOpcode::k##Name, Operator::kNoThrow | properties, \ |
309 #Name, value_input_count, 1, control_input_count, \ | 308 #Name, value_input_count, 1, control_input_count, \ |
310 output_count, 1, 0, access); \ | 309 output_count, 1, 0, access); \ |
311 } | 310 } |
312 ACCESS_OP_LIST(ACCESS) | 311 ACCESS_OP_LIST(ACCESS) |
313 #undef ACCESS | 312 #undef ACCESS |
314 | 313 |
315 } // namespace compiler | 314 } // namespace compiler |
316 } // namespace internal | 315 } // namespace internal |
317 } // namespace v8 | 316 } // namespace v8 |
OLD | NEW |