public void Run (MethodBody body) { this.context = new DecompilationContext (body, ControlFlowGraph.Create (body.Method)); var block = new BlockStatement (); foreach (var step in steps) block = step.Process (context, block); body_block = block; }
public BlockStatement Process (DecompilationContext context, BlockStatement body) { this.cfg = context.ControlFlowGraph; this.annotations = AnnotationStore.CreateStore (cfg, optimization); this.body = context.Body; this.variables = context.Variables; this.expression_decompiler = new ExpressionDecompiler (context.Method, annotations); this.statements = new List<Statement> [cfg.Blocks.Length]; this.processed = new HashSet<InstructionBlock> (); this.assignments = new Dictionary<VariableReference, Expression> (); Run (); PopulateBodyBlock (body); return body; }