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 3862 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3873 return H_CONSTANT_DOUBLE(d); | 3873 return H_CONSTANT_DOUBLE(d); |
3874 default: | 3874 default: |
3875 UNREACHABLE(); | 3875 UNREACHABLE(); |
3876 break; | 3876 break; |
3877 } | 3877 } |
3878 } | 3878 } |
3879 switch (op) { | 3879 switch (op) { |
3880 case kMathExp: | 3880 case kMathExp: |
3881 return H_CONSTANT_DOUBLE(fast_exp(d)); | 3881 return H_CONSTANT_DOUBLE(fast_exp(d)); |
3882 case kMathLog: | 3882 case kMathLog: |
3883 return H_CONSTANT_DOUBLE(fast_log(d)); | 3883 return H_CONSTANT_DOUBLE(log(d)); |
3884 case kMathSqrt: | 3884 case kMathSqrt: |
3885 return H_CONSTANT_DOUBLE(fast_sqrt(d)); | 3885 return H_CONSTANT_DOUBLE(fast_sqrt(d)); |
3886 case kMathPowHalf: | 3886 case kMathPowHalf: |
3887 return H_CONSTANT_DOUBLE(power_double_double(d, 0.5)); | 3887 return H_CONSTANT_DOUBLE(power_double_double(d, 0.5)); |
3888 case kMathAbs: | 3888 case kMathAbs: |
3889 return H_CONSTANT_DOUBLE((d >= 0.0) ? d + 0.0 : -d); | 3889 return H_CONSTANT_DOUBLE((d >= 0.0) ? d + 0.0 : -d); |
3890 case kMathRound: | 3890 case kMathRound: |
3891 // -0.5 .. -0.0 round to -0.0. | 3891 // -0.5 .. -0.0 round to -0.0. |
3892 if ((d >= -0.5 && Double(d).Sign() < 0)) return H_CONSTANT_DOUBLE(-0.0); | 3892 if ((d >= -0.5 && Double(d).Sign() < 0)) return H_CONSTANT_DOUBLE(-0.0); |
3893 // Doubles are represented as Significant * 2 ^ Exponent. If the | 3893 // Doubles are represented as Significant * 2 ^ Exponent. If the |
(...skipping 535 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4429 break; | 4429 break; |
4430 case kExternalMemory: | 4430 case kExternalMemory: |
4431 stream->Add("[external-memory]"); | 4431 stream->Add("[external-memory]"); |
4432 break; | 4432 break; |
4433 } | 4433 } |
4434 | 4434 |
4435 stream->Add("@%d", offset()); | 4435 stream->Add("@%d", offset()); |
4436 } | 4436 } |
4437 | 4437 |
4438 } } // namespace v8::internal | 4438 } } // namespace v8::internal |
OLD | NEW |