private void Graph_NewMarkedNode(DependencyNodeCore <NodeFactory> obj) { var eetypeNode = obj as EETypeNode; if (eetypeNode != null) { _typesWithEETypesGenerated.Add(eetypeNode.Type); AddGeneratedType(eetypeNode.Type); return; } IMethodNode methodNode = obj as MethodCodeNode; if (methodNode == null) { methodNode = obj as ShadowConcreteMethodNode <MethodCodeNode>; } if (methodNode == null) { methodNode = obj as NonExternMethodSymbolNode; } if (methodNode != null) { MethodDesc method = methodNode.Method; AddGeneratedMethod(method); return; } var nonGcStaticSectionNode = obj as NonGCStaticsNode; if (nonGcStaticSectionNode != null && _typeSystemContext.HasLazyStaticConstructor(nonGcStaticSectionNode.Type)) { _cctorContextsGenerated.Add(nonGcStaticSectionNode); } var gvmEntryNode = obj as TypeGVMEntriesNode; if (gvmEntryNode != null) { _typeGVMEntries.Add(gvmEntryNode); } var dictionaryNode = obj as GenericDictionaryNode; if (dictionaryNode != null) { _genericDictionariesGenerated.Add(dictionaryNode); } }
public bool HasLazyStaticConstructor(TypeDesc type) { return(_typeSystemContext.HasLazyStaticConstructor(type)); }
private void Graph_NewMarkedNode(DependencyNodeCore <NodeFactory> obj) { var eetypeNode = obj as EETypeNode; if (eetypeNode != null) { _typesWithEETypesGenerated.Add(eetypeNode.Type); if (eetypeNode is ConstructedEETypeNode || eetypeNode is CanonicalEETypeNode) { _typesWithConstructedEETypesGenerated.Add(eetypeNode.Type); } return; } IMethodNode methodNode = obj as MethodCodeNode; if (methodNode == null) { methodNode = obj as ShadowConcreteMethodNode; } if (methodNode == null) { methodNode = obj as NonExternMethodSymbolNode; } if (methodNode != null) { _methodsGenerated.Add(methodNode.Method); return; } var reflectableMethodNode = obj as ReflectableMethodNode; if (reflectableMethodNode != null) { _methodsGenerated.Add(reflectableMethodNode.Method); } var nonGcStaticSectionNode = obj as NonGCStaticsNode; if (nonGcStaticSectionNode != null && _typeSystemContext.HasLazyStaticConstructor(nonGcStaticSectionNode.Type)) { _cctorContextsGenerated.Add(nonGcStaticSectionNode); } var gvmEntryNode = obj as TypeGVMEntriesNode; if (gvmEntryNode != null) { _typeGVMEntries.Add(gvmEntryNode); } var dictionaryNode = obj as GenericDictionaryNode; if (dictionaryNode != null) { _genericDictionariesGenerated.Add(dictionaryNode); } // TODO: temporary until we have an IL scanning Metadata Manager. We shouldn't have to keep track of these. var moduleMetadataNode = obj as ModuleMetadataNode; if (moduleMetadataNode != null) { _modulesWithMetadata.Add(moduleMetadataNode.Module); } }
protected virtual void Graph_NewMarkedNode(DependencyNodeCore <NodeFactory> obj) { var eetypeNode = obj as EETypeNode; if (eetypeNode != null) { _typesWithEETypesGenerated.Add(eetypeNode.Type); if (eetypeNode is ConstructedEETypeNode || eetypeNode is CanonicalEETypeNode) { _typesWithConstructedEETypesGenerated.Add(eetypeNode.Type); } return; } IMethodBodyNode methodBodyNode = obj as IMethodBodyNode; if (methodBodyNode != null) { _methodBodiesGenerated.Add(methodBodyNode); } IMethodNode methodNode = methodBodyNode; if (methodNode == null) { methodNode = obj as ShadowConcreteMethodNode; } if (methodNode != null) { _methodsGenerated.Add(methodNode.Method); return; } var reflectableMethodNode = obj as ReflectableMethodNode; if (reflectableMethodNode != null) { _methodsGenerated.Add(reflectableMethodNode.Method); } var nonGcStaticSectionNode = obj as NonGCStaticsNode; if (nonGcStaticSectionNode != null && _typeSystemContext.HasLazyStaticConstructor(nonGcStaticSectionNode.Type)) { _cctorContextsGenerated.Add(nonGcStaticSectionNode); } var gvmEntryNode = obj as TypeGVMEntriesNode; if (gvmEntryNode != null) { _typeGVMEntries.Add(gvmEntryNode); } var dictionaryNode = obj as GenericDictionaryNode; if (dictionaryNode != null) { _genericDictionariesGenerated.Add(dictionaryNode); } if (obj is StructMarshallingDataNode structMarshallingDataNode) { _typesWithStructMarshalling.Add(structMarshallingDataNode.Type); } if (obj is DelegateMarshallingDataNode delegateMarshallingDataNode) { _typesWithDelegateMarshalling.Add(delegateMarshallingDataNode.Type); } }
private void Graph_NewMarkedNode(DependencyNodeCore <NodeFactory> obj) { var eetypeNode = obj as EETypeNode; if (eetypeNode != null) { _typesWithEETypesGenerated.Add(eetypeNode.Type); AddGeneratedType(eetypeNode.Type); if (eetypeNode is ConstructedEETypeNode || eetypeNode is CanonicalEETypeNode) { _typesWithConstructedEETypesGenerated.Add(eetypeNode.Type); } return; } IMethodNode methodNode = obj as MethodCodeNode; if (methodNode == null) { methodNode = obj as ShadowConcreteMethodNode; } if (methodNode == null) { methodNode = obj as NonExternMethodSymbolNode; } if (methodNode != null) { MethodDesc method = methodNode.Method; AddGeneratedMethod(method); return; } var runtimeMethodHandleNode = obj as RuntimeMethodHandleNode; if (runtimeMethodHandleNode != null) { AddMetadataOnlyMethod(runtimeMethodHandleNode.Method); return; } var nonGcStaticSectionNode = obj as NonGCStaticsNode; if (nonGcStaticSectionNode != null && _typeSystemContext.HasLazyStaticConstructor(nonGcStaticSectionNode.Type)) { _cctorContextsGenerated.Add(nonGcStaticSectionNode); } var gvmEntryNode = obj as TypeGVMEntriesNode; if (gvmEntryNode != null) { _typeGVMEntries.Add(gvmEntryNode); } var dictionaryNode = obj as GenericDictionaryNode; if (dictionaryNode != null) { _genericDictionariesGenerated.Add(dictionaryNode); } var virtualMethodUseNode = obj as VirtualMethodUseNode; if (virtualMethodUseNode != null && virtualMethodUseNode.Method.IsAbstract) { AddGeneratedMethod(virtualMethodUseNode.Method); return; } var gvmDependenciesNode = obj as GVMDependenciesNode; if (gvmDependenciesNode != null && gvmDependenciesNode.Method.IsAbstract) { AddGeneratedMethod(gvmDependenciesNode.Method); } }