OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 915 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
926 } | 926 } |
927 | 927 |
928 virtual void PrintDataTo(StringStream* stream); | 928 virtual void PrintDataTo(StringStream* stream); |
929 | 929 |
930 HValue* value() { return OperandAt(0); } | 930 HValue* value() { return OperandAt(0); } |
931 }; | 931 }; |
932 | 932 |
933 | 933 |
934 class HBranch: public HUnaryControlInstruction { | 934 class HBranch: public HUnaryControlInstruction { |
935 public: | 935 public: |
936 HBranch(HValue* value, HBasicBlock* true_target, HBasicBlock* false_target) | 936 HBranch(HValue* value, |
937 : HUnaryControlInstruction(value, true_target, false_target) { | 937 HBasicBlock* true_target, |
| 938 HBasicBlock* false_target, |
| 939 ToBooleanStub::Types expected_input_types = ToBooleanStub::no_types()) |
| 940 : HUnaryControlInstruction(value, true_target, false_target), |
| 941 expected_input_types_(expected_input_types) { |
938 ASSERT(true_target != NULL && false_target != NULL); | 942 ASSERT(true_target != NULL && false_target != NULL); |
939 } | 943 } |
940 explicit HBranch(HValue* value) | 944 explicit HBranch(HValue* value) |
941 : HUnaryControlInstruction(value, NULL, NULL) { } | 945 : HUnaryControlInstruction(value, NULL, NULL) { } |
942 | 946 |
943 | 947 |
944 virtual Representation RequiredInputRepresentation(int index) const { | 948 virtual Representation RequiredInputRepresentation(int index) const { |
945 return Representation::None(); | 949 return Representation::None(); |
946 } | 950 } |
947 | 951 |
| 952 ToBooleanStub::Types expected_input_types() const { |
| 953 return expected_input_types_; |
| 954 } |
| 955 |
948 DECLARE_CONCRETE_INSTRUCTION(Branch) | 956 DECLARE_CONCRETE_INSTRUCTION(Branch) |
| 957 |
| 958 private: |
| 959 ToBooleanStub::Types expected_input_types_; |
949 }; | 960 }; |
950 | 961 |
951 | 962 |
952 class HCompareMap: public HUnaryControlInstruction { | 963 class HCompareMap: public HUnaryControlInstruction { |
953 public: | 964 public: |
954 HCompareMap(HValue* value, | 965 HCompareMap(HValue* value, |
955 Handle<Map> map, | 966 Handle<Map> map, |
956 HBasicBlock* true_target, | 967 HBasicBlock* true_target, |
957 HBasicBlock* false_target) | 968 HBasicBlock* false_target) |
958 : HUnaryControlInstruction(value, true_target, false_target), | 969 : HUnaryControlInstruction(value, true_target, false_target), |
(...skipping 3232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4191 | 4202 |
4192 DECLARE_CONCRETE_INSTRUCTION(In) | 4203 DECLARE_CONCRETE_INSTRUCTION(In) |
4193 }; | 4204 }; |
4194 | 4205 |
4195 #undef DECLARE_INSTRUCTION | 4206 #undef DECLARE_INSTRUCTION |
4196 #undef DECLARE_CONCRETE_INSTRUCTION | 4207 #undef DECLARE_CONCRETE_INSTRUCTION |
4197 | 4208 |
4198 } } // namespace v8::internal | 4209 } } // namespace v8::internal |
4199 | 4210 |
4200 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ | 4211 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ |
OLD | NEW |