private CodeGenerator(CodeGeneratorHints generatorHints, ActionOnCodeGenerator action, int phase) { Instance=this; this.GeneratorHints=generatorHints; this.labelNameToAddress=generatorHints.LabelNameToAddress.ToHashtable(); var stars=new string('*', 78); Debug.Print(stars); Debug.Print(stars); Debug.Print("***** STARTING PHASE "+phase); Debug.Print(stars); Debug.Print(stars); action(this); }
private CodeGenerator(CodeGeneratorHints generatorHints, ActionOnCodeGenerator action, int phase) { Instance = this; this.GeneratorHints = generatorHints; this.labelNameToAddress = generatorHints.LabelNameToAddress.ToHashtable(); var stars = new string('*', 78); Debug.Print(stars); Debug.Print(stars); Debug.Print("***** STARTING PHASE " + phase); Debug.Print(stars); Debug.Print(stars); action(this); }
public static CompiledCode Compile(ActionOnCodeGenerator build) { var hints=new CodeGeneratorHints(); var phaseIndex=0; while(true) { try { var result=new CodeGenerator(hints, build, phaseIndex++).Finish(); hints=result as CodeGeneratorHints; if(hints==null) { return (CompiledCode)result; } } finally { Instance=null; } } }
public static CompiledCode Compile(ActionOnCodeGenerator build) { var hints = new CodeGeneratorHints(); var phaseIndex = 0; while (true) { try { var result = new CodeGenerator(hints, build, phaseIndex++).Finish(); hints = result as CodeGeneratorHints; if (hints == null) { return((CompiledCode)result); } } finally { Instance = null; } } }