Interface JitCodeGenerator.PcGen

Enclosing class:
JitCodeGenerator<THIS extends JitCompiledPassage>

public static interface JitCodeGenerator.PcGen
A mechanism to emit bytecode that loads a program counter
  • Method Details

    • loadOffset

      static JitCodeGenerator.PcGen loadOffset(Address address)
      Create a generator that loads a constant program counter value
      Parameters:
      address - the program counter
      Returns:
      the generator
    • loadTarget

      static <THIS extends JitCompiledPassage> JitCodeGenerator.PcGen loadTarget(Local<Types.TRef<THIS>> localThis, JitCodeGenerator<THIS> gen, JitVal target)
      Create a generator that loads a variable program counter
      Type Parameters:
      THIS - the type of the generated passage
      Parameters:
      localThis - a handle to the local holding the this reference
      gen - the code generator
      target - the value (probably a variable) to load to get the program counter
      Returns:
      the generator
    • gen

      <N extends Emitter.Next> Emitter<Emitter.Ent<N,Types.TLong>> gen(Emitter<N> em)
      Emit bytecode to load a program counter
      Type Parameters:
      N - the incoming stack
      Parameters:
      em - the emitter typed with the incoming stack
      Returns:
      the emitter typed with the resulting stack, i.e., having pushed the counter value