| 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 2066 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2077 break; | 2077 break; |
| 2078 case kMathSqrt: | 2078 case kMathSqrt: |
| 2079 case kMathPowHalf: | 2079 case kMathPowHalf: |
| 2080 case kMathLog: | 2080 case kMathLog: |
| 2081 case kMathSin: | 2081 case kMathSin: |
| 2082 case kMathCos: | 2082 case kMathCos: |
| 2083 case kMathTan: | 2083 case kMathTan: |
| 2084 set_representation(Representation::Double()); | 2084 set_representation(Representation::Double()); |
| 2085 SetGVNFlag(kChangesNewSpacePromotion); | 2085 SetGVNFlag(kChangesNewSpacePromotion); |
| 2086 break; | 2086 break; |
| 2087 case kMathExp: |
| 2088 set_representation(Representation::Double()); |
| 2089 break; |
| 2087 default: | 2090 default: |
| 2088 UNREACHABLE(); | 2091 UNREACHABLE(); |
| 2089 } | 2092 } |
| 2090 SetFlag(kUseGVN); | 2093 SetFlag(kUseGVN); |
| 2091 } | 2094 } |
| 2092 | 2095 |
| 2093 HValue* context() { return OperandAt(0); } | 2096 HValue* context() { return OperandAt(0); } |
| 2094 HValue* value() { return OperandAt(1); } | 2097 HValue* value() { return OperandAt(1); } |
| 2095 | 2098 |
| 2096 virtual void PrintDataTo(StringStream* stream); | 2099 virtual void PrintDataTo(StringStream* stream); |
| 2097 | 2100 |
| 2098 virtual HType CalculateInferredType(); | 2101 virtual HType CalculateInferredType(); |
| 2099 | 2102 |
| 2100 virtual HValue* EnsureAndPropagateNotMinusZero(BitVector* visited); | 2103 virtual HValue* EnsureAndPropagateNotMinusZero(BitVector* visited); |
| 2101 | 2104 |
| 2102 virtual Representation RequiredInputRepresentation(int index) { | 2105 virtual Representation RequiredInputRepresentation(int index) { |
| 2103 if (index == 0) { | 2106 if (index == 0) { |
| 2104 return Representation::Tagged(); | 2107 return Representation::Tagged(); |
| 2105 } else { | 2108 } else { |
| 2106 switch (op_) { | 2109 switch (op_) { |
| 2107 case kMathFloor: | 2110 case kMathFloor: |
| 2108 case kMathRound: | 2111 case kMathRound: |
| 2109 case kMathCeil: | 2112 case kMathCeil: |
| 2110 case kMathSqrt: | 2113 case kMathSqrt: |
| 2111 case kMathPowHalf: | 2114 case kMathPowHalf: |
| 2112 case kMathLog: | 2115 case kMathLog: |
| 2116 case kMathExp: |
| 2113 case kMathSin: | 2117 case kMathSin: |
| 2114 case kMathCos: | 2118 case kMathCos: |
| 2115 case kMathTan: | 2119 case kMathTan: |
| 2116 return Representation::Double(); | 2120 return Representation::Double(); |
| 2117 case kMathAbs: | 2121 case kMathAbs: |
| 2118 return representation(); | 2122 return representation(); |
| 2119 default: | 2123 default: |
| 2120 UNREACHABLE(); | 2124 UNREACHABLE(); |
| 2121 return Representation::None(); | 2125 return Representation::None(); |
| 2122 } | 2126 } |
| (...skipping 3263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5386 virtual bool IsDeletable() const { return true; } | 5390 virtual bool IsDeletable() const { return true; } |
| 5387 }; | 5391 }; |
| 5388 | 5392 |
| 5389 | 5393 |
| 5390 #undef DECLARE_INSTRUCTION | 5394 #undef DECLARE_INSTRUCTION |
| 5391 #undef DECLARE_CONCRETE_INSTRUCTION | 5395 #undef DECLARE_CONCRETE_INSTRUCTION |
| 5392 | 5396 |
| 5393 } } // namespace v8::internal | 5397 } } // namespace v8::internal |
| 5394 | 5398 |
| 5395 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ | 5399 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ |
| OLD | NEW |