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 626 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
637 union IeeeDoubleBigEndianArchType { | 637 union IeeeDoubleBigEndianArchType { |
638 double d; | 638 double d; |
639 struct { | 639 struct { |
640 unsigned int sign :1; | 640 unsigned int sign :1; |
641 unsigned int exp :11; | 641 unsigned int exp :11; |
642 unsigned int man_high :20; | 642 unsigned int man_high :20; |
643 unsigned int man_low :32; | 643 unsigned int man_low :32; |
644 } bits; | 644 } bits; |
645 }; | 645 }; |
646 | 646 |
| 647 #if V8_TARGET_LITTLE_ENDIAN |
| 648 typedef IeeeDoubleLittleEndianArchType IeeeDoubleArchType; |
| 649 const int kIeeeDoubleMantissaWordOffset = 0; |
| 650 const int kIeeeDoubleExponentWordOffset = 4; |
| 651 #else |
| 652 typedef IeeeDoubleBigEndianArchType IeeeDoubleArchType; |
| 653 const int kIeeeDoubleMantissaWordOffset = 4; |
| 654 const int kIeeeDoubleExponentWordOffset = 0; |
| 655 #endif |
647 | 656 |
648 // AccessorCallback | 657 // AccessorCallback |
649 struct AccessorDescriptor { | 658 struct AccessorDescriptor { |
650 Object* (*getter)(Isolate* isolate, Object* object, void* data); | 659 Object* (*getter)(Isolate* isolate, Object* object, void* data); |
651 Object* (*setter)( | 660 Object* (*setter)( |
652 Isolate* isolate, JSObject* object, Object* value, void* data); | 661 Isolate* isolate, JSObject* object, Object* value, void* data); |
653 void* data; | 662 void* data; |
654 }; | 663 }; |
655 | 664 |
656 | 665 |
(...skipping 414 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1071 return static_cast<uint32_t>(bit_cast<uintptr_t>(address) >> | 1080 return static_cast<uint32_t>(bit_cast<uintptr_t>(address) >> |
1072 kPointerSizeLog2); | 1081 kPointerSizeLog2); |
1073 } | 1082 } |
1074 | 1083 |
1075 } // namespace internal | 1084 } // namespace internal |
1076 } // namespace v8 | 1085 } // namespace v8 |
1077 | 1086 |
1078 namespace i = v8::internal; | 1087 namespace i = v8::internal; |
1079 | 1088 |
1080 #endif // V8_GLOBALS_H_ | 1089 #endif // V8_GLOBALS_H_ |
OLD | NEW |