OLD | NEW |
1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 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 1371 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1382 case kMathCeil: | 1382 case kMathCeil: |
1383 set_representation(Representation::Integer32()); | 1383 set_representation(Representation::Integer32()); |
1384 break; | 1384 break; |
1385 case kMathAbs: | 1385 case kMathAbs: |
1386 set_representation(Representation::Tagged()); | 1386 set_representation(Representation::Tagged()); |
1387 SetFlag(kFlexibleRepresentation); | 1387 SetFlag(kFlexibleRepresentation); |
1388 break; | 1388 break; |
1389 case kMathSqrt: | 1389 case kMathSqrt: |
1390 case kMathPowHalf: | 1390 case kMathPowHalf: |
1391 case kMathLog: | 1391 case kMathLog: |
| 1392 case kMathSin: |
| 1393 case kMathCos: |
1392 set_representation(Representation::Double()); | 1394 set_representation(Representation::Double()); |
1393 break; | 1395 break; |
1394 default: | 1396 default: |
1395 UNREACHABLE(); | 1397 UNREACHABLE(); |
1396 } | 1398 } |
1397 SetFlag(kUseGVN); | 1399 SetFlag(kUseGVN); |
1398 } | 1400 } |
1399 | 1401 |
1400 virtual void PrintDataTo(StringStream* stream) const; | 1402 virtual void PrintDataTo(StringStream* stream) const; |
1401 | 1403 |
1402 virtual HType CalculateInferredType() const; | 1404 virtual HType CalculateInferredType() const; |
1403 | 1405 |
1404 virtual HValue* EnsureAndPropagateNotMinusZero(BitVector* visited); | 1406 virtual HValue* EnsureAndPropagateNotMinusZero(BitVector* visited); |
1405 | 1407 |
1406 virtual Representation RequiredInputRepresentation(int index) const { | 1408 virtual Representation RequiredInputRepresentation(int index) const { |
1407 switch (op_) { | 1409 switch (op_) { |
1408 case kMathFloor: | 1410 case kMathFloor: |
1409 case kMathRound: | 1411 case kMathRound: |
1410 case kMathCeil: | 1412 case kMathCeil: |
1411 case kMathSqrt: | 1413 case kMathSqrt: |
1412 case kMathPowHalf: | 1414 case kMathPowHalf: |
1413 case kMathLog: | 1415 case kMathLog: |
| 1416 case kMathSin: |
| 1417 case kMathCos: |
1414 return Representation::Double(); | 1418 return Representation::Double(); |
1415 break; | 1419 break; |
1416 case kMathAbs: | 1420 case kMathAbs: |
1417 return representation(); | 1421 return representation(); |
1418 break; | 1422 break; |
1419 default: | 1423 default: |
1420 return Representation::None(); | 1424 return Representation::None(); |
1421 } | 1425 } |
1422 } | 1426 } |
1423 | 1427 |
(...skipping 1516 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2940 HValue* object() const { return left(); } | 2944 HValue* object() const { return left(); } |
2941 HValue* key() const { return right(); } | 2945 HValue* key() const { return right(); } |
2942 }; | 2946 }; |
2943 | 2947 |
2944 #undef DECLARE_INSTRUCTION | 2948 #undef DECLARE_INSTRUCTION |
2945 #undef DECLARE_CONCRETE_INSTRUCTION | 2949 #undef DECLARE_CONCRETE_INSTRUCTION |
2946 | 2950 |
2947 } } // namespace v8::internal | 2951 } } // namespace v8::internal |
2948 | 2952 |
2949 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ | 2953 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ |
OLD | NEW |