diff options
author | Michal Strehovský <michals@microsoft.com> | 2015-11-12 07:32:17 +0300 |
---|---|---|
committer | Michal Strehovský <michals@microsoft.com> | 2015-11-12 07:39:30 +0300 |
commit | 29b591029029ae90785ffd4bc14d7e94265b927d (patch) | |
tree | 994f1cafb228dc6a047939993a7b73fda58b8e14 /src/JitInterface | |
parent | c4cc286c6308ccb16a715ecadd6c4dc9c06d3b1a (diff) |
Add support for pinned locals
With this change, local variables can no longer be represented as
an array of TypeDefs, so adding a new structure that will hold
the TypeDef and additional metadata.
Most of the changes are just a ripple effect.
We are now reporting pinned locals to RyuJIT.
Diffstat (limited to 'src/JitInterface')
-rw-r--r-- | src/JitInterface/src/CorInfoImpl.cs | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/JitInterface/src/CorInfoImpl.cs b/src/JitInterface/src/CorInfoImpl.cs index c3a0ba7cc..1eb16931f 100644 --- a/src/JitInterface/src/CorInfoImpl.cs +++ b/src/JitInterface/src/CorInfoImpl.cs @@ -226,7 +226,7 @@ namespace Internal.JitInterface // } } - void Get_CORINFO_SIG_INFO(TypeDesc[] locals, out CORINFO_SIG_INFO sig) + void Get_CORINFO_SIG_INFO(LocalVariableDefinition[] locals, out CORINFO_SIG_INFO sig) { sig.callConv = CorInfoCallConv.CORINFO_CALLCONV_DEFAULT; sig._retType = (byte)CorInfoType.CORINFO_TYPE_VOID; @@ -1248,11 +1248,12 @@ namespace Internal.JitInterface } else { - TypeDesc type = ((TypeDesc[])sigObj)[index]; - - // TODO: Pinning + LocalVariableDefinition[] locals = (LocalVariableDefinition[])sigObj; + TypeDesc type = locals[index].Type; + CorInfoType corInfoType = asCorInfoType(type, out vcTypeRet); - return (CorInfoTypeWithMod)corInfoType; + + return (CorInfoTypeWithMod)corInfoType | (locals[index].IsPinned ? CorInfoTypeWithMod.CORINFO_TYPE_MOD_PINNED : 0); } } |