protected sealed override void OnMarked(NodeFactory factory) { DictionaryLayoutNode layout = factory.GenericDictionaryLayout(_dictionaryOwner); if (layout.HasUnfixedSlots) { // When the helper call gets marked, ensure the generic layout for the associated dictionaries // includes the signature. layout.EnsureEntry(_lookupSignature); if ((_id == ReadyToRunHelperId.GetGCStaticBase || _id == ReadyToRunHelperId.GetThreadStaticBase) && factory.TypeSystemContext.HasLazyStaticConstructor((TypeDesc)_target)) { // If the type has a lazy static constructor, we also need the non-GC static base // because that's where the class constructor context is. layout.EnsureEntry(factory.GenericLookup.TypeNonGCStaticBase((TypeDesc)_target)); } } }
protected override void OnMarked(NodeFactory factory) { // Commit all floating generic lookups associated with the method when the method // is proved not dead. if (_floatingGenericLookupResults != null) { Debug.Assert(_method.IsCanonicalMethod(CanonicalFormKind.Any)); TypeSystemEntity canonicalOwner = _method.HasInstantiation ? (TypeSystemEntity)_method : (TypeSystemEntity)_method.OwningType; DictionaryLayoutNode dictLayout = factory.GenericDictionaryLayout(canonicalOwner); foreach (var lookupResult in _floatingGenericLookupResults) { dictLayout.EnsureEntry(lookupResult); } } }