/// <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> /// Generate instructions through given emitter. /// <remarks>Throwing any exception will immediately stops analyzing.</remarks> /// </summary> /// <param name="emitter">The emitter which will be used for instruction generation.</param> protected abstract void generate(EmitterBase emitter);