OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
93 V(CheckMaps) \ | 93 V(CheckMaps) \ |
94 V(CheckMapValue) \ | 94 V(CheckMapValue) \ |
95 V(CheckPrototypeMaps) \ | 95 V(CheckPrototypeMaps) \ |
96 V(CheckSmi) \ | 96 V(CheckSmi) \ |
97 V(ClampToUint8) \ | 97 V(ClampToUint8) \ |
98 V(ClassOfTestAndBranch) \ | 98 V(ClassOfTestAndBranch) \ |
99 V(CompareNumericAndBranch) \ | 99 V(CompareNumericAndBranch) \ |
100 V(CompareGeneric) \ | 100 V(CompareGeneric) \ |
101 V(CompareObjectEqAndBranch) \ | 101 V(CompareObjectEqAndBranch) \ |
102 V(CompareMap) \ | 102 V(CompareMap) \ |
103 V(CompareConstantEqAndBranch) \ | |
104 V(Constant) \ | 103 V(Constant) \ |
105 V(Context) \ | 104 V(Context) \ |
106 V(DateField) \ | 105 V(DateField) \ |
107 V(DebugBreak) \ | 106 V(DebugBreak) \ |
108 V(DeclareGlobals) \ | 107 V(DeclareGlobals) \ |
109 V(Deoptimize) \ | 108 V(Deoptimize) \ |
110 V(Div) \ | 109 V(Div) \ |
111 V(DummyUse) \ | 110 V(DummyUse) \ |
112 V(ElementsKind) \ | 111 V(ElementsKind) \ |
113 V(EnterInlined) \ | 112 V(EnterInlined) \ |
(...skipping 3896 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4010 } | 4009 } |
4011 | 4010 |
4012 virtual Representation observed_input_representation(int index) { | 4011 virtual Representation observed_input_representation(int index) { |
4013 return Representation::Tagged(); | 4012 return Representation::Tagged(); |
4014 } | 4013 } |
4015 | 4014 |
4016 DECLARE_CONCRETE_INSTRUCTION(CompareObjectEqAndBranch) | 4015 DECLARE_CONCRETE_INSTRUCTION(CompareObjectEqAndBranch) |
4017 }; | 4016 }; |
4018 | 4017 |
4019 | 4018 |
4020 class HCompareConstantEqAndBranch: public HUnaryControlInstruction { | |
4021 public: | |
4022 HCompareConstantEqAndBranch(HValue* left, int right, Token::Value op) | |
4023 : HUnaryControlInstruction(left, NULL, NULL), op_(op), right_(right) { | |
4024 ASSERT(op == Token::EQ_STRICT); | |
4025 } | |
4026 | |
4027 Token::Value op() const { return op_; } | |
4028 HValue* left() { return value(); } | |
4029 int right() const { return right_; } | |
4030 | |
4031 virtual Representation RequiredInputRepresentation(int index) { | |
4032 return Representation::Integer32(); | |
4033 } | |
4034 | |
4035 DECLARE_CONCRETE_INSTRUCTION(CompareConstantEqAndBranch); | |
4036 | |
4037 private: | |
4038 const Token::Value op_; | |
4039 const int right_; | |
4040 }; | |
4041 | |
4042 | |
4043 class HIsObjectAndBranch: public HUnaryControlInstruction { | 4019 class HIsObjectAndBranch: public HUnaryControlInstruction { |
4044 public: | 4020 public: |
4045 explicit HIsObjectAndBranch(HValue* value) | 4021 explicit HIsObjectAndBranch(HValue* value) |
4046 : HUnaryControlInstruction(value, NULL, NULL) { } | 4022 : HUnaryControlInstruction(value, NULL, NULL) { } |
4047 | 4023 |
4048 virtual Representation RequiredInputRepresentation(int index) { | 4024 virtual Representation RequiredInputRepresentation(int index) { |
4049 return Representation::Tagged(); | 4025 return Representation::Tagged(); |
4050 } | 4026 } |
4051 | 4027 |
4052 DECLARE_CONCRETE_INSTRUCTION(IsObjectAndBranch) | 4028 DECLARE_CONCRETE_INSTRUCTION(IsObjectAndBranch) |
(...skipping 2640 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6693 virtual bool IsDeletable() const { return true; } | 6669 virtual bool IsDeletable() const { return true; } |
6694 }; | 6670 }; |
6695 | 6671 |
6696 | 6672 |
6697 #undef DECLARE_INSTRUCTION | 6673 #undef DECLARE_INSTRUCTION |
6698 #undef DECLARE_CONCRETE_INSTRUCTION | 6674 #undef DECLARE_CONCRETE_INSTRUCTION |
6699 | 6675 |
6700 } } // namespace v8::internal | 6676 } } // namespace v8::internal |
6701 | 6677 |
6702 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ | 6678 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ |
OLD | NEW |