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>2016-10-04 02:40:35 +0300
committerDavid Wrighton <davidwr@microsoft.com>2016-10-04 02:40:35 +0300
commit8cbbe2e629cec5115874684f4f8840b89c8883d7 (patch)
treed0bc142721286babf164674eb8803e16bcfc49a9 /src/Native/Runtime/eetype.cpp
parent99aa54c9e557bde77f0c2c17efa434307a637645 (diff)
Add support for interface dispatch to have a codepath that supports resolution from a metadata token
- Instead of an interface/slot pair - Cell information is now consolidated into a structure instead of being passed around as a tuple of interface/slot - Encoding is more complex to avoid bloating the data format - In addition to interface dispatch, the logic is also able to perform vtable dispatch - Add support for the concept of dynamic modules - A dynamic module provides a set of callbacks that are special around the behavior of interface dispatch - ModuleList associates a DynamicModule with normal module. At some point we will consolidate the DynamicModule with the ModuleManager Miscellaneous changes - New variant of LockFreeReaderHashtable to be used with native pointers. - Support for a cloned type to be cloned based on a direct pointer instead of an indirection [tfs-changeset: 1630711]
Diffstat (limited to 'src/Native/Runtime/eetype.cpp')
-rw-r--r--src/Native/Runtime/eetype.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/Native/Runtime/eetype.cpp b/src/Native/Runtime/eetype.cpp
index b1cea129a..82edd8aaf 100644
--- a/src/Native/Runtime/eetype.cpp
+++ b/src/Native/Runtime/eetype.cpp
@@ -81,8 +81,7 @@ bool EEType::Validate(bool assertOnFail /* default: true */)
case 2:
{
// Cloned string.
- if (!IsRelatedTypeViaIAT() ||
- get_IsValueType() ||
+ if (get_IsValueType() ||
HasFinalizer() ||
HasReferenceFields() ||
HasGenericVariance())
@@ -150,9 +149,10 @@ EEType * EEType::get_CanonicalEEType()
{
// cloned EETypes must always refer to types in other modules
ASSERT(IsCloned());
- ASSERT(IsRelatedTypeViaIAT());
-
- return *PTR_PTR_EEType(reinterpret_cast<TADDR>(m_RelatedType.m_ppCanonicalTypeViaIAT));
+ if (IsRelatedTypeViaIAT())
+ return *PTR_PTR_EEType(reinterpret_cast<TADDR>(m_RelatedType.m_ppCanonicalTypeViaIAT));
+ else
+ return PTR_EEType(reinterpret_cast<TADDR>(m_RelatedType.m_pCanonicalType)); // in the R2R case, the link is direct rather than indirect via the IAT
}
//-----------------------------------------------------------------------------------------------------------