Implement runtime support for ICastable interface
authorEugene Zemtsov <Eugene.Zemtsov@microsoft.com>
Wed, 18 Mar 2015 21:40:26 +0000 (14:40 -0700)
committerEugene Zemtsov <Eugene.Zemtsov@microsoft.com>
Wed, 18 Mar 2015 21:40:26 +0000 (14:40 -0700)
commitd5f60bdffa5507359af953bed646d47f89929c18
tree8bab64ed6d0eebc23cf3179e3fc83b015f8ba623
parent65843fdba94820ce3566396ececdeb8ffd00f09c
Implement runtime support for ICastable interface

The goal of this change is to facilitate an alternative (MCG based) way of doing COM interop, we're going to use it on Unix platforms.
New ICastable interface allows objects to pretend at runtime that they support an interface and to provide an alternative type that is used to resolve actual calls to interface methods.
BE VERY CAREFUL: This is a very dangerous feature, and at this stage it can easily lead to memory corruption without any native code involved.
Reviewers: Yi Zhang, Noah Falk, Jan Kotas. DDR clean.

[tfs-changeset: 1435198]
25 files changed:
CMakeLists.txt
src/debug/daccess/nidump.cpp
src/inc/dacvars.h
src/mscorlib/model.xml
src/mscorlib/mscorlib.shared.sources.props
src/mscorlib/src/System/Runtime/CompilerServices/ICastable.cs [new file with mode: 0644]
src/vm/amd64/asmconstants.h
src/vm/appdomain.cpp
src/vm/i386/asmconstants.h
src/vm/jithelpers.cpp
src/vm/metasig.h
src/vm/methodtable.cpp
src/vm/methodtable.h
src/vm/methodtablebuilder.cpp
src/vm/mscorlib.h
src/vm/prestub.cpp
src/vm/vars.cpp
src/vm/vars.hpp
src/vm/virtualcallstub.cpp
src/vm/virtualcallstub.h
tests/src/Interop/ICastable/Castable.cs [new file with mode: 0644]
tests/src/Interop/ICastable/Castable.csproj [new file with mode: 0644]
tests/src/Interop/ICastable/app.config [new file with mode: 0644]
tests/src/Interop/ICastable/packages.config [new file with mode: 0644]
tests/src/dir.targets