Ejemplo n.º 1
0
        /// <summary>
        /// Import thunks are used to call a runtime-provided helper which fixes up an indirection cell in a particular
        /// import section. Optionally they may also contain a relocation for a specific indirection cell to fix up.
        /// </summary>
        public ImportThunk(NodeFactory factory, ReadyToRunHelper helperId, ImportSectionNode containingImportSection, bool useVirtualCall)
        {
            _helperCell = factory.GetReadyToRunHelperCell(helperId);
            _containingImportSection = containingImportSection;

            if (useVirtualCall)
            {
                _thunkKind = Kind.VirtualStubDispatch;
            }
            else if (helperId == ReadyToRunHelper.GetString)
            {
                _thunkKind = Kind.Lazy;
            }
            else if (helperId == ReadyToRunHelper.DelayLoad_MethodCall ||
                     helperId == ReadyToRunHelper.DelayLoad_Helper ||
                     helperId == ReadyToRunHelper.DelayLoad_Helper_Obj ||
                     helperId == ReadyToRunHelper.DelayLoad_Helper_ObjObj)
            {
                _thunkKind = Kind.DelayLoadHelper;
            }
            else
            {
                _thunkKind = Kind.Eager;
            }
        }
Ejemplo n.º 2
0
 public DelayLoadHelperImport(
     NodeFactory factory,
     ImportSectionNode importSectionNode,
     ReadyToRunHelper helper,
     Signature instanceSignature,
     bool useVirtualCall      = false,
     MethodDesc callingMethod = null)
     : base(importSectionNode, instanceSignature, callingMethod)
 {
     _helper          = helper;
     _useVirtualCall  = useVirtualCall;
     _delayLoadHelper = new ImportThunk(helper, factory, this, useVirtualCall);
 }
Ejemplo n.º 3
0
 public DelayLoadHelperImport(
     ReadyToRunCodegenNodeFactory factory,
     ImportSectionNode importSectionNode,
     ReadyToRunHelper helper,
     Signature instanceSignature,
     bool useVirtualCall = false,
     string callSite     = null)
     : base(importSectionNode, instanceSignature, callSite)
 {
     _helper          = helper;
     _useVirtualCall  = useVirtualCall;
     _delayLoadHelper = new ImportThunk(helper, factory, this, useVirtualCall);
 }
Ejemplo n.º 4
0
 public DelayLoadHelperMethodImport(
     ReadyToRunCodegenNodeFactory factory,
     ImportSectionNode importSectionNode,
     ReadyToRunHelper helper,
     MethodDesc methodDesc,
     Signature instanceSignature,
     string callSite = null)
     : base(factory, importSectionNode, helper, instanceSignature, callSite)
 {
     _helper          = helper;
     _methodDesc      = methodDesc;
     _delayLoadHelper = new ImportThunk(helper, factory, this);
 }
 public DelayLoadHelperMethodImport(
     NodeFactory factory,
     ImportSectionNode importSectionNode,
     ReadyToRunHelper helper,
     MethodWithToken method,
     bool useVirtualCall,
     bool useInstantiatingStub,
     Signature instanceSignature,
     MethodDesc callingMethod = null)
     : base(factory, importSectionNode, helper, instanceSignature, useVirtualCall, callingMethod)
 {
     _method = method;
     _useInstantiatingStub = useInstantiatingStub;
 }
Ejemplo n.º 6
0
 public DelayLoadHelperMethodImport(
     ReadyToRunCodegenNodeFactory factory,
     ImportSectionNode importSectionNode,
     ReadyToRunHelper helper,
     MethodWithToken method,
     bool useVirtualCall,
     bool useInstantiatingStub,
     Signature instanceSignature,
     SignatureContext signatureContext,
     string callSite = null)
     : base(factory, importSectionNode, helper, instanceSignature, useVirtualCall, callSite)
 {
     _method = method;
     _useInstantiatingStub = useInstantiatingStub;
     _signatureContext     = signatureContext;
 }
Ejemplo n.º 7
0
 public GCRefMapNode(ImportSectionNode importSection)
 {
     _importSection = importSection;
     _methods       = new List <IMethodNode>();
 }
Ejemplo n.º 8
0
 public StringImport(ImportSectionNode table, ModuleToken token, SignatureContext signatureContext)
     : base(table, new StringImportSignature(token, signatureContext))
 {
     _token = token;
 }
Ejemplo n.º 9
0
 public Import(ImportSectionNode tableNode, Signature importSignature, string callSite = null)
 {
     Table           = tableNode;
     CallSite        = callSite;
     ImportSignature = new RvaEmbeddedPointerIndirectionNode <Signature>(importSignature, callSite);
 }
Ejemplo n.º 10
0
 public Import(ImportSectionNode tableNode, Signature importSignature, MethodDesc callingMethod = null)
 {
     Table           = tableNode;
     CallingMethod   = callingMethod;
     ImportSignature = new SignatureEmbeddedPointerIndirectionNode(this, importSignature);
 }
Ejemplo n.º 11
0
 public PrecodeHelperImport(ImportSectionNode section, Signature signature)
     : base(section, signature)
 {
 }
Ejemplo n.º 12
0
 public Import(ImportSectionNode tableNode, Signature importSignature, string callSite = null)
 {
     Table           = tableNode;
     CallSite        = callSite;
     ImportSignature = new SignatureEmbeddedPointerIndirectionNode(this, importSignature);
 }
Ejemplo n.º 13
0
 public StringImport(ImportSectionNode table, ModuleToken token)
     : base(table, new StringImportSignature(token))
 {
     _token = token;
 }
Ejemplo n.º 14
0
 public GCRefMapNode(ImportSectionNode importSection)
 {
     _importSection = importSection;
     _methods       = new List <MethodWithGCInfo>();
 }