Interface SimpleAccessGen<T extends Types.BPrim<?>,JT extends JitType.SimpleJitType<T,JT>>

Type Parameters:
T - the JVM type of the variable
JT - the p-code type of the variable
All Superinterfaces:
AccessGen<JT>
All Known Subinterfaces:
ExportsLegAccessGen
All Known Implementing Classes:
DoubleAccessGen, FloatAccessGen, IntAccessGen, LongAccessGen

public interface SimpleAccessGen<T extends Types.BPrim<?>,JT extends JitType.SimpleJitType<T,JT>> extends AccessGen<JT>
An access generator for simple-typed variables
  • Method Details

    • genReadToStack

      <THIS extends JitCompiledPassage, N extends Emitter.Next> Emitter<Emitter.Ent<N,T>> genReadToStack(Emitter<N> em, Local<Types.TRef<THIS>> localThis, JitCodeGenerator<THIS> gen, Varnode vn)
      Emit code to read a varnode

      If the varnode fits completely in the block (the common case), then this accesses the bytes from the one block, using the method chosen by size. If the varnode extends into the next block, then this will split the varnode into two portions according to machine byte order. Each portion is accessed using the method for the size of that portion. The results are reassembled into a single operand.

      Type Parameters:
      N - the incoming stack
      Parameters:
      em - the emitter typed with the incoming stack
      localThis - a handle to the local holding the this reference
      gen - the code generator
      vn - the varnode
      Returns:
      the code generator with the resulting stack, i.e., having pushed the value
    • genWriteFromStack

      <THIS extends JitCompiledPassage, N1 extends Emitter.Next, N0 extends Emitter.Ent<N1, T>> Emitter<N1> genWriteFromStack(Emitter<N0> em, Local<Types.TRef<THIS>> localThis, JitCodeGenerator<THIS> gen, Varnode vn)
      Emit code to write a varnode

      If the varnode fits completely in the block (the common case), then this accesses the bytes from the one block, using the method chosen by size. If the varnode extends into the next block, then this will split the varnode into two portions according to machine byte order. Each portion is accessed using the method for the size of that portion.

      Type Parameters:
      N1 - the tail of the incoming stack
      N0 - the incoming stack having the value on top
      Parameters:
      em - the emitter typed with the incoming stack
      localThis - a handle to the local holding the this reference
      gen - the code generator
      vn - the varnode
      Returns:
      the code generator with the resulting stack, i.e., having popped the value