| OLD | NEW |
| 1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 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 2025 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2036 HValue* length() const { return right(); } | 2036 HValue* length() const { return right(); } |
| 2037 | 2037 |
| 2038 DECLARE_CONCRETE_INSTRUCTION(BoundsCheck, "bounds_check") | 2038 DECLARE_CONCRETE_INSTRUCTION(BoundsCheck, "bounds_check") |
| 2039 }; | 2039 }; |
| 2040 | 2040 |
| 2041 | 2041 |
| 2042 class HBitwiseBinaryOperation: public HBinaryOperation { | 2042 class HBitwiseBinaryOperation: public HBinaryOperation { |
| 2043 public: | 2043 public: |
| 2044 HBitwiseBinaryOperation(HValue* left, HValue* right) | 2044 HBitwiseBinaryOperation(HValue* left, HValue* right) |
| 2045 : HBinaryOperation(left, right) { | 2045 : HBinaryOperation(left, right) { |
| 2046 // Default to truncating, Integer32, UseGVN. | 2046 set_representation(Representation::Tagged()); |
| 2047 set_representation(Representation::Integer32()); | 2047 SetFlag(kFlexibleRepresentation); |
| 2048 SetFlag(kTruncatingToInt32); | 2048 SetFlagMask(AllSideEffects()); |
| 2049 SetFlag(kUseGVN); | |
| 2050 } | 2049 } |
| 2051 | 2050 |
| 2052 virtual Representation RequiredInputRepresentation(int index) const { | 2051 virtual Representation RequiredInputRepresentation(int index) const { |
| 2053 return Representation::Integer32(); | 2052 return representation(); |
| 2054 } | 2053 } |
| 2055 | 2054 |
| 2055 virtual void RepresentationChanged(Representation to) { |
| 2056 if (!to.IsTagged()) { |
| 2057 ASSERT(to.IsInteger32()); |
| 2058 ClearFlagMask(AllSideEffects()); |
| 2059 SetFlag(kTruncatingToInt32); |
| 2060 SetFlag(kUseGVN); |
| 2061 } |
| 2062 } |
| 2063 |
| 2064 HType CalculateInferredType() const; |
| 2065 |
| 2056 DECLARE_INSTRUCTION(BitwiseBinaryOperation) | 2066 DECLARE_INSTRUCTION(BitwiseBinaryOperation) |
| 2057 }; | 2067 }; |
| 2058 | 2068 |
| 2059 | 2069 |
| 2060 class HArithmeticBinaryOperation: public HBinaryOperation { | 2070 class HArithmeticBinaryOperation: public HBinaryOperation { |
| 2061 public: | 2071 public: |
| 2062 HArithmeticBinaryOperation(HValue* left, HValue* right) | 2072 HArithmeticBinaryOperation(HValue* left, HValue* right) |
| 2063 : HBinaryOperation(left, right) { | 2073 : HBinaryOperation(left, right) { |
| 2064 set_representation(Representation::Tagged()); | 2074 set_representation(Representation::Tagged()); |
| 2065 SetFlag(kFlexibleRepresentation); | 2075 SetFlag(kFlexibleRepresentation); |
| (...skipping 1075 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3141 HValue* object() const { return left(); } | 3151 HValue* object() const { return left(); } |
| 3142 HValue* key() const { return right(); } | 3152 HValue* key() const { return right(); } |
| 3143 }; | 3153 }; |
| 3144 | 3154 |
| 3145 #undef DECLARE_INSTRUCTION | 3155 #undef DECLARE_INSTRUCTION |
| 3146 #undef DECLARE_CONCRETE_INSTRUCTION | 3156 #undef DECLARE_CONCRETE_INSTRUCTION |
| 3147 | 3157 |
| 3148 } } // namespace v8::internal | 3158 } } // namespace v8::internal |
| 3149 | 3159 |
| 3150 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ | 3160 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ |
| OLD | NEW |