OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 20 matching lines...) Expand all Loading... |
31 #include <limits.h> // Required for INT_MAX etc. | 31 #include <limits.h> // Required for INT_MAX etc. |
32 #include <math.h> | 32 #include <math.h> |
33 #include <float.h> // Required for DBL_MAX and on Win32 for finite() | 33 #include <float.h> // Required for DBL_MAX and on Win32 for finite() |
34 #include <stdarg.h> | 34 #include <stdarg.h> |
35 #include "globals.h" // Required for V8_INFINITY | 35 #include "globals.h" // Required for V8_INFINITY |
36 | 36 |
37 // ---------------------------------------------------------------------------- | 37 // ---------------------------------------------------------------------------- |
38 // Extra POSIX/ANSI functions for Win32/MSVC. | 38 // Extra POSIX/ANSI functions for Win32/MSVC. |
39 | 39 |
40 #include "conversions.h" | 40 #include "conversions.h" |
| 41 #include "double.h" |
| 42 #include "platform.h" |
| 43 #include "scanner.h" |
41 #include "strtod.h" | 44 #include "strtod.h" |
42 #include "platform.h" | |
43 #include "double.h" | |
44 | 45 |
45 namespace v8 { | 46 namespace v8 { |
46 namespace internal { | 47 namespace internal { |
47 | 48 |
48 static inline double JunkStringValue() { | 49 static inline double JunkStringValue() { |
49 return std::numeric_limits<double>::quiet_NaN(); | 50 return std::numeric_limits<double>::quiet_NaN(); |
50 } | 51 } |
51 | 52 |
52 | 53 |
53 // The fast double-to-unsigned-int conversion routine does not guarantee | 54 // The fast double-to-unsigned-int conversion routine does not guarantee |
(...skipping 606 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
660 ASSERT(buffer_pos < kBufferSize); | 661 ASSERT(buffer_pos < kBufferSize); |
661 buffer[buffer_pos] = '\0'; | 662 buffer[buffer_pos] = '\0'; |
662 | 663 |
663 double converted = Strtod(Vector<const char>(buffer, buffer_pos), exponent); | 664 double converted = Strtod(Vector<const char>(buffer, buffer_pos), exponent); |
664 return negative ? -converted : converted; | 665 return negative ? -converted : converted; |
665 } | 666 } |
666 | 667 |
667 } } // namespace v8::internal | 668 } } // namespace v8::internal |
668 | 669 |
669 #endif // V8_CONVERSIONS_INL_H_ | 670 #endif // V8_CONVERSIONS_INL_H_ |
OLD | NEW |