| 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 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 218 asm("int $3"); | 218 asm("int $3"); |
| 219 #else | 219 #else |
| 220 #error Unsupported host architecture. | 220 #error Unsupported host architecture. |
| 221 #endif | 221 #endif |
| 222 } | 222 } |
| 223 | 223 |
| 224 | 224 |
| 225 // ---------------------------------------------------------------------------- | 225 // ---------------------------------------------------------------------------- |
| 226 // Math functions | 226 // Math functions |
| 227 | 227 |
| 228 double ceiling(double x) { |
| 229 // Correct buggy 'ceil' on some systems (i.e. FreeBSD, OS X 10.5) |
| 230 return (-1.0 < x && x < 0.0) ? -0.0 : ceil(x); |
| 231 } |
| 232 |
| 233 |
| 228 double modulo(double x, double y) { | 234 double modulo(double x, double y) { |
| 229 return fmod(x, y); | 235 return fmod(x, y); |
| 230 } | 236 } |
| 231 | 237 |
| 232 | 238 |
| 233 #define UNARY_MATH_FUNCTION(name, generator) \ | 239 #define UNARY_MATH_FUNCTION(name, generator) \ |
| 234 static UnaryMathFunction fast_##name##_function = NULL; \ | 240 static UnaryMathFunction fast_##name##_function = NULL; \ |
| 235 void init_fast_##name##_function() { \ | 241 void init_fast_##name##_function() { \ |
| 236 fast_##name##_function = generator; \ | 242 fast_##name##_function = generator; \ |
| 237 } \ | 243 } \ |
| (...skipping 716 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 954 return ntohl(value); | 960 return ntohl(value); |
| 955 } | 961 } |
| 956 | 962 |
| 957 | 963 |
| 958 Socket* OS::CreateSocket() { | 964 Socket* OS::CreateSocket() { |
| 959 return new POSIXSocket(); | 965 return new POSIXSocket(); |
| 960 } | 966 } |
| 961 | 967 |
| 962 | 968 |
| 963 } } // namespace v8::internal | 969 } } // namespace v8::internal |
| OLD | NEW |