/// <summary> /// Generates instructions which will be available in <see cref="EmittedInstructions"/> property. /// </summary> /// <param name="emitter">The emitter which will be used for instruction generation.</param> internal void Generate(EmitterBase emitter) { if (EmittedInstructions != null) { //we cache previous instructions generation emitter.InsertInstructions(EmittedInstructions); return; } generate(emitter); EmittedInstructions = emitter.GetEmittedInstructions(); }
/// <summary> /// Insert given batch of instructions (as they were emitted). /// </summary> /// <param name="instructions">Inserted instructions.</param> public abstract void InsertInstructions(InstructionBatch instructions);