Esempio n. 1
0
        public RTAAnalyzer(bool rootIsExe, StreamWriter sw, IMetadataHost h)
        {
            TypeDefinitionComparer            tdc = new TypeDefinitionComparer();
            MethodReferenceDefinitionComparer mdc = MethodReferenceDefinitionComparer.Default;
            FieldReferenceComparer            frc = new FieldReferenceComparer();
            VariableComparer vc = new VariableComparer();

            classWorkList          = new List <ITypeDefinition>();
            entryPtClasses         = new HashSet <ITypeDefinition>(tdc);
            visitedClasses         = new HashSet <ITypeDefinition>(tdc);
            clinitProcessedClasses = new HashSet <ITypeDefinition>(tdc);
            ignoredClasses         = new HashSet <ITypeDefinition>(tdc);
            visitedMethods         = new HashSet <IMethodDefinition>(mdc);
            ignoredMethods         = new HashSet <IMethodDefinition>(mdc);
            entryPtMethods         = new HashSet <IMethodDefinition>(mdc);
            allocClasses           = new HashSet <ITypeDefinition>(tdc);
            classes        = new HashSet <ITypeDefinition>(tdc);
            methods        = new HashSet <IMethodDefinition>(mdc);
            types          = new HashSet <ITypeDefinition>(tdc);
            this.rootIsExe = rootIsExe;
            this.rtaLogSW  = sw;
            this.host      = h;

            addrTakenInstFlds = new HashSet <IFieldDefinition>(frc);
            addrTakenStatFlds = new HashSet <IFieldDefinition>(frc);
            addrTakenLocals   = new HashSet <IVariable>(vc);
            addrTakenMethods  = new HashSet <IMethodDefinition>(mdc);
        }
Esempio n. 2
0
        static ClassAndMethodVisitor()
        {
            MethodReferenceDefinitionComparer mdc = MethodReferenceDefinitionComparer.Default;
            TypeDefinitionComparer            tdc = new TypeDefinitionComparer();

            genericMethodMap     = new Dictionary <IMethodDefinition, IDictionary <string, IMethodDefinition> >(mdc);
            moduleToPdbMap       = new Dictionary <IModule, ISourceLocationProvider>();
            methodToCfgAndTacMap = new Dictionary <IMethodDefinition, MethodCfgAndTac>();
        }