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 3743 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3754 void SetOperandPositions(Zone* zone, | 3754 void SetOperandPositions(Zone* zone, |
3755 HSourcePosition left_pos, | 3755 HSourcePosition left_pos, |
3756 HSourcePosition right_pos) { | 3756 HSourcePosition right_pos) { |
3757 set_operand_position(zone, 1, left_pos); | 3757 set_operand_position(zone, 1, left_pos); |
3758 set_operand_position(zone, 2, right_pos); | 3758 set_operand_position(zone, 2, right_pos); |
3759 } | 3759 } |
3760 | 3760 |
3761 bool RightIsPowerOf2() { | 3761 bool RightIsPowerOf2() { |
3762 if (!right()->IsInteger32Constant()) return false; | 3762 if (!right()->IsInteger32Constant()) return false; |
3763 int32_t value = right()->GetInteger32Constant(); | 3763 int32_t value = right()->GetInteger32Constant(); |
3764 return value != 0 && (IsPowerOf2(value) || IsPowerOf2(-value)); | 3764 return IsPowerOf2(value) || IsPowerOf2(-value); |
3765 } | 3765 } |
3766 | 3766 |
3767 DECLARE_ABSTRACT_INSTRUCTION(BinaryOperation) | 3767 DECLARE_ABSTRACT_INSTRUCTION(BinaryOperation) |
3768 | 3768 |
3769 private: | 3769 private: |
3770 bool IgnoreObservedOutputRepresentation(Representation current_rep); | 3770 bool IgnoreObservedOutputRepresentation(Representation current_rep); |
3771 | 3771 |
3772 Representation observed_input_representation_[2]; | 3772 Representation observed_input_representation_[2]; |
3773 Representation observed_output_representation_; | 3773 Representation observed_output_representation_; |
3774 }; | 3774 }; |
(...skipping 3752 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7527 virtual bool IsDeletable() const V8_OVERRIDE { return true; } | 7527 virtual bool IsDeletable() const V8_OVERRIDE { return true; } |
7528 }; | 7528 }; |
7529 | 7529 |
7530 | 7530 |
7531 #undef DECLARE_INSTRUCTION | 7531 #undef DECLARE_INSTRUCTION |
7532 #undef DECLARE_CONCRETE_INSTRUCTION | 7532 #undef DECLARE_CONCRETE_INSTRUCTION |
7533 | 7533 |
7534 } } // namespace v8::internal | 7534 } } // namespace v8::internal |
7535 | 7535 |
7536 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ | 7536 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ |
OLD | NEW |