Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/corert.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Wrighton <davidwr@microsoft.com>2017-05-17 04:42:43 +0300
committerDavid Wrighton <davidwr@microsoft.com>2017-05-17 04:42:43 +0300
commit0fb20786300a52505a011d84b44ff6ebc5475556 (patch)
tree5326a3029e3ac2c06abe43c559b394dac94fc72b /src/Runtime.Base
parentd762c0277e666f85c3cbe60ca73a772ae31cd8b4 (diff)
Lazy Generics
- Instead of performing lazy lookups at individual use sites, perform a single lazy lookup to get a dictionary, and then use normal canonical lookups from there - Shares logic with USG dictionary acquisition, and with normal canonical codegen - Add LazyGenericPolicy nob to CoreRT environment to control policy Universal Shared Generics Changes - Fixup EETypeNode generation for USG types - Consider TemplateTypeLayout necessary for all universal generic canon types - Use RhAllocLocal2 which returns a byref to the first field of the "local" object instead of the start of the object. - Tweak USG field invoke map generation to not stop compilation. Still needs to be implemented. [tfs-changeset: 1658670]
Diffstat (limited to 'src/Runtime.Base')
-rw-r--r--src/Runtime.Base/src/System/Runtime/RuntimeExports.cs19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/Runtime.Base/src/System/Runtime/RuntimeExports.cs b/src/Runtime.Base/src/System/Runtime/RuntimeExports.cs
index eb5c5e432..3c8868bf5 100644
--- a/src/Runtime.Base/src/System/Runtime/RuntimeExports.cs
+++ b/src/Runtime.Base/src/System/Runtime/RuntimeExports.cs
@@ -270,6 +270,25 @@ namespace System.Runtime
return new Wrapper();
}
+ // RhAllocLocal2 helper returns the pointer to the data region directly
+ // instead of relying on the code generator to offset the local by the
+ // size of a pointer to get the data region.
+ [RuntimeExport("RhAllocLocal2")]
+ public static unsafe ref byte RhAllocLocal2(EETypePtr pEEType)
+ {
+ EEType* ptrEEType = (EEType*)pEEType.ToPointer();
+ if (ptrEEType->IsValueType)
+ {
+#if FEATURE_64BIT_ALIGNMENT
+ if (ptrEEType->RequiresAlign8)
+ return ref InternalCalls.RhpNewFastMisalign(ptrEEType).GetRawData();
+#endif
+ return ref InternalCalls.RhpNewFast(ptrEEType).GetRawData();
+ }
+ else
+ return ref new Wrapper().GetRawData();
+ }
+
[RuntimeExport("RhMemberwiseClone")]
public static unsafe object RhMemberwiseClone(object src)
{