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 3093 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3104 }; | 3104 }; |
3105 | 3105 |
3106 | 3106 |
3107 class HMathFloorOfDiv: public HBinaryOperation { | 3107 class HMathFloorOfDiv: public HBinaryOperation { |
3108 public: | 3108 public: |
3109 HMathFloorOfDiv(HValue* context, HValue* left, HValue* right) | 3109 HMathFloorOfDiv(HValue* context, HValue* left, HValue* right) |
3110 : HBinaryOperation(context, left, right) { | 3110 : HBinaryOperation(context, left, right) { |
3111 set_representation(Representation::Integer32()); | 3111 set_representation(Representation::Integer32()); |
3112 SetFlag(kUseGVN); | 3112 SetFlag(kUseGVN); |
3113 SetFlag(kCanOverflow); | 3113 SetFlag(kCanOverflow); |
| 3114 if (!right->IsConstant()) { |
| 3115 SetFlag(kCanBeDivByZero); |
| 3116 } |
3114 } | 3117 } |
3115 | 3118 |
3116 virtual HValue* EnsureAndPropagateNotMinusZero(BitVector* visited); | 3119 virtual HValue* EnsureAndPropagateNotMinusZero(BitVector* visited); |
3117 | 3120 |
3118 virtual Representation RequiredInputRepresentation(int index) { | 3121 virtual Representation RequiredInputRepresentation(int index) { |
3119 return Representation::Integer32(); | 3122 return Representation::Integer32(); |
3120 } | 3123 } |
3121 | 3124 |
3122 DECLARE_CONCRETE_INSTRUCTION(MathFloorOfDiv) | 3125 DECLARE_CONCRETE_INSTRUCTION(MathFloorOfDiv) |
3123 | 3126 |
(...skipping 2395 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5519 virtual bool IsDeletable() const { return true; } | 5522 virtual bool IsDeletable() const { return true; } |
5520 }; | 5523 }; |
5521 | 5524 |
5522 | 5525 |
5523 #undef DECLARE_INSTRUCTION | 5526 #undef DECLARE_INSTRUCTION |
5524 #undef DECLARE_CONCRETE_INSTRUCTION | 5527 #undef DECLARE_CONCRETE_INSTRUCTION |
5525 | 5528 |
5526 } } // namespace v8::internal | 5529 } } // namespace v8::internal |
5527 | 5530 |
5528 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ | 5531 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ |
OLD | NEW |