1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-15 06:44:10 +02:00

Disallowed [Inline] on properties

This commit is contained in:
Brian Fiete 2020-02-20 09:31:27 -08:00
parent ace51cb7be
commit a781f29c31
5 changed files with 9 additions and 17 deletions

View file

@ -102,7 +102,7 @@ namespace System
} }
} }
[AttributeUsage(.Method | .Constructor | .Invocation | .Property)] [AttributeUsage(.Method | .Constructor | .Invocation)]
public struct InlineAttribute : Attribute public struct InlineAttribute : Attribute
{ {

View file

@ -102,7 +102,7 @@ namespace System
} }
} }
[AttributeUsage(.Method | .Constructor | .Invocation | .Property)] [AttributeUsage(.Method | .Constructor | .Invocation)]
public struct InlineAttribute : Attribute public struct InlineAttribute : Attribute
{ {

View file

@ -15,15 +15,15 @@ namespace System
mValue = value; mValue = value;
} }
[Inline]
public bool HasValue public bool HasValue
{ {
[Inline]
get { return mHasValue; } get { return mHasValue; }
} }
[Inline]
public T Value public T Value
{ {
[Inline]
get get
{ {
if (!mHasValue) if (!mHasValue)
@ -35,9 +35,9 @@ namespace System
} }
} }
[Inline]
public ref T ValueRef public ref T ValueRef
{ {
[Inline]
get mut get mut
{ {
if (!mHasValue) if (!mHasValue)

View file

@ -125,14 +125,6 @@ namespace System
//PrintF("Object.GCMarkMembers %08X\n", this); //PrintF("Object.GCMarkMembers %08X\n", this);
} }
public static Object ManualInit(void* ptr, TypeInstance typeInst)
{
void* addr = ptr;
let obj = *((Object*)&addr);
*(int*)&obj.mClassVData = *(int*)&typeInst.mTypeClassVData;
return obj;
}
static void ToString(Object obj, String strBuffer) static void ToString(Object obj, String strBuffer)
{ {
if (obj == null) if (obj == null)

View file

@ -51,27 +51,27 @@ namespace System
return Span<T>(array); return Span<T>(array);
} }
[Inline]
public int Length public int Length
{ {
[Inline]
get get
{ {
return mLength; return mLength;
} }
} }
[Inline]
public T* Ptr public T* Ptr
{ {
[Inline]
get get
{ {
return mPtr; return mPtr;
} }
} }
[Inline]
public T* EndPtr public T* EndPtr
{ {
[Inline]
get get
{ {
return mPtr + mLength; return mPtr + mLength;
@ -281,9 +281,9 @@ namespace System
} }
[Inline]
public T* Ptr public T* Ptr
{ {
[Inline]
get get
{ {
return mPtr; return mPtr;