/// <summary> /// Called to emit a list of instructions offered by the instruction provider. /// </summary> protected virtual void EmitInstructions() { //ExceptionClauseHeader exceptionClauseHeader = this.methodCompiler.Method.ExceptionClauseHeader; foreach (BasicBlock block in basicBlocks) { BlockStart(block); for (Context ctx = new Context(InstructionSet, block); !ctx.EndOfInstruction; ctx.GotoNext()) { if (ctx.Instruction != null) { if (!ctx.Ignore) { if (block.ExceptionHeaderClause != null) { block.ExceptionHeaderClause.Update(ctx, codeStream); block.ExceptionHeaderClause.AddLabelToCodeStream(codeEmitter); } IPlatformInstruction instruction = ctx.Instruction as IPlatformInstruction; if (instruction != null) { instruction.Emit(ctx, codeEmitter); } else { Debug.WriteLine("Missing Code Transformation: " + ctx.ToString()); } } } } BlockEnd(block); } }
/// <summary> /// Called to emit a list of instructions offered by the instruction provider. /// </summary> protected virtual void EmitInstructions() { foreach (BasicBlock block in BasicBlocks) { BlockStart(block); for (Context ctx = new Context(InstructionSet, block); !ctx.EndOfInstruction; ctx.GotoNext()) { if (ctx.Instruction != null) { if (!ctx.Ignore) { IPlatformInstruction instruction = ctx.Instruction as IPlatformInstruction; if (instruction != null) { instruction.Emit(ctx, _codeEmitter); } else { Debug.WriteLine("Missing Code Transformation: " + ctx.ToString()); } } } } BlockEnd(block); } }
/// <summary> /// Called to emit a list of instructions offered by the instruction provider. /// </summary> protected virtual void EmitInstructions() { foreach (BasicBlock block in BasicBlocks) { BlockStart(block); for (Context ctx = new Context(InstructionSet, block); !ctx.EndOfInstruction; ctx.GotoNext()) if (ctx.Instruction != null) if (!ctx.Ignore) { IPlatformInstruction instruction = ctx.Instruction as IPlatformInstruction; if (instruction != null) instruction.Emit(ctx, _codeEmitter); else Debug.WriteLine("Missing Code Transformation: " + ctx.ToString()); } BlockEnd(block); } }
/// <summary> /// Called to emit a list of instructions offered by the instruction provider. /// </summary> protected virtual void EmitInstructions() { ExceptionClauseHeader exceptionClauseHeader = this.methodCompiler.Method.ExceptionClauseHeader; foreach (BasicBlock block in basicBlocks) { BlockStart(block); for (Context ctx = new Context(InstructionSet, block); !ctx.EndOfInstruction; ctx.GotoNext()) if (ctx.Instruction != null) if (!ctx.Ignore) { if (block.ExceptionHeaderClause != null) { block.ExceptionHeaderClause.Update(ctx, codeStream); block.ExceptionHeaderClause.AddLabelToCodeStream(codeEmitter); } IPlatformInstruction instruction = ctx.Instruction as IPlatformInstruction; if (instruction != null) instruction.Emit(ctx, codeEmitter); else Debug.WriteLine("Missing Code Transformation: " + ctx.ToString()); } BlockEnd(block); } }