diff options
author | David Wrighton <davidwr@microsoft.com> | 2016-10-04 02:40:35 +0300 |
---|---|---|
committer | David Wrighton <davidwr@microsoft.com> | 2016-10-04 02:40:35 +0300 |
commit | 8cbbe2e629cec5115874684f4f8840b89c8883d7 (patch) | |
tree | d0bc142721286babf164674eb8803e16bcfc49a9 /src/Native/Runtime/i386 | |
parent | 99aa54c9e557bde77f0c2c17efa434307a637645 (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/i386')
-rw-r--r-- | src/Native/Runtime/i386/StubDispatch.asm | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/Native/Runtime/i386/StubDispatch.asm b/src/Native/Runtime/i386/StubDispatch.asm index 3a0873609..037505edc 100644 --- a/src/Native/Runtime/i386/StubDispatch.asm +++ b/src/Native/Runtime/i386/StubDispatch.asm @@ -149,6 +149,21 @@ RhpInterfaceDispatchNullReference proc public int 3 RhpInterfaceDispatchNullReference endp +;; Stub dispatch routine for dispatch to a vtable slot +_RhpVTableOffsetDispatch proc public + ;; eax currently contains the indirection cell address. We need to update it to point to the vtable offset (which is in the m_pCache field) + mov eax, [eax + OFFSETOF__InterfaceDispatchCell__m_pCache] + + ;; add the vtable offset to the EEType pointer + add eax, [ecx] + + ;; Load the target address of the vtable into eax + mov eax, [eax] + + ;; tail-jump to the target + jmp eax +_RhpVTableOffsetDispatch endp + ;; Initial dispatch on an interface when we don't have a cache yet. _RhpInitialInterfaceDispatch proc public |