OLD | NEW |
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 #ifndef VM_GLOBALS_H_ | 5 #ifndef VM_GLOBALS_H_ |
6 #define VM_GLOBALS_H_ | 6 #define VM_GLOBALS_H_ |
7 | 7 |
8 // This file contains global definitions for the VM library only. Anything that | 8 // This file contains global definitions for the VM library only. Anything that |
9 // is more globally useful should be added to 'vm/globals.h'. | 9 // is more globally useful should be added to 'vm/globals.h'. |
10 | 10 |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 return reinterpret_cast<type*>(result); \ | 65 return reinterpret_cast<type*>(result); \ |
66 } while (0) | 66 } while (0) |
67 | 67 |
68 | 68 |
69 // A type large enough to contain the value of the C++ vtable. This is needed | 69 // A type large enough to contain the value of the C++ vtable. This is needed |
70 // to support the handle operations. | 70 // to support the handle operations. |
71 typedef uword cpp_vtable; | 71 typedef uword cpp_vtable; |
72 | 72 |
73 | 73 |
74 // When using GCC we can use GCC attributes to ensure that certain | 74 // When using GCC we can use GCC attributes to ensure that certain |
75 // contants are 16 byte aligned. | 75 // contants are 8 or 16 byte aligned. |
76 #if defined(TARGET_OS_WINDOWS) | 76 #if defined(TARGET_OS_WINDOWS) |
| 77 #define ALIGN8 __declspec(align(8)) |
77 #define ALIGN16 __declspec(align(16)) | 78 #define ALIGN16 __declspec(align(16)) |
78 #else | 79 #else |
| 80 #define ALIGN8 __attribute__((aligned(8))) |
79 #define ALIGN16 __attribute__((aligned(16))) | 81 #define ALIGN16 __attribute__((aligned(16))) |
80 #endif | 82 #endif |
81 | 83 |
82 | 84 |
83 // Zap value used to indicate uninitialized handle area (debug purposes). | 85 // Zap value used to indicate uninitialized handle area (debug purposes). |
84 #if defined(ARCH_IS_32_BIT) | 86 #if defined(ARCH_IS_32_BIT) |
85 static const uword kZapUninitializedWord = 0xabababab; | 87 static const uword kZapUninitializedWord = 0xabababab; |
86 #else | 88 #else |
87 static const uword kZapUninitializedWord = 0xabababababababab; | 89 static const uword kZapUninitializedWord = 0xabababababababab; |
88 #endif | 90 #endif |
89 | 91 |
90 | 92 |
91 } // namespace dart | 93 } // namespace dart |
92 | 94 |
93 #endif // VM_GLOBALS_H_ | 95 #endif // VM_GLOBALS_H_ |
OLD | NEW |