Please sign in to comment.
Add objheader_common.h that contains SIZEOF_OBJHEADER and can be used…
… from eveywhere (as it was previously not accessible from JIT for example). Always use a 8 bytes ObjHeader and add extra bits for Class Allocated on stack. Update codegen to identity allocation on the stack.
- Loading branch information...
Showing with 40 additions and 59 deletions.
|@@ -0,0 +1,19 @@|
|// Copyright (c) Microsoft. All rights reserved.|
|// Licensed under the MIT license. See LICENSE file in the project root for full license information.|
|// The GC is highly dependent on SIZE_OF_OBJHEADER being exactly the sizeof(ObjHeader)|
|// We define this macro so that the preprocessor can calculate padding structures.|
|// ClassAsValue: We use now 8 bytes for the object header by default|
|#define SIZEOF_OBJHEADER 8|
|// ClassAsVaue: Extra bits to handle identity allocated object on the stack|
|#define BIT_OBJHEADER_STACK_ALLOCATED 0x00000001|
|#define BIT_OBJHEADER_EMBED_ALLOCATED 0x00000002|
|#define BIT_OBJHEADER_EMBED_OFFSET_MASK 0xFFFFFFFC|