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 2191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2202 virtual Opcode opcode() const { return HValue::kPhi; } | 2202 virtual Opcode opcode() const { return HValue::kPhi; } |
2203 | 2203 |
2204 virtual bool IsConvertibleToInteger() const { | 2204 virtual bool IsConvertibleToInteger() const { |
2205 return is_convertible_to_integer_; | 2205 return is_convertible_to_integer_; |
2206 } | 2206 } |
2207 | 2207 |
2208 void set_is_convertible_to_integer(bool b) { | 2208 void set_is_convertible_to_integer(bool b) { |
2209 is_convertible_to_integer_ = b; | 2209 is_convertible_to_integer_ = b; |
2210 } | 2210 } |
2211 | 2211 |
| 2212 bool AllOperandsConvertibleToInteger() { |
| 2213 for (int i = 0; i < OperandCount(); ++i) { |
| 2214 if (!OperandAt(i)->IsConvertibleToInteger()) return false; |
| 2215 } |
| 2216 return true; |
| 2217 } |
| 2218 |
2212 protected: | 2219 protected: |
2213 virtual void DeleteFromGraph(); | 2220 virtual void DeleteFromGraph(); |
2214 virtual void InternalSetOperandAt(int index, HValue* value) { | 2221 virtual void InternalSetOperandAt(int index, HValue* value) { |
2215 inputs_[index] = value; | 2222 inputs_[index] = value; |
2216 } | 2223 } |
2217 | 2224 |
2218 private: | 2225 private: |
2219 ZoneList<HValue*> inputs_; | 2226 ZoneList<HValue*> inputs_; |
2220 int merged_index_; | 2227 int merged_index_; |
2221 | 2228 |
(...skipping 1970 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4192 | 4199 |
4193 DECLARE_CONCRETE_INSTRUCTION(In) | 4200 DECLARE_CONCRETE_INSTRUCTION(In) |
4194 }; | 4201 }; |
4195 | 4202 |
4196 #undef DECLARE_INSTRUCTION | 4203 #undef DECLARE_INSTRUCTION |
4197 #undef DECLARE_CONCRETE_INSTRUCTION | 4204 #undef DECLARE_CONCRETE_INSTRUCTION |
4198 | 4205 |
4199 } } // namespace v8::internal | 4206 } } // namespace v8::internal |
4200 | 4207 |
4201 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ | 4208 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ |
OLD | NEW |