diff options
author | Fadi Hanna <fadim@microsoft.com> | 2017-09-13 01:07:07 +0300 |
---|---|---|
committer | Fadi Hanna <fadim@microsoft.com> | 2017-09-13 01:07:07 +0300 |
commit | 92a6a3b1ae4aff4b3a904fed104d253f7d863a36 (patch) | |
tree | 6933a7db8ebdb1ba0338019137e65b75dfe9a2a0 /src/Native/Runtime/ICodeManager.h | |
parent | 665c60acc7f188d4a5e81c96f39431de1352b901 (diff) |
These changes provide a way for ProjectX/CoreRT to get the target of custom instantiating unboxing stubs.
The implementation uses a general purpose infrastructure that can associate custom data to methods with unwind info, given the fact that unwind info lookups are very fast.
Similar to GC info and EH info, this implementation now provides a way to associate any custom data to methods, by adding a flag and a reloc to the data in the method's unwind info.
The custom data that can be attached to methods begin with a flag (indicating what data follows), followed by data.
Right now, the only custom data we have for methods are unboxing stub target pointers.
The dependency analysis models this custom data using a new node type: MethodAssociatedDataNode.
The custom data (when it exists) can be be retrieved using a new API on ICodeManager.
The changes also include all the necessary plumbing to link custom data nodes symbols for PX (given that it's UTC that emits the unwind info)
[tfs-changeset: 1673664]
Diffstat (limited to 'src/Native/Runtime/ICodeManager.h')
-rw-r--r-- | src/Native/Runtime/ICodeManager.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/Native/Runtime/ICodeManager.h b/src/Native/Runtime/ICodeManager.h index 7cbfc1838..3d5af20fd 100644 --- a/src/Native/Runtime/ICodeManager.h +++ b/src/Native/Runtime/ICodeManager.h @@ -80,6 +80,12 @@ enum class ClasslibFunctionId OnFirstChanceException = 6, }; +enum class AssociatedDataFlags : unsigned char +{ + None = 0, + HasUnboxingStubTarget = 1, +}; + class ICodeManager { public: @@ -119,4 +125,9 @@ public: virtual PTR_VOID GetMethodStartAddress(MethodInfo * pMethodInfo) = 0; virtual void * GetClasslibFunction(ClasslibFunctionId functionId) = 0; + + // Returns any custom data attached to the method. Format: + // AssociatedDataFlags // 1 byte. Flags describing the data stored + // Data (stream of bytes) // Variable size (depending on flags). Custom data associated with method + virtual PTR_VOID GetAssociatedData(PTR_VOID ControlPC) = 0; }; |