| 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 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 192 fast_##name##_function = generator; \ | 192 fast_##name##_function = generator; \ |
| 193 } \ | 193 } \ |
| 194 double fast_##name(double x) { \ | 194 double fast_##name(double x) { \ |
| 195 return (*fast_##name##_function)(x); \ | 195 return (*fast_##name##_function)(x); \ |
| 196 } | 196 } |
| 197 | 197 |
| 198 UNARY_MATH_FUNCTION(sin, CreateTranscendentalFunction(TranscendentalCache::SIN)) | 198 UNARY_MATH_FUNCTION(sin, CreateTranscendentalFunction(TranscendentalCache::SIN)) |
| 199 UNARY_MATH_FUNCTION(cos, CreateTranscendentalFunction(TranscendentalCache::COS)) | 199 UNARY_MATH_FUNCTION(cos, CreateTranscendentalFunction(TranscendentalCache::COS)) |
| 200 UNARY_MATH_FUNCTION(tan, CreateTranscendentalFunction(TranscendentalCache::TAN)) | 200 UNARY_MATH_FUNCTION(tan, CreateTranscendentalFunction(TranscendentalCache::TAN)) |
| 201 UNARY_MATH_FUNCTION(log, CreateTranscendentalFunction(TranscendentalCache::LOG)) | 201 UNARY_MATH_FUNCTION(log, CreateTranscendentalFunction(TranscendentalCache::LOG)) |
| 202 UNARY_MATH_FUNCTION(exp, CreateExpFunction()) |
| 202 UNARY_MATH_FUNCTION(sqrt, CreateSqrtFunction()) | 203 UNARY_MATH_FUNCTION(sqrt, CreateSqrtFunction()) |
| 203 | 204 |
| 204 #undef MATH_FUNCTION | 205 #undef MATH_FUNCTION |
| 205 | 206 |
| 206 | 207 |
| 208 void lazily_initialize_fast_exp() { |
| 209 if (fast_exp_function == NULL) { |
| 210 init_fast_exp_function(); |
| 211 } |
| 212 } |
| 213 |
| 214 |
| 207 void MathSetup() { | 215 void MathSetup() { |
| 208 #ifdef _WIN64 | 216 #ifdef _WIN64 |
| 209 init_modulo_function(); | 217 init_modulo_function(); |
| 210 #endif | 218 #endif |
| 211 init_fast_sin_function(); | 219 init_fast_sin_function(); |
| 212 init_fast_cos_function(); | 220 init_fast_cos_function(); |
| 213 init_fast_tan_function(); | 221 init_fast_tan_function(); |
| 214 init_fast_log_function(); | 222 init_fast_log_function(); |
| 223 // fast_exp is initialized lazily. |
| 215 init_fast_sqrt_function(); | 224 init_fast_sqrt_function(); |
| 216 } | 225 } |
| 217 | 226 |
| 218 | 227 |
| 219 // ---------------------------------------------------------------------------- | 228 // ---------------------------------------------------------------------------- |
| 220 // The Time class represents time on win32. A timestamp is represented as | 229 // The Time class represents time on win32. A timestamp is represented as |
| 221 // a 64-bit integer in 100 nanoseconds since January 1, 1601 (UTC). JavaScript | 230 // a 64-bit integer in 100 nanoseconds since January 1, 1601 (UTC). JavaScript |
| 222 // timestamps are represented as a doubles in milliseconds since 00:00:00 UTC, | 231 // timestamps are represented as a doubles in milliseconds since 00:00:00 UTC, |
| 223 // January 1, 1970. | 232 // January 1, 1970. |
| 224 | 233 |
| (...skipping 1917 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2142 | 2151 |
| 2143 void Sampler::StartSampling() { | 2152 void Sampler::StartSampling() { |
| 2144 } | 2153 } |
| 2145 | 2154 |
| 2146 | 2155 |
| 2147 void Sampler::StopSampling() { | 2156 void Sampler::StopSampling() { |
| 2148 } | 2157 } |
| 2149 | 2158 |
| 2150 | 2159 |
| 2151 } } // namespace v8::internal | 2160 } } // namespace v8::internal |
| OLD | NEW |