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) | |
45 | 43 |
46 #define INNER_OP_LIST(V) \ | 44 #define INNER_OP_LIST(V) \ |
47 V(Select) \ | 45 V(Select) \ |
48 V(Phi) \ | 46 V(Phi) \ |
49 V(EffectSet) \ | 47 V(EffectSet) \ |
50 V(EffectPhi) \ | 48 V(EffectPhi) \ |
51 V(Guard) \ | 49 V(Guard) \ |
52 V(BeginRegion) \ | 50 V(BeginRegion) \ |
53 V(FinishRegion) \ | 51 V(FinishRegion) \ |
54 V(FrameState) \ | 52 V(FrameState) \ |
(...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
390 return kStart <= value && value <= kEnd; | 388 return kStart <= value && value <= kEnd; |
391 } | 389 } |
392 | 390 |
393 // Returns true if opcode for JavaScript operator. | 391 // Returns true if opcode for JavaScript operator. |
394 static bool IsJsOpcode(Value value) { | 392 static bool IsJsOpcode(Value value) { |
395 return kJSEqual <= value && value <= kJSStackCheck; | 393 return kJSEqual <= value && value <= kJSStackCheck; |
396 } | 394 } |
397 | 395 |
398 // Returns true if opcode for constant operator. | 396 // Returns true if opcode for constant operator. |
399 static bool IsConstantOpcode(Value value) { | 397 static bool IsConstantOpcode(Value value) { |
400 return kInt32Constant <= value && value <= kRelocatableInt64Constant; | 398 return kInt32Constant <= value && value <= kHeapConstant; |
401 } | 399 } |
402 | 400 |
403 static bool IsPhiOpcode(Value value) { | 401 static bool IsPhiOpcode(Value value) { |
404 return value == kPhi || value == kEffectPhi; | 402 return value == kPhi || value == kEffectPhi; |
405 } | 403 } |
406 | 404 |
407 static bool IsMergeOpcode(Value value) { | 405 static bool IsMergeOpcode(Value value) { |
408 return value == kMerge || value == kLoop; | 406 return value == kMerge || value == kLoop; |
409 } | 407 } |
410 | 408 |
(...skipping 14 matching lines...) Expand all Loading... |
425 } | 423 } |
426 }; | 424 }; |
427 | 425 |
428 std::ostream& operator<<(std::ostream&, IrOpcode::Value); | 426 std::ostream& operator<<(std::ostream&, IrOpcode::Value); |
429 | 427 |
430 } // namespace compiler | 428 } // namespace compiler |
431 } // namespace internal | 429 } // namespace internal |
432 } // namespace v8 | 430 } // namespace v8 |
433 | 431 |
434 #endif // V8_COMPILER_OPCODES_H_ | 432 #endif // V8_COMPILER_OPCODES_H_ |
OLD | NEW |