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:
authorGaurav Khanna <gkhanna@microsoft.com>2015-10-30 22:17:38 +0300
committerGaurav Khanna <gkhanna@microsoft.com>2015-10-30 22:17:38 +0300
commit643063bd35c1a3a8e50ab5dadb7f60ac2ad38098 (patch)
treeb18c55352659da712171ab9f46deb656311926b5 /src/Native/Runtime/eetype.cpp
parent6b4959e4c69e473e3d10132f3be536c2cc2967c7 (diff)
Fixes for Release build of ReproNativeCpp
Diffstat (limited to 'src/Native/Runtime/eetype.cpp')
-rw-r--r--src/Native/Runtime/eetype.cpp29
1 files changed, 29 insertions, 0 deletions
diff --git a/src/Native/Runtime/eetype.cpp b/src/Native/Runtime/eetype.cpp
index 5f323e7e3..0acc065a6 100644
--- a/src/Native/Runtime/eetype.cpp
+++ b/src/Native/Runtime/eetype.cpp
@@ -18,6 +18,8 @@
#include "PalRedhawk.h"
#endif
+#include "CommonMacros.inl"
+
#pragma warning(disable:4127) // C4127: conditional expression is constant
// Validate an EEType extracted from an object.
@@ -147,3 +149,30 @@ bool EEType::Validate(bool assertOnFail /* default: true */)
return true;
}
+
+//-----------------------------------------------------------------------------------------------------------
+EEType::Kinds EEType::get_Kind()
+{
+ return (Kinds)(m_usFlags & (UInt16)EETypeKindMask);
+}
+
+//-----------------------------------------------------------------------------------------------------------
+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));
+}
+
+//-----------------------------------------------------------------------------------------------------------
+EEType * EEType::get_RelatedParameterType()
+{
+ ASSERT(IsParameterizedType());
+
+ if (IsRelatedTypeViaIAT())
+ return *PTR_PTR_EEType(reinterpret_cast<TADDR>(m_RelatedType.m_ppRelatedParameterTypeViaIAT));
+ else
+ return PTR_EEType(reinterpret_cast<TADDR>(m_RelatedType.m_pRelatedParameterType));
+} \ No newline at end of file