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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 | 69 |
70 // Opcodes for JavaScript operators. | 70 // Opcodes for JavaScript operators. |
71 #define JS_COMPARE_BINOP_LIST(V) \ | 71 #define JS_COMPARE_BINOP_LIST(V) \ |
72 V(JSEqual) \ | 72 V(JSEqual) \ |
73 V(JSNotEqual) \ | 73 V(JSNotEqual) \ |
74 V(JSStrictEqual) \ | 74 V(JSStrictEqual) \ |
75 V(JSStrictNotEqual) \ | 75 V(JSStrictNotEqual) \ |
76 V(JSLessThan) \ | 76 V(JSLessThan) \ |
77 V(JSGreaterThan) \ | 77 V(JSGreaterThan) \ |
78 V(JSLessThanOrEqual) \ | 78 V(JSLessThanOrEqual) \ |
79 V(JSGreaterThanOrEqual) | 79 V(JSGreaterThanOrEqual) \ |
| 80 V(JSSameValueZero) |
80 | 81 |
81 #define JS_BITWISE_BINOP_LIST(V) \ | 82 #define JS_BITWISE_BINOP_LIST(V) \ |
82 V(JSBitwiseOr) \ | 83 V(JSBitwiseOr) \ |
83 V(JSBitwiseXor) \ | 84 V(JSBitwiseXor) \ |
84 V(JSBitwiseAnd) \ | 85 V(JSBitwiseAnd) \ |
85 V(JSShiftLeft) \ | 86 V(JSShiftLeft) \ |
86 V(JSShiftRight) \ | 87 V(JSShiftRight) \ |
87 V(JSShiftRightLogical) | 88 V(JSShiftRightLogical) |
88 | 89 |
89 #define JS_ARITH_BINOP_LIST(V) \ | 90 #define JS_ARITH_BINOP_LIST(V) \ |
(...skipping 618 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
708 return kIfTrue <= value && value <= kIfDefault; | 709 return kIfTrue <= value && value <= kIfDefault; |
709 } | 710 } |
710 | 711 |
711 // Returns true if opcode can be inlined. | 712 // Returns true if opcode can be inlined. |
712 static bool IsInlineeOpcode(Value value) { | 713 static bool IsInlineeOpcode(Value value) { |
713 return value == kJSCallConstruct || value == kJSCallFunction; | 714 return value == kJSCallConstruct || value == kJSCallFunction; |
714 } | 715 } |
715 | 716 |
716 // Returns true if opcode for comparison operator. | 717 // Returns true if opcode for comparison operator. |
717 static bool IsComparisonOpcode(Value value) { | 718 static bool IsComparisonOpcode(Value value) { |
718 return (kJSEqual <= value && value <= kJSGreaterThanOrEqual) || | 719 return (kJSEqual <= value && value <= kJSSameValueZero) || |
719 (kNumberEqual <= value && value <= kStringLessThanOrEqual) || | 720 (kNumberEqual <= value && value <= kStringLessThanOrEqual) || |
720 (kWord32Equal <= value && value <= kFloat64LessThanOrEqual); | 721 (kWord32Equal <= value && value <= kFloat64LessThanOrEqual); |
721 } | 722 } |
722 }; | 723 }; |
723 | 724 |
724 std::ostream& operator<<(std::ostream&, IrOpcode::Value); | 725 std::ostream& operator<<(std::ostream&, IrOpcode::Value); |
725 | 726 |
726 } // namespace compiler | 727 } // namespace compiler |
727 } // namespace internal | 728 } // namespace internal |
728 } // namespace v8 | 729 } // namespace v8 |
729 | 730 |
730 #endif // V8_COMPILER_OPCODES_H_ | 731 #endif // V8_COMPILER_OPCODES_H_ |
OLD | NEW |