public Interpreter(TypeSystem typeSystem, MethodDefinition method) { this.ExternalMethods = new HashSet<MethodReference>(); this.StaticFieldsSet = new HashSet<FieldDefinition>(); this.typeSystem = typeSystem; this.method = method; this.typeEvaluator = new CodeTypeEvaluator(this.typeSystem, this.method); }
internal CodeExpression PushStash(TypeSystem typeSystem, CodeExpressionEntry item) { this.stashSize++; int index = this.StashSize; var variableName = string.Format("R_{0}", index); var eval = new CodeTypeEvaluator(typeSystem, this.method); var variableType = eval.Evaluate(item.Expression); var variable = new VariableDefinition(variableName, variableType); var lhs = new CodeVariableReference(variable); this.stash[index] = lhs; return lhs; }