OLD | NEW |
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_OPCODES_H_ | 5 #ifndef V8_COMPILER_OPCODES_H_ |
6 #define V8_COMPILER_OPCODES_H_ | 6 #define V8_COMPILER_OPCODES_H_ |
7 | 7 |
8 #include <iosfwd> | 8 #include <iosfwd> |
9 | 9 |
10 // Opcodes for control operators. | 10 // Opcodes for control operators. |
(...skipping 14 matching lines...) Expand all Loading... |
25 V(DeoptimizeUnless) \ | 25 V(DeoptimizeUnless) \ |
26 V(Return) \ | 26 V(Return) \ |
27 V(TailCall) \ | 27 V(TailCall) \ |
28 V(Terminate) \ | 28 V(Terminate) \ |
29 V(OsrNormalEntry) \ | 29 V(OsrNormalEntry) \ |
30 V(OsrLoopEntry) \ | 30 V(OsrLoopEntry) \ |
31 V(Throw) \ | 31 V(Throw) \ |
32 V(End) | 32 V(End) |
33 | 33 |
34 // Opcodes for constant operators. | 34 // Opcodes for constant operators. |
35 #define CONSTANT_OP_LIST(V) \ | 35 #define CONSTANT_OP_LIST(V) \ |
36 V(Int32Constant) \ | 36 V(Int32Constant) \ |
37 V(Int64Constant) \ | 37 V(Int64Constant) \ |
38 V(Float32Constant) \ | 38 V(Float32Constant) \ |
39 V(Float64Constant) \ | 39 V(Float64Constant) \ |
40 V(ExternalConstant) \ | 40 V(ExternalConstant) \ |
41 V(NumberConstant) \ | 41 V(NumberConstant) \ |
42 V(HeapConstant) | 42 V(HeapConstant) \ |
| 43 V(RelocatableInt32Constant) \ |
| 44 V(RelocatableInt64Constant) |
43 | 45 |
44 #define INNER_OP_LIST(V) \ | 46 #define INNER_OP_LIST(V) \ |
45 V(Select) \ | 47 V(Select) \ |
46 V(Phi) \ | 48 V(Phi) \ |
47 V(EffectSet) \ | 49 V(EffectSet) \ |
48 V(EffectPhi) \ | 50 V(EffectPhi) \ |
49 V(Guard) \ | 51 V(Guard) \ |
50 V(BeginRegion) \ | 52 V(BeginRegion) \ |
51 V(FinishRegion) \ | 53 V(FinishRegion) \ |
52 V(FrameState) \ | 54 V(FrameState) \ |
(...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
377 return kStart <= value && value <= kEnd; | 379 return kStart <= value && value <= kEnd; |
378 } | 380 } |
379 | 381 |
380 // Returns true if opcode for JavaScript operator. | 382 // Returns true if opcode for JavaScript operator. |
381 static bool IsJsOpcode(Value value) { | 383 static bool IsJsOpcode(Value value) { |
382 return kJSEqual <= value && value <= kJSStackCheck; | 384 return kJSEqual <= value && value <= kJSStackCheck; |
383 } | 385 } |
384 | 386 |
385 // Returns true if opcode for constant operator. | 387 // Returns true if opcode for constant operator. |
386 static bool IsConstantOpcode(Value value) { | 388 static bool IsConstantOpcode(Value value) { |
387 return kInt32Constant <= value && value <= kHeapConstant; | 389 return kInt32Constant <= value && value <= kRelocatableInt64Constant; |
388 } | 390 } |
389 | 391 |
390 static bool IsPhiOpcode(Value value) { | 392 static bool IsPhiOpcode(Value value) { |
391 return value == kPhi || value == kEffectPhi; | 393 return value == kPhi || value == kEffectPhi; |
392 } | 394 } |
393 | 395 |
394 static bool IsMergeOpcode(Value value) { | 396 static bool IsMergeOpcode(Value value) { |
395 return value == kMerge || value == kLoop; | 397 return value == kMerge || value == kLoop; |
396 } | 398 } |
397 | 399 |
(...skipping 14 matching lines...) Expand all Loading... |
412 } | 414 } |
413 }; | 415 }; |
414 | 416 |
415 std::ostream& operator<<(std::ostream&, IrOpcode::Value); | 417 std::ostream& operator<<(std::ostream&, IrOpcode::Value); |
416 | 418 |
417 } // namespace compiler | 419 } // namespace compiler |
418 } // namespace internal | 420 } // namespace internal |
419 } // namespace v8 | 421 } // namespace v8 |
420 | 422 |
421 #endif // V8_COMPILER_OPCODES_H_ | 423 #endif // V8_COMPILER_OPCODES_H_ |
OLD | NEW |