summaryrefslogtreecommitdiff
path: root/src/vm/methodtablebuilder.cpp
diff options
context:
space:
mode:
authorEric Erhardt <eric.erhardt@microsoft.com>2018-01-31 10:59:35 -0600
committerEric Erhardt <eric.erhardt@microsoft.com>2018-01-31 15:06:25 -0600
commit286c43a716fd6382c1cbc730dcdd9b24705dde48 (patch)
tree43f0da08e3255adab5da667a65ec31f4d013c3c1 /src/vm/methodtablebuilder.cpp
parenta6d7f163628cac15df4e077a65b9917a3a0c018f (diff)
downloadcoreclr-286c43a716fd6382c1cbc730dcdd9b24705dde48.tar.gz
coreclr-286c43a716fd6382c1cbc730dcdd9b24705dde48.tar.bz2
coreclr-286c43a716fd6382c1cbc730dcdd9b24705dde48.zip
Add Vector<T> to CoreLib.
This requires the runtime to change to recognize the Vector classes in either System.Numerics.Vectors.dll or in System.Private.CoreLib.dll. To do this, I added the [Intrinsic] attribute to Vector<T> struct and Vector static class.
Diffstat (limited to 'src/vm/methodtablebuilder.cpp')
-rw-r--r--src/vm/methodtablebuilder.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/vm/methodtablebuilder.cpp b/src/vm/methodtablebuilder.cpp
index 1d58704bb2..dce3e3c535 100644
--- a/src/vm/methodtablebuilder.cpp
+++ b/src/vm/methodtablebuilder.cpp
@@ -1170,7 +1170,7 @@ BOOL MethodTableBuilder::CheckIfSIMDAndUpdateSize()
STANDARD_VM_CONTRACT;
#if defined(_TARGET_X86_) || defined(_TARGET_AMD64_)
- if (!GetAssembly()->IsSIMDVectorAssembly())
+ if (!(GetAssembly()->IsSIMDVectorAssembly() || GetModule()->IsSystem()))
return false;
if (bmtFP->NumInstanceFieldBytes != 16)
@@ -10432,7 +10432,8 @@ MethodTableBuilder::SetupMethodTable2(
// Currently, only SIMD types have [Intrinsic] attribute
//
// We check this here fairly early to ensure other downstream checks on these types can be slightly more efficient.
- if ((GetModule()->IsSystem() || GetAssembly()->IsSIMDVectorAssembly()) && IsValueClass() && bmtGenerics->HasInstantiation())
+ if ((GetModule()->IsSystem() || GetAssembly()->IsSIMDVectorAssembly()) &&
+ ((IsValueClass() && bmtGenerics->HasInstantiation()) || (IsAbstract() && IsSealed())))
{
HRESULT hr = GetMDImport()->GetCustomAttributeByName(bmtInternal->pType->GetTypeDefToken(),
g_CompilerServicesIntrinsicAttribute,