Changeset 13089 in webkit for trunk/JavaScriptCore/kjs/fpconst.cpp
- Timestamp:
- Mar 2, 2006, 1:12:06 AM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/kjs/fpconst.cpp
r12315 r13089 32 32 // It would be good to figure out a 100% clean way that still avoids code that runs at init time. 33 33 34 #if __APPLE__34 #if PLATFORM(DARWIN) 35 35 36 #ifdef WORDS_BIGENDIAN 37 extern const unsigned char NaN[sizeof(double)] = { 0x7f, 0xf8, 0, 0, 0, 0, 0, 0 }; 38 extern const unsigned char Inf[sizeof(double)] = { 0x7f, 0xf0, 0, 0, 0, 0, 0, 0 }; 36 #if PLATFORM(BIG_ENDIAN) 37 extern const unsigned char NaN[sizeof(double)] = { 0x7f, 0xf8, 0, 0, 0, 0, 0, 0 }; 38 extern const unsigned char Inf[sizeof(double)] = { 0x7f, 0xf0, 0, 0, 0, 0, 0, 0 }; 39 #elif PLATFORM(MIDDLE_ENDIAN) 40 extern const unsigned char NaN[] = { 0, 0, 0xf8, 0x7f, 0, 0, 0, 0 }; 41 extern const unsigned char Inf[] = { 0, 0, 0xf0, 0x7f, 0, 0, 0, 0 }; 39 42 #else 40 extern const unsigned char NaN[sizeof(double)] = { 0, 0, 0, 0, 0, 0, 0xf8, 0x7f }; 41 extern const unsigned char Inf[sizeof(double)] = { 0, 0, 0, 0, 0, 0, 0xf0, 0x7f }; 43 extern const unsigned char NaN[sizeof(double)] = { 0, 0, 0, 0, 0, 0, 0xf8, 0x7f }; 44 extern const unsigned char Inf[sizeof(double)] = { 0, 0, 0, 0, 0, 0, 0xf0, 0x7f }; 45 #endif // PLATFORM(MIDDLE_ENDIAN) 46 47 #else // !PLATFORM(DARWIN) 48 49 #include "value.h" 50 51 #if PLATFORM(BIG_ENDIAN) 52 const unsigned char NaN_Bytes[] = { 0x7f, 0xf8, 0, 0, 0, 0, 0, 0 }; 53 const unsigned char Inf_Bytes[] = { 0x7f, 0xf0, 0, 0, 0, 0, 0, 0 }; 54 #elif PLATFORM(MIDDLE_ENDIAN) 55 const unsigned char NaN_Bytes[] = { 0, 0, 0xf8, 0x7f, 0, 0, 0, 0 }; 56 const unsigned char Inf_Bytes[] = { 0, 0, 0xf0, 0x7f, 0, 0, 0, 0 }; 57 #else 58 const unsigned char NaN_Bytes[] = { 0, 0, 0, 0, 0, 0, 0xf8, 0x7f }; 59 const unsigned char Inf_Bytes[] = { 0, 0, 0, 0, 0, 0, 0xf0, 0x7f }; 42 60 #endif 61 const double NaN = *(const double*) NaN_Bytes; 62 const double Inf = *(const double*) Inf_Bytes; 63 64 #endif // !PLATFORM(DARWIN) 43 65 44 #endif45 66 46 } 67 } // namespace KJS
Note:
See TracChangeset
for help on using the changeset viewer.