public void SetupMetadata(CST.Global global) { NumWarnings = 0; NumErrors = 0; Global = global; if (tracerStream != null) { Tracer = new CST.CSTWriter(global, CST.WriterStyle.Debug, tracerStream); } Validity = new ValidityContext(this); GenericEnumeratorTypeConstructorRef = MkRef(Constants.GenericEnumeratorTypeConstructorName); JSContextRef = MkRef(Constants.JSContextName); JSObjectRef = MkRef(Constants.JSObjectName); JSPropertyRef = MkRef(Constants.JSPropertyName); JSExceptionRef = MkRef(Constants.JSExceptionName); GlobalMapping = new GlobalMapping(this); AttributeHelper = new AttributeHelper(this); InteropManager = new InteropManager(this); JSTHelpers = new JSTHelpers(this); InlinedMethods = new InlinedMethodCache(this); Traces = new Traces(this); }
public void Collect(CST.Global global, CST.AssemblyDef assemblyDef, CST.TypeDef typeDef) { foreach (var methodDef in typeDef.Members.OfType <CST.MethodDef>().Where(m => m.IsUsed && m.Invalid == null)) { Collect(global, methodDef); } }
private void Collect(CST.Global global, CST.MethodDef methodDef) { var instructions = methodDef.Instructions(global); if (instructions != null) { foreach (var inst in instructions.Body) { if (inst.Flavor == CST.InstructionFlavor.LdString) { var ldstri = (CST.LdStringInstruction)inst; Seen(ldstri.Value); } } } }
public void SetupMetadata(CST.Global global) { NumWarnings = 0; NumErrors = 0; Global = global; if (tracerStream != null) Tracer = new CST.CSTWriter(global, CST.WriterStyle.Debug, tracerStream); Validity = new ValidityContext(this); GenericEnumeratorTypeConstructorRef = MkRef(Constants.GenericEnumeratorTypeConstructorName); JSContextRef = MkRef(Constants.JSContextName); JSObjectRef = MkRef(Constants.JSObjectName); JSPropertyRef = MkRef(Constants.JSPropertyName); JSExceptionRef = MkRef(Constants.JSExceptionName); GlobalMapping = new GlobalMapping(this); AttributeHelper = new AttributeHelper(this); InteropManager = new InteropManager(this); JSTHelpers = new JSTHelpers(this); InlinedMethods = new InlinedMethodCache(this); Traces = new Traces(this); }