コード例 #1
0
        public ISymbolNode DynamicHelperCell(MethodWithToken methodWithToken, SignatureContext signatureContext)
        {
            ISymbolNode result;

            if (!_dynamicHelperCellCache.TryGetValue(methodWithToken, out result))
            {
                result = new DelayLoadHelperMethodImport(
                    this,
                    DispatchImports,
                    ILCompiler.DependencyAnalysis.ReadyToRun.ReadyToRunHelper.READYTORUN_HELPER_DelayLoad_Helper_Obj,
                    methodWithToken,
                    useInstantiatingStub: true,
                    MethodSignature(
                        ReadyToRunFixupKind.READYTORUN_FIXUP_VirtualEntry,
                        methodWithToken.Method,
                        constrainedType: null,
                        methodWithToken.Token,
                        signatureContext: signatureContext,
                        isUnboxingStub: false,
                        isInstantiatingStub: true),
                    signatureContext);
                _dynamicHelperCellCache.Add(methodWithToken, result);
            }
            return(result);
        }
コード例 #2
0
        private ISymbolNode GenericLookupMethodHelper(
            CORINFO_RUNTIME_LOOKUP_KIND runtimeLookupKind,
            ReadyToRunFixupKind fixupKind,
            MethodWithToken methodArgument,
            TypeDesc constrainedType,
            GenericContext methodContext,
            SignatureContext signatureContext)
        {
            GenericLookupKey key = new GenericLookupKey(runtimeLookupKind, fixupKind, typeArgument: null, methodArgument, fieldArgument: null, methodContext);
            ISymbolNode      node;

            if (!_genericLookupHelpers.TryGetValue(key, out node))
            {
                node = new DelayLoadHelperMethodImport(
                    _codegenNodeFactory,
                    _codegenNodeFactory.HelperImports,
                    ILCompiler.DependencyAnalysis.ReadyToRun.ReadyToRunHelper.READYTORUN_HELPER_DelayLoad_Helper,
                    methodArgument,
                    useInstantiatingStub: false,
                    new GenericLookupSignature(runtimeLookupKind, fixupKind, constrainedType, methodArgument, fieldArgument: null, methodContext, signatureContext),
                    signatureContext);
                _genericLookupHelpers.Add(key, node);
            }
            return(node);
        }
コード例 #3
0
        public ISymbolNode InterfaceDispatchCell(MethodDesc method, ModuleToken methodToken, SignatureContext signatureContext, bool isUnboxingStub, string callSite)
        {
            MethodAndCallSite cellKey = new MethodAndCallSite(method, callSite);

            if (!_interfaceDispatchCells.TryGetValue(cellKey, out ISymbolNode dispatchCell))
            {
                dispatchCell = new DelayLoadHelperMethodImport(
                    _codegenNodeFactory,
                    _codegenNodeFactory.DispatchImports,
                    ILCompiler.DependencyAnalysis.ReadyToRun.ReadyToRunHelper.READYTORUN_HELPER_DelayLoad_MethodCall |
                    ILCompiler.DependencyAnalysis.ReadyToRun.ReadyToRunHelper.READYTORUN_HELPER_FLAG_VSD,
                    method,
                    _codegenNodeFactory.MethodSignature(ReadyToRunFixupKind.READYTORUN_FIXUP_VirtualEntry, method,
                                                        null, methodToken, signatureContext, isUnboxingStub, isInstantiatingStub: false),
                    callSite);

                _interfaceDispatchCells.Add(cellKey, dispatchCell);
            }
            return(dispatchCell);
        }
コード例 #4
0
        public ISymbolNode InterfaceDispatchCell(MethodWithToken method, SignatureContext signatureContext, bool isUnboxingStub, string callSite)
        {
            MethodAndCallSite cellKey = new MethodAndCallSite(method, callSite);

            if (!_interfaceDispatchCells.TryGetValue(cellKey, out ISymbolNode dispatchCell))
            {
                dispatchCell = new DelayLoadHelperMethodImport(
                    _codegenNodeFactory,
                    _codegenNodeFactory.DispatchImports,
                    ILCompiler.ReadyToRunHelper.DelayLoad_MethodCall,
                    method,
                    useVirtualCall: true,
                    useInstantiatingStub: false,
                    _codegenNodeFactory.MethodSignature(ReadyToRunFixupKind.READYTORUN_FIXUP_VirtualEntry,
                                                        method,
                                                        isUnboxingStub, isInstantiatingStub: false, signatureContext),
                    signatureContext,
                    callSite);

                _interfaceDispatchCells.Add(cellKey, dispatchCell);
            }
            return(dispatchCell);
        }
コード例 #5
0
        public ISymbolNode DynamicHelperCell(MethodWithToken methodWithToken, bool isInstantiatingStub, SignatureContext signatureContext)
        {
            ISymbolNode result;

            if (!_dynamicHelperCellCache.TryGetValue(methodWithToken, out result))
            {
                result = new DelayLoadHelperMethodImport(
                    this,
                    DispatchImports,
                    ILCompiler.ReadyToRunHelper.DelayLoad_Helper_Obj,
                    methodWithToken,
                    useVirtualCall: false,
                    useInstantiatingStub: true,
                    MethodSignature(
                        ReadyToRunFixupKind.READYTORUN_FIXUP_VirtualEntry,
                        methodWithToken,
                        signatureContext: signatureContext,
                        isUnboxingStub: false,
                        isInstantiatingStub: isInstantiatingStub),
                    signatureContext);
                _dynamicHelperCellCache.Add(methodWithToken, result);
            }
            return(result);
        }