| 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 4595 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4606 public: | 4606 public: |
| 4607 static HInstruction* New(Zone* zone, | 4607 static HInstruction* New(Zone* zone, |
| 4608 HValue* context, | 4608 HValue* context, |
| 4609 HValue* left, | 4609 HValue* left, |
| 4610 HValue* right); | 4610 HValue* right); |
| 4611 | 4611 |
| 4612 virtual bool TryDecompose(DecompositionResult* decomposition) { | 4612 virtual bool TryDecompose(DecompositionResult* decomposition) { |
| 4613 if (right()->IsInteger32Constant()) { | 4613 if (right()->IsInteger32Constant()) { |
| 4614 if (decomposition->Apply(left(), 0, right()->GetInteger32Constant())) { | 4614 if (decomposition->Apply(left(), 0, right()->GetInteger32Constant())) { |
| 4615 // This is intended to look for HAdd and HSub, to handle compounds | 4615 // This is intended to look for HAdd and HSub, to handle compounds |
| 4616 // like ((base + offset) >> scale) with one single decomposition. | 4616 // like ((base + offset) >>> scale) with one single decomposition. |
| 4617 left()->TryDecompose(decomposition); | 4617 left()->TryDecompose(decomposition); |
| 4618 return true; | 4618 return true; |
| 4619 } | 4619 } |
| 4620 } | 4620 } |
| 4621 return false; | 4621 return false; |
| 4622 } | 4622 } |
| 4623 | 4623 |
| 4624 virtual Range* InferRange(Zone* zone); | 4624 virtual Range* InferRange(Zone* zone); |
| 4625 | 4625 |
| 4626 DECLARE_CONCRETE_INSTRUCTION(Shr) | 4626 DECLARE_CONCRETE_INSTRUCTION(Shr) |
| (...skipping 1864 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6491 virtual bool IsDeletable() const { return true; } | 6491 virtual bool IsDeletable() const { return true; } |
| 6492 }; | 6492 }; |
| 6493 | 6493 |
| 6494 | 6494 |
| 6495 #undef DECLARE_INSTRUCTION | 6495 #undef DECLARE_INSTRUCTION |
| 6496 #undef DECLARE_CONCRETE_INSTRUCTION | 6496 #undef DECLARE_CONCRETE_INSTRUCTION |
| 6497 | 6497 |
| 6498 } } // namespace v8::internal | 6498 } } // namespace v8::internal |
| 6499 | 6499 |
| 6500 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ | 6500 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ |
| OLD | NEW |