public EmitterVisitor(GraphProcessor processor, ILGenerator generator, MethodBodyBlock method) : base(processor, new Tasks()) { this.tasks = base.tasks as Tasks; tasks.SetVisitor(this); paramMapper = method.Variables.ParameterMapper; this.labels = Labeler.LabelNodes(method,generator); this.generator = generator; alreadyVisited = new Hashtable(); locals = new Hashtable(); AddTask(method,null); foreach(Variable var in method.Variables) { if(var.Kind == VariableKind.Local) locals[var] = generator.DeclareLocal(var.Type); } extraVars = new Hashtable(); boolVar = null; wasDumped = new Hashtable();; wasDumpedFlag = false; prevHasNext = true; }
internal VariablesList Clone() { Hashtable newVars = new Hashtable(vars.Count); ParameterMapper newMapper = new ParameterMapper(); foreach (Variable v in mapper) { Variable w = v.Clone(); newVars.Add(w.Index,w); newMapper.Add(w); } foreach (Variable v in vars.Values) if (v.Kind == VariableKind.Local) { Variable w = v.Clone(); newVars.Add(w.Index,w); } return new VariablesList(newVars,newMapper); }
private VariablesList(Hashtable vars, ParameterMapper mapper) { this.vars = vars; this.mapper = mapper; }
internal VariablesList() { vars = new Hashtable(); mapper = new ParameterMapper(); }