| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef V8_GLOBALS_H_ | 5 #ifndef V8_GLOBALS_H_ |
| 6 #define V8_GLOBALS_H_ | 6 #define V8_GLOBALS_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| (...skipping 613 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 624 // inlined within v8 runtime, rather than going to the underlying | 624 // inlined within v8 runtime, rather than going to the underlying |
| 625 // platform headers and libraries | 625 // platform headers and libraries |
| 626 union IeeeDoubleLittleEndianArchType { | 626 union IeeeDoubleLittleEndianArchType { |
| 627 double d; | 627 double d; |
| 628 struct { | 628 struct { |
| 629 unsigned int man_low :32; | 629 unsigned int man_low :32; |
| 630 unsigned int man_high :20; | 630 unsigned int man_high :20; |
| 631 unsigned int exp :11; | 631 unsigned int exp :11; |
| 632 unsigned int sign :1; | 632 unsigned int sign :1; |
| 633 } bits; | 633 } bits; |
| 634 |
| 635 static const int kMantissaWordOffset = 0; |
| 636 static const int kExponentWordOffset = 4; |
| 634 }; | 637 }; |
| 635 | 638 |
| 636 | 639 |
| 637 union IeeeDoubleBigEndianArchType { | 640 union IeeeDoubleBigEndianArchType { |
| 638 double d; | 641 double d; |
| 639 struct { | 642 struct { |
| 640 unsigned int sign :1; | 643 unsigned int sign :1; |
| 641 unsigned int exp :11; | 644 unsigned int exp :11; |
| 642 unsigned int man_high :20; | 645 unsigned int man_high :20; |
| 643 unsigned int man_low :32; | 646 unsigned int man_low :32; |
| 644 } bits; | 647 } bits; |
| 648 |
| 649 static const int kMantissaWordOffset = 4; |
| 650 static const int kExponentWordOffset = 0; |
| 645 }; | 651 }; |
| 646 | 652 |
| 653 #if V8_TARGET_LITTLE_ENDIAN |
| 654 typedef IeeeDoubleLittleEndianArchType IeeeDoubleArchType; |
| 655 #else |
| 656 typedef IeeeDoubleBigEndianArchType IeeeDoubleArchType; |
| 657 #endif |
| 647 | 658 |
| 648 // AccessorCallback | 659 // AccessorCallback |
| 649 struct AccessorDescriptor { | 660 struct AccessorDescriptor { |
| 650 Object* (*getter)(Isolate* isolate, Object* object, void* data); | 661 Object* (*getter)(Isolate* isolate, Object* object, void* data); |
| 651 Object* (*setter)( | 662 Object* (*setter)( |
| 652 Isolate* isolate, JSObject* object, Object* value, void* data); | 663 Isolate* isolate, JSObject* object, Object* value, void* data); |
| 653 void* data; | 664 void* data; |
| 654 }; | 665 }; |
| 655 | 666 |
| 656 | 667 |
| (...skipping 414 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1071 return static_cast<uint32_t>(bit_cast<uintptr_t>(address) >> | 1082 return static_cast<uint32_t>(bit_cast<uintptr_t>(address) >> |
| 1072 kPointerSizeLog2); | 1083 kPointerSizeLog2); |
| 1073 } | 1084 } |
| 1074 | 1085 |
| 1075 } // namespace internal | 1086 } // namespace internal |
| 1076 } // namespace v8 | 1087 } // namespace v8 |
| 1077 | 1088 |
| 1078 namespace i = v8::internal; | 1089 namespace i = v8::internal; |
| 1079 | 1090 |
| 1080 #endif // V8_GLOBALS_H_ | 1091 #endif // V8_GLOBALS_H_ |
| OLD | NEW |