mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-20 08:58:00 +02:00
Expose AllocStackCount
to corlib
This commit is contained in:
parent
b0aa27c82c
commit
111b785081
6 changed files with 19 additions and 3 deletions
|
@ -2,6 +2,12 @@ namespace System
|
|||
{
|
||||
class Compiler
|
||||
{
|
||||
public static class Options
|
||||
{
|
||||
[LinkName("#AllocStackCount")]
|
||||
public static extern int32 AllocStackCount;
|
||||
}
|
||||
|
||||
[LinkName("#CallerLineNum")]
|
||||
public static extern int CallerLineNum;
|
||||
|
||||
|
|
|
@ -1117,7 +1117,7 @@ namespace System.Reflection
|
|||
let genericType = GetGenericArg(0);
|
||||
let arraySize = [Friend]mInstSize - genericType.Size + genericType.Stride * count;
|
||||
#if BF_ENABLE_OBJECT_DEBUG_FLAGS
|
||||
obj = Internal.Dbg_ObjectAlloc([Friend]mTypeClassVData, arraySize, [Friend]mInstAlign, 1);
|
||||
obj = Internal.Dbg_ObjectAlloc([Friend]mTypeClassVData, arraySize, [Friend]mInstAlign, Compiler.Options.AllocStackCount);
|
||||
#else
|
||||
void* mem = new [Align(16)] uint8[arraySize]* (?);
|
||||
obj = Internal.UnsafeCastToObject(mem);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue