diff options
author | Simon Nattress <simonn@microsoft.com> | 2017-04-25 01:13:30 +0300 |
---|---|---|
committer | Simon Nattress <simonn@microsoft.com> | 2017-04-25 01:13:30 +0300 |
commit | 93f48811969c4aef7f3e9b2b8bb4d1343e027171 (patch) | |
tree | 54d91157ac858a3aa05f885965b30a8fe3cd75dc /src/Native/Runtime/RuntimeInstance.cpp | |
parent | 57f802d64fdb33617f091a5c81ec93ead3e6e831 (diff) |
Remove native runtime lookups for static field data
* Remove RhGetNonGcStaticFieldData and RhGetGcStaticFieldData. Both of these optional EEType fields are now available via the managed EEType.cs surface area making special runtime accessor APIs unnecessary.
* Fix the level of indirection in the getter for static data in EEType.cs. It should return a pointer-to-a-pointer just as the native EEType code does.
[tfs-changeset: 1655766]
Diffstat (limited to 'src/Native/Runtime/RuntimeInstance.cpp')
-rw-r--r-- | src/Native/Runtime/RuntimeInstance.cpp | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/src/Native/Runtime/RuntimeInstance.cpp b/src/Native/Runtime/RuntimeInstance.cpp index 608aba01d..0151128d9 100644 --- a/src/Native/Runtime/RuntimeInstance.cpp +++ b/src/Native/Runtime/RuntimeInstance.cpp @@ -844,37 +844,6 @@ COOP_PINVOKE_HELPER(PTR_UInt8, RhGetThreadLocalStorageForDynamicType, (UInt32 uO return pCurrentThread->AllocateThreadLocalStorageForDynamicType(uOffset, tlsStorageSize, numTlsCells); } -COOP_PINVOKE_HELPER(void *, RhGetNonGcStaticFieldData, (EEType * pEEType)) -{ - // We shouldn't be attempting to get the gc/non-gc statics data for non-dynamic types... - // For non-dynamic types, that info should have been hashed in a table and stored in its corresponding blob in the image. - ASSERT(pEEType->IsDynamicType()); - - if (pEEType->HasDynamicNonGcStatics()) - { - return pEEType->get_DynamicNonGcStaticsPointer(); - } - - return NULL; -} - -COOP_PINVOKE_HELPER(void *, RhGetGcStaticFieldData, (EEType * pEEType)) -{ - // We shouldn't be attempting to get the gc/non-gc statics data for non-dynamic types... - // For non-dynamic types, that info should have been hashed in a table and stored in its corresponding blob in the image. - // The reason we don't want to do the lookup for non-dynamic types is that LookupGenericInstance will do the lookup in - // a hashtable that *only* has the GIDs with variance. If we were to store all GIDs in that hashtable, we'd be violating - // pay-for-play principles - ASSERT(pEEType->IsDynamicType()); - - if (pEEType->HasDynamicGcStatics()) - { - return pEEType->get_DynamicGcStaticsPointer(); - } - - return NULL; -} - #ifndef FEATURE_RX_THUNKS COOP_PINVOKE_HELPER(void*, RhpGetThunksBase, ()); |