diff options
author | Jan Kotas <jkotas@microsoft.com> | 2016-01-12 18:09:12 +0300 |
---|---|---|
committer | Jan Kotas <jkotas@microsoft.com> | 2016-01-13 02:34:47 +0300 |
commit | c4232511ff688be60494042599eafa259a88b2aa (patch) | |
tree | f05d9ee10373e0ea6b4bbfc7d8466c501be1f44e /src/JitInterface | |
parent | 53935c508390f886bf54ff2444be3323bf394ce9 (diff) |
Proper implementations of JIT helpers
Cleanup C++ glue code related to JIT helpers
Diffstat (limited to 'src/JitInterface')
-rw-r--r-- | src/JitInterface/src/CorInfoImpl.cs | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/src/JitInterface/src/CorInfoImpl.cs b/src/JitInterface/src/CorInfoImpl.cs index 39480907a..3c2efd7f5 100644 --- a/src/JitInterface/src/CorInfoImpl.cs +++ b/src/JitInterface/src/CorInfoImpl.cs @@ -1606,10 +1606,21 @@ namespace Internal.JitInterface case CorInfoHelpFunc.CORINFO_HELP_DBLROUND: id = JitHelperId.FltRound; break; default: - throw new NotImplementedException(); + throw new NotImplementedException(ftnNum.ToString()); } - return (void*)ObjectToHandle(_compilation.NodeFactory.ExternSymbol(JitHelper.GetMangledName(id))); + string mangledName; + MethodDesc methodDesc; + JitHelper.GetEntryPoint(_compilation.TypeSystemContext, id, out mangledName, out methodDesc); + Debug.Assert(mangledName != null || methodDesc != null); + + ISymbolNode entryPoint; + if (mangledName != null) + entryPoint = _compilation.NodeFactory.ExternSymbol(mangledName); + else + entryPoint = _compilation.NodeFactory.MethodEntrypoint(methodDesc); + + return (void*)ObjectToHandle(entryPoint); } private void getFunctionEntryPoint(CORINFO_METHOD_STRUCT_* ftn, ref CORINFO_CONST_LOOKUP pResult, CORINFO_ACCESS_FLAGS accessFlags) |