Interface Op


public interface Op
This interface is a namespace that defines all (well most) JVM bytecode operations.

These also provide small examples of how to declare the type signatures for methods that generate portions of bytecode. Inevitably, those methods will have expectations of what is on the stack, and would like to express the overall effect on that stack in terms of the incoming stack. Conventionally, generation methods should accept the emitter (typed with the incoming stack) as its first parameter and return that emitter typed with the resulting stack. This allows those methods to be invoked using, e.g., Emitter.emit(Function), and also sets them up to use the pattern:

 return em
                .emit(Op::ldc__i, 1)
                .emit(Op::iadd);
 

With this pattern, the Java type checker will ensure that the expected effect on the stack is in fact what the emitted code does. Once the pattern is understood, the type signature of each opcode method is trivially derived from Chapter 6 of the JVM specification. We do, however, have to treat each form separately. Method invocation opcodes require some additional support (see Methods.Inv), because they consume arguments of arbitrary number and types.

  • Method Details

    • aaload

      static <ET, N2 extends Emitter.Next, N1 extends Emitter.Ent<N2, Types.TRef<ET[]>>, N0 extends Emitter.Ent<N1, Types.TInt>> Emitter<Emitter.Ent<N2,Types.TRef<ET>>> aaload(Emitter<N0> em)
      Emit an aaload instruction
      Type Parameters:
      ET - the element type
      N2 - the tail of the stack (...)
      N1 - ..., arrayref
      N0 - ..., arrayref, index
      Parameters:
      em - the emitter
      Returns:
      the emitter with ..., value
    • aastore

      static <ET, N3 extends Emitter.Next, N2 extends Emitter.Ent<N3, Types.TRef<ET[]>>, N1 extends Emitter.Ent<N2, Types.TInt>, N0 extends Emitter.Ent<N1, ? extends Types.TRef<? extends ET>>> Emitter<N3> aastore(Emitter<N0> em)
      Emit an aastore instruction
      Type Parameters:
      ET - the element type
      N3 - the tail of the stack (...)
      N2 - ..., arrayref
      N1 - ..., arrayref, index,
      N0 - ..., arrayref, index, value
      Parameters:
      em - the emitter
      Returns:
      the emitter with ...
    • aconst_null

      static <T extends Types.TRef<?>, N extends Emitter.Next> Emitter<Emitter.Ent<N,T>> aconst_null(Emitter<N> em, T type)
      Emit an aconst_null instruction
      Type Parameters:
      T - the ascribed type of the null
      N - the tail of the stack (...)
      Parameters:
      em - the emitter
      type - the ascribed type of the null
      Returns:
      the emitter with ..., (T) null
    • aload

      static <T extends Types.TRef<?>, N extends Emitter.Next> Emitter<Emitter.Ent<N,T>> aload(Emitter<N> em, Local<T> local)
      Emit an aload instruction
      Type Parameters:
      T - the type of the local
      N - the tail of the stack (...)
      Parameters:
      em - the emitter
      local - the handle to the local
      Returns:
      the emitter with ..., value
    • anewarray

      static <ET, N1 extends Emitter.Next, N0 extends Emitter.Ent<N1, Types.TInt>> Emitter<Emitter.Ent<N1,Types.TRef<ET[]>>> anewarray(Emitter<N0> em, Types.TRef<ET> elemType)
      Emit an anewarray instruction
      Type Parameters:
      ET - the element type
      N1 - the tail of the stack (...)
      N0 - ..., count
      Parameters:
      em - the emitter
      elemType - the element type
      Returns:
      the emitter with ..., arrayref
    • areturn

      static <TL, TR, N1 extends Emitter.Next, N0 extends Emitter.Ent<N1, ? extends Types.TRef<TR>>> Emitter<Emitter.Dead> areturn(Emitter<N0> em, Methods.RetReq<? extends Types.TRef<TL>> retReq)
      Emit an areturn instruction
      Type Parameters:
      TL - the required return (ref) type
      TR - the value (ref) type on the stack
      N1 - the tail of the stack (...)
      N0 - ..., objectref
      Parameters:
      em - the emitter
      retReq - some proof of this method's required return type
      Returns:
      the dead emitter
    • arraylength__prim

      static <AT, ET extends Types.SPrim<AT>, N1 extends Emitter.Next, N0 extends Emitter.Ent<N1, Types.TRef<AT>>> Emitter<Emitter.Ent<N1,Types.TInt>> arraylength__prim(Emitter<N0> em, ET elemType)
      Emit an arraylength instruction, when the array has primitive elements
      Type Parameters:
      ET - the element type
      N1 - the tail of the stack (...)
      N0 - ..., arrayref
      Parameters:
      em - the emitter
      elemType - the element type
      Returns:
      the emitter with ..., length
    • arraylength__ref

      static <ET, N1 extends Emitter.Next, N0 extends Emitter.Ent<N1, Types.TRef<ET[]>>> Emitter<Emitter.Ent<N1,Types.TInt>> arraylength__ref(Emitter<N0> em)
      Emit an arraylength instruction, when the array has reference elements
      Type Parameters:
      ET - the element type
      N1 - the tail of the stack (...)
      N0 - ..., arrayref
      Parameters:
      em - the emitter
      Returns:
      the emitter with ..., length
    • astore

      static <TL, TR, N1 extends Emitter.Next, N0 extends Emitter.Ent<N1, ? extends Types.TRef<TR>>> Emitter<N1> astore(Emitter<N0> em, Local<? extends Types.TRef<TL>> local)
      Emit an astore instruction
      Type Parameters:
      TL - the local variable (ref) type
      TR - the value (ref) type on the stack
      N1 - the tail of the stack (...)
      N0 - ..., objectref
      Parameters:
      em - the emitter
      local - the target local variable
      Returns:
      the emitter with ...
    • athrow

      static <T1 extends Types.TRef<? extends Throwable>, N1 extends Emitter.Next, N0 extends Emitter.Ent<N1, T1>> Emitter<Emitter.Dead> athrow(Emitter<N0> em)
      Emit an athrow instruction
      Type Parameters:
      T1 - the value (Throwable ref) type on the stack
      N1 - the tail of the stack (...)
      N0 - ..., objectref
      Parameters:
      em - the emitter
      Returns:
      the dead emitter
    • baload__boolean

      static <N2 extends Emitter.Next, N1 extends Emitter.Ent<N2, Types.TRef<boolean[]>>, N0 extends Emitter.Ent<N1, Types.TInt>> Emitter<Emitter.Ent<N2,Types.TInt>> baload__boolean(Emitter<N0> em)
      Emit a baload instruction for a boolean array
      Type Parameters:
      N2 - the tail of the stack (...)
      N1 - ..., arrayref
      N0 - ..., arrayref, index
      Parameters:
      em - the emitter
      Returns:
      the emitter with ..., value
    • baload

      static <N2 extends Emitter.Next, N1 extends Emitter.Ent<N2, Types.TRef<byte[]>>, N0 extends Emitter.Ent<N1, Types.TInt>> Emitter<Emitter.Ent<N2,Types.TInt>> baload(Emitter<N0> em)
      Emit a baload instruction for a byte array
      Type Parameters:
      N2 - the tail of the stack (...)
      N1 - ..., arrayref
      N0 - ..., arrayref, index
      Parameters:
      em - the emitter
      Returns:
      the emitter with ..., value
    • bastore__boolean

      static <N3 extends Emitter.Next, N2 extends Emitter.Ent<N3, Types.TRef<boolean[]>>, N1 extends Emitter.Ent<N2, Types.TInt>, N0 extends Emitter.Ent<N1, Types.TInt>> Emitter<N3> bastore__boolean(Emitter<N0> em)
      Emit a bastore instruction for a boolean array
      Type Parameters:
      N3 - the tail of the stack (...)
      N2 - ..., arrayref
      N1 - ..., arrayref, index
      N0 - ..., arrayref, index, value
      Parameters:
      em - the emitter
      Returns:
      the emitter with ...
    • bastore

      static <N3 extends Emitter.Next, N2 extends Emitter.Ent<N3, Types.TRef<byte[]>>, N1 extends Emitter.Ent<N2, Types.TInt>, N0 extends Emitter.Ent<N1, Types.TInt>> Emitter<N3> bastore(Emitter<N0> em)
      Emit a bastore instruction for a byte array
      Type Parameters:
      N3 - the tail of the stack (...)
      N2 - ..., arrayref
      N1 - ..., arrayref, index
      N0 - ..., arrayref, index, value
      Parameters:
      em - the emitter
      Returns:
      the emitter with ...
    • caload

      static <N2 extends Emitter.Next, N1 extends Emitter.Ent<N2, Types.TRef<char[]>>, N0 extends Emitter.Ent<N1, Types.TInt>> Emitter<Emitter.Ent<N2,Types.TInt>> caload(Emitter<N0> em)
      Emit a caload instruction
      Type Parameters:
      N2 - the tail of the stack (...)
      N1 - ..., arrayref
      N0 - ..., arrayref, index
      Parameters:
      em - the emitter
      Returns:
      the emitter with ..., value
    • castore

      static <N3 extends Emitter.Next, N2 extends Emitter.Ent<N3, Types.TRef<char[]>>, N1 extends Emitter.Ent<N2, Types.TInt>, N0 extends Emitter.Ent<N1, Types.TInt>> Emitter<N3> castore(Emitter<N0> em)
      Emit a castore instruction
      Type Parameters:
      N3 - the tail of the stack (...)
      N2 - ..., arrayref
      N1 - ..., arrayref, index
      N0 - ..., arrayref, index, value
      Parameters:
      em - the emitter
      Returns:
      the emitter with ...
    • checkcast

      static <ST, CT extends ST, T1 extends Types.TRef<ST>, N1 extends Emitter.Next, N0 extends Emitter.Ent<N1, T1>> Emitter<Emitter.Ent<N1,Types.TRef<CT>>> checkcast(Emitter<N0> em, Types.TRef<CT> type)
      Emit a checkcast instruction
      Type Parameters:
      ST - the inferred type of the value on the stack, i.e., the less-specific type
      CT - the desired type, i.e., the more-specific type
      T1 - the reference type for the inferred type
      N1 - the tail of the stack (...)
      N0 - ..., objectref
      Parameters:
      em - the emitter
      type - the reference type for the desired type
      Returns:
      the emitter with ..., objectref
    • d2f

      static <N1 extends Emitter.Next, N0 extends Emitter.Ent<N1, Types.TDouble>> Emitter<Emitter.Ent<N1,Types.TFloat>> d2f(Emitter<N0> em)
      Emit a d2f instruction
      Type Parameters:
      N1 - the tail of the stack (...)
      N0 - ..., value
      Parameters:
      em - the emitter
      Returns:
      the emitter with ..., result
    • d2i

      static <N1 extends Emitter.Next, N0 extends Emitter.Ent<N1, Types.TDouble>> Emitter<Emitter.Ent<N1,Types.TInt>> d2i(Emitter<N0> em)
      Emit a d2i instruction
      Type Parameters:
      N1 - the tail of the stack (...)
      N0 - ..., value
      Parameters:
      em - the emitter
      Returns:
      the emitter with ..., result
    • d2l

      static <N1 extends Emitter.Next, N0 extends Emitter.Ent<N1, Types.TDouble>> Emitter<Emitter.Ent<N1,Types.TLong>> d2l(Emitter<N0> em)
      Emit a d2l instruction
      Type Parameters:
      N1 - the tail of the stack (...)
      N0 - ..., value
      Parameters:
      em - the emitter
      Returns:
      the emitter with ..., result
    • dadd

      static <N2 extends Emitter.Next, N1 extends Emitter.Ent<N2, Types.TDouble>, N0 extends Emitter.Ent<N1, Types.TDouble>> Emitter<Emitter.Ent<N2,Types.TDouble>> dadd(Emitter<N0> em)
      Emit a dadd instruction
      Type Parameters:
      N2 - the tail of the stack (...)
      N1 - ..., value1
      N0 - ..., value1, value2
      Parameters:
      em - the emitter
      Returns:
      the emitter with ..., result
    • daload

      static <N2 extends Emitter.Next, N1 extends Emitter.Ent<N2, Types.TRef<double[]>>, N0 extends Emitter.Ent<N1, Types.TInt>> Emitter<Emitter.Ent<N2,Types.TDouble>> daload(Emitter<N0> em)
      Emit a daload instruction
      Type Parameters:
      N2 - the tail of the stack (...)
      N1 - ..., arrayref
      N0 - ..., arrayref, index
      Parameters:
      em - the emitter
      Returns:
      the emitter with ..., value
    • dastore

      static <N3 extends Emitter.Next, N2 extends Emitter.Ent<N3, Types.TRef<double[]>>, N1 extends Emitter.Ent<N2, Types.TInt>, N0 extends Emitter.Ent<N1, Types.TDouble>> Emitter<N3> dastore(Emitter<N0> em)
      Emit a dastore instruction
      Type Parameters:
      N3 - the tail of the stack (...)
      N2 - ..., arrayref
      N1 - ..., arrayref, index
      N0 - ..., arrayref, index, value
      Parameters:
      em - the emitter
      Returns:
      the emitter with ...
    • dcmpg

      static <N2 extends Emitter.Next, N1 extends Emitter.Ent<N2, Types.TDouble>, N0 extends Emitter.Ent<N1, Types.TDouble>> Emitter<Emitter.Ent<N2,Types.TInt>> dcmpg(Emitter<N0> em)
      Emit a dcmpg instruction
      Type Parameters:
      N2 - the tail of the stack (...)
      N1 - ..., value1
      N0 - ..., value1, value2
      Parameters:
      em - the emitter
      Returns:
      the emitter with ..., result
    • dcmpl

      static <N2 extends Emitter.Next, N1 extends Emitter.Ent<N2, Types.TDouble>, N0 extends Emitter.Ent<N1, Types.TDouble>> Emitter<Emitter.Ent<N2,Types.TInt>> dcmpl(Emitter<N0> em)
      Emit a dcmpl instruction
      Type Parameters:
      N2 - the tail of the stack (...)
      N1 - ..., value1
      N0 - ..., value1, value2
      Parameters:
      em - the emitter
      Returns:
      the emitter with ..., result
    • ddiv

      static <N2 extends Emitter.Next, N1 extends Emitter.Ent<N2, Types.TDouble>, N0 extends Emitter.Ent<N1, Types.TDouble>> Emitter<Emitter.Ent<N2,Types.TDouble>> ddiv(Emitter<N0> em)
      Emit a ddiv instruction
      Type Parameters:
      N2 - the tail of the stack (...)
      N1 - ..., value1
      N0 - ..., value1, value2
      Parameters:
      em - the emitter
      Returns:
      the emitter with ..., result
    • dload

      static <N extends Emitter.Next> Emitter<Emitter.Ent<N,Types.TDouble>> dload(Emitter<N> em, Local<Types.TDouble> local)
      Emit a dload instruction
      Type Parameters:
      N - the tail of the stack (...)
      Parameters:
      em - the emitter
      local - the handle to the local
      Returns:
      the emitter with ..., value
    • dmul

      static <N2 extends Emitter.Next, N1 extends Emitter.Ent<N2, Types.TDouble>, N0 extends Emitter.Ent<N1, Types.TDouble>> Emitter<Emitter.Ent<N2,Types.TDouble>> dmul(Emitter<N0> em)
      Emit a dmul instruction
      Type Parameters:
      N2 - the tail of the stack (...)
      N1 - ..., value1
      N0 - ..., value1, value2
      Parameters:
      em - the emitter
      Returns:
      the emitter with ..., result
    • dneg

      static <N1 extends Emitter.Next, N0 extends Emitter.Ent<N1, Types.TDouble>> Emitter<Emitter.Ent<N1,Types.TDouble>> dneg(Emitter<N0> em)
      Emit a dneg instruction
      Type Parameters:
      N1 - the tail of the stack (...)
      N0 - ..., value
      Parameters:
      em - the emitter
      Returns:
      the emitter with ..., result
    • drem

      static <N2 extends Emitter.Next, N1 extends Emitter.Ent<N2, Types.TDouble>, N0 extends Emitter.Ent<N1, Types.TDouble>> Emitter<Emitter.Ent<N2,Types.TDouble>> drem(Emitter<N0> em)
      Emit a drem instruction
      Type Parameters:
      N2 - the tail of the stack (...)
      N1 - ..., value1
      N0 - ..., value1, value2
      Parameters:
      em - the emitter
      Returns:
      the emitter with ..., result
    • dreturn

      static <N1 extends Emitter.Next, N0 extends Emitter.Ent<N1, Types.TDouble>> Emitter<Emitter.Dead> dreturn(Emitter<N0> em, Methods.RetReq<Types.TDouble> retReq)
      Emit a dreturn instruction
      Type Parameters:
      N1 - the tail of the stack (...)
      N0 - ..., value
      Parameters:
      em - the emitter
      retReq - some proof of this method's required return type
      Returns:
      the dead emitter
    • dstore

      static <N1 extends Emitter.Next, N0 extends Emitter.Ent<N1, Types.TDouble>> Emitter<N1> dstore(Emitter<N0> em, Local<Types.TDouble> local)
      Emit a dstore instruction
      Type Parameters:
      N1 - the tail of the stack (...)
      N0 - ..., value
      Parameters:
      em - the emitter
      local - the target local variable
      Returns:
      the emitter with ...
    • dsub

      static <N2 extends Emitter.Next, N1 extends Emitter.Ent<N2, Types.TDouble>, N0 extends Emitter.Ent<N1, Types.TDouble>> Emitter<Emitter.Ent<N2,Types.TDouble>> dsub(Emitter<N0> em)
      Emit a dsub instruction
      Type Parameters:
      N2 - the tail of the stack (...)
      N1 - ..., value1
      N0 - ..., value1, value2
      Parameters:
      em - the emitter
      Returns:
      the emitter with ..., result
    • dup

      static <V1 extends Types.TCat1, N1 extends Emitter.Next, N0 extends Emitter.Ent<N1, V1>> Emitter<Emitter.Ent<N0,V1>> dup(Emitter<N0> em)
      Emit a dup instruction
      Type Parameters:
      V1 - the type of the value on the stack
      N1 - the tail of the stack (...)
      N0 - ..., value
      Parameters:
      em - the emitter
      Returns:
      the emitter with ..., value, value
    • dup_x1

      static <V2 extends Types.TCat1, V1 extends Types.TCat1, N2 extends Emitter.Next, N1 extends Emitter.Ent<N2, V2>, N0 extends Emitter.Ent<N1, V1>> Emitter<Emitter.Ent<Emitter.Ent<Emitter.Ent<N2,V1>,V2>,V1>> dup_x1(Emitter<N0> em)
      Emit a dup_x1 instruction
      Type Parameters:
      V2 - the type of value2 on the stack
      V1 - the type of value1 on the stack
      N2 - the tail of the stack (...)
      N1 - ..., value2
      N0 - ..., value2, value1
      Parameters:
      em - the emitter
      Returns:
      the emitter with ..., value1, value2, value1
    • dup_x2__111

      static <V3 extends Types.TCat1, V2 extends Types.TCat1, V1 extends Types.TCat1, N3 extends Emitter.Next, N2 extends Emitter.Ent<N3, V3>, N1 extends Emitter.Ent<N2, V2>, N0 extends Emitter.Ent<N1, V1>> Emitter<Emitter.Ent<Emitter.Ent<Emitter.Ent<Emitter.Ent<N3,V1>,V3>,V2>,V1>> dup_x2__111(Emitter<N0> em)
      Emit a dup_x2 instruction, inserting 3 values down (Form 1)
      Type Parameters:
      V3 - the type of value3 on the stack
      V2 - the type of value2 on the stack
      V1 - the type of value1 on the stack
      N3 - the tail of the stack (...)
      N2 - ..., value3
      N1 - ..., value3, value2
      N0 - ..., value3, value2, value1
      Parameters:
      em - the emitter
      Returns:
      the emitter with ..., value1, value3, value2, value1
    • dup_x2__21

      static <V2 extends Types.TCat2, V1 extends Types.TCat1, N2 extends Emitter.Next, N1 extends Emitter.Ent<N2, V2>, N0 extends Emitter.Ent<N1, V1>> Emitter<Emitter.Ent<Emitter.Ent<Emitter.Ent<N2,V1>,V2>,V1>> dup_x2__21(Emitter<N0> em)
      Emit a dup_x2 instruction, inserting 2 values down (Form 2)
      Type Parameters:
      V2 - the type of value2 on the stack
      V1 - the type of value1 on the stack
      N2 - the tail of the stack (...)
      N1 - ..., value2
      N0 - ..., value2, value1
      Parameters:
      em - the emitter
      Returns:
      the emitter with ..., value1, value2, value1
    • dup2__11

      static <V2 extends Types.TCat1, V1 extends Types.TCat1, N2 extends Emitter.Next, N1 extends Emitter.Ent<N2, V2>, N0 extends Emitter.Ent<N1, V1>> Emitter<Emitter.Ent<Emitter.Ent<N0,V2>,V1>> dup2__11(Emitter<N0> em)
      Emit a dup2 instruction, duplicating two operands (Form 1)
      Type Parameters:
      V2 - the type of value2 on the stack
      V1 - the type of vlaue1 on the stack
      N2 - the tail of the stack (...)
      N1 - ..., value2
      N0 - ..., value2, value1
      Parameters:
      em - the emitter
      Returns:
      the emitter with ..., value2, value1, value2, value1
    • dup2__2

      static <V1 extends Types.TCat2, N1 extends Emitter.Next, N0 extends Emitter.Ent<N1, V1>> Emitter<Emitter.Ent<N0,V1>> dup2__2(Emitter<N0> em)
      Emit a dup2 instruction, duplicating one operand (Form 2)
      Type Parameters:
      V1 - the type of the value on the stack
      N1 - the tail of the stack (...)
      N0 - ..., value
      Parameters:
      em - the emitter
      Returns:
      the emitter with ..., value, value
    • dup2_x1__111

      static <V3 extends Types.TCat1, V2 extends Types.TCat1, V1 extends Types.TCat1, N3 extends Emitter.Next, N2 extends Emitter.Ent<N3, V3>, N1 extends Emitter.Ent<N2, V2>, N0 extends Emitter.Ent<N1, V1>> Emitter<Emitter.Ent<Emitter.Ent<Emitter.Ent<Emitter.Ent<Emitter.Ent<N3,V2>,V1>,V3>,V2>,V1>> dup2_x1__111(Emitter<N0> em)
      Emit a dup2_x1 instruction, duplicating two operands, three values down (Form 1)
      Type Parameters:
      V3 - the type of value3 on the stack
      V2 - the type of value2 on the stack
      V1 - the type of value1 on the stack
      N3 - the tail of the stack (...)
      N2 - ..., value3
      N1 - ..., value3, value2
      N0 - ..., value3, value2, value1
      Parameters:
      em - the emitter
      Returns:
      the emitter with ..., value2, value1, value3, value2, value1
    • dup2_x1__12

      static <V2 extends Types.TCat1, V1 extends Types.TCat2, N2 extends Emitter.Next, N1 extends Emitter.Ent<N2, V2>, N0 extends Emitter.Ent<N1, V1>> Emitter<Emitter.Ent<Emitter.Ent<Emitter.Ent<N2,V1>,V2>,V1>> dup2_x1__12(Emitter<N0> em)
      Emit a dup2_x1 instruction, duplicating one operand, two values down (Form 2)
      Type Parameters:
      V2 - the type of value2 on the stack
      V1 - the type of value1 on the stack
      N2 - the tail of the stack (...)
      N1 - ..., value2
      N0 - ..., value2, value1
      Parameters:
      em - the emitter
      Returns:
      the emitter with ..., value1, value2, value1
    • dup2_x2_1111

      static <V4 extends Types.TCat1, V3 extends Types.TCat1, V2 extends Types.TCat1, V1 extends Types.TCat1, N4 extends Emitter.Next, N3 extends Emitter.Ent<N4, V4>, N2 extends Emitter.Ent<N3, V3>, N1 extends Emitter.Ent<N2, V2>, N0 extends Emitter.Ent<N1, V1>> Emitter<Emitter.Ent<Emitter.Ent<Emitter.Ent<Emitter.Ent<Emitter.Ent<Emitter.Ent<N4,V2>,V1>,V4>,V3>,V2>,V1>> dup2_x2_1111(Emitter<N0> em)
      Emit a dup2_x2 instruction, duplicating two operands, four values down (Form 1)
      Type Parameters:
      V4 - the type of value4 on the stack
      V3 - the type of value3 on the stack
      V2 - the type of value2 on the stack
      V1 - the type of value1 on the stack
      N4 - the tail of the stack (...)
      N3 - ..., value4
      N2 - ..., value4, value3
      N1 - ..., value4, value3, value2
      N0 - ..., value4, value3, value2, value1
      Parameters:
      em - the emitter
      Returns:
      the emitter with ..., value2, value1, value4, value3, value2, value1
    • dup2_x2_112

      static <V3 extends Types.TCat1, V2 extends Types.TCat1, V1 extends Types.TCat2, N3 extends Emitter.Next, N2 extends Emitter.Ent<N3, V3>, N1 extends Emitter.Ent<N2, V2>, N0 extends Emitter.Ent<N1, V1>> Emitter<Emitter.Ent<Emitter.Ent<Emitter.Ent<Emitter.Ent<N3,V1>,V3>,V2>,V1>> dup2_x2_112(Emitter<N0> em)
      Emit a dup2_x2 instruction, duplicating one operand, three values down (Form 2)
      Type Parameters:
      V3 - the type of value3 on the stack
      V2 - the type of value2 on the stack
      V1 - the type of value1 on the stack
      N3 - the tail of the stack (...)
      N2 - ..., value3
      N1 - ..., value3, value2
      N0 - ..., value3, value2, value1
      Parameters:
      em - the emitter
      Returns:
      the emitter with ..., value1, value3, value2, value1
    • dup2_x2_211

      static <V3 extends Types.TCat2, V2 extends Types.TCat1, V1 extends Types.TCat1, N3 extends Emitter.Next, N2 extends Emitter.Ent<N3, V3>, N1 extends Emitter.Ent<N2, V2>, N0 extends Emitter.Ent<N1, V1>> Emitter<Emitter.Ent<Emitter.Ent<Emitter.Ent<Emitter.Ent<Emitter.Ent<N3,V2>,V1>,V3>,V2>,V1>> dup2_x2_211(Emitter<N0> em)
      Emit a dup2_x2 instruction, duplicating two operands, three values down (Form 3)
      Type Parameters:
      V3 - the type of value3 on the stack
      V2 - the type of value2 on the stack
      V1 - the type of value1 on the stack
      N3 - the tail of the stack (...)
      N2 - ..., value3
      N1 - ..., value3, value2
      N0 - ..., value3, value2, value1
      Parameters:
      em - the emitter
      Returns:
      the emitter with ..., value2, value1, value3, value2, value1
    • dup2_x2_22

      static <V2 extends Types.TCat2, V1 extends Types.TCat2, N2 extends Emitter.Next, N1 extends Emitter.Ent<N2, V2>, N0 extends Emitter.Ent<N1, V1>> Emitter<Emitter.Ent<Emitter.Ent<Emitter.Ent<N2,V1>,V2>,V1>> dup2_x2_22(Emitter<N0> em)
      Emit a dup2_x2 instruction, duplicating one operand, two values down (Form 4)
      Type Parameters:
      V2 - the type of value2 on the stack
      V1 - the type of value1 on the stack
      N2 - the tail of the stack (...)
      N1 - ..., value2
      N0 - ..., value2, value1
      Parameters:
      em - the emitter
      Returns:
      the emitter with ..., value1, value2, value1
    • f2d

      static <N1 extends Emitter.Next, N0 extends Emitter.Ent<N1, Types.TFloat>> Emitter<Emitter.Ent<N1,Types.TDouble>> f2d(Emitter<N0> em)
      Emit an f2d instruction
      Type Parameters:
      N1 - the tail of the stack (...)
      N0 - ..., value
      Parameters:
      em - the emitter
      Returns:
      the emitter with ..., result
    • f2i

      static <N1 extends Emitter.Next, N0 extends Emitter.Ent<N1, Types.TFloat>> Emitter<Emitter.Ent<N1,Types.TInt>> f2i(Emitter<N0> em)
      Emit an f2i instruction
      Type Parameters:
      N1 - the tail of the stack (...)
      N0 - ..., value
      Parameters:
      em - the emitter
      Returns:
      the emitter with ..., result
    • f2l

      static <N1 extends Emitter.Next, N0 extends Emitter.Ent<N1, Types.TFloat>> Emitter<Emitter.Ent<N1,Types.TLong>> f2l(Emitter<N0> em)
      Emit an f2l instruction
      Type Parameters:
      N1 - the tail of the stack (...)
      N0 - ..., value
      Parameters:
      em - the emitter
      Returns:
      the emitter with ..., result
    • fadd

      static <N2 extends Emitter.Next, N1 extends Emitter.Ent<N2, Types.TFloat>, N0 extends Emitter.Ent<N1, Types.TFloat>> Emitter<Emitter.Ent<N2,Types.TFloat>> fadd(Emitter<N0> em)
      Emit an fadd instruction
      Type Parameters:
      N2 - the tail of the stack (...)
      N1 - ..., value1
      N0 - ..., value1, value2
      Parameters:
      em - the emitter
      Returns:
      the emitter with ..., result
    • faload

      static <N2 extends Emitter.Next, N1 extends Emitter.Ent<N2, Types.TRef<float[]>>, N0 extends Emitter.Ent<N1, Types.TInt>> Emitter<Emitter.Ent<N2,Types.TFloat>> faload(Emitter<N0> em)
      Emit an faload instruction
      Type Parameters:
      N2 - the tail of the stack (...)
      N1 - ..., arrayref
      N0 - ..., arrayref, index
      Parameters:
      em - the emitter
      Returns:
      the emitter with ..., value
    • fastore

      static <N3 extends Emitter.Next, N2 extends Emitter.Ent<N3, Types.TRef<float[]>>, N1 extends Emitter.Ent<N2, Types.TInt>, N0 extends Emitter.Ent<N1, Types.TFloat>> Emitter<N3> fastore(Emitter<N0> em)
      Emit an fastore instruction
      Type Parameters:
      N3 - the tail of the stack (...)
      N2 - ..., arrayref
      N1 - ..., arrayref, index
      N0 - ..., arrayref, index, value
      Parameters:
      em - the emitter
      Returns:
      the emitter with ...
    • fcmpg

      static <N2 extends Emitter.Next, N1 extends Emitter.Ent<N2, Types.TFloat>, N0 extends Emitter.Ent<N1, Types.TFloat>> Emitter<Emitter.Ent<N2,Types.TInt>> fcmpg(Emitter<N0> em)
      Emit an fcmpg instruction
      Type Parameters:
      N2 - the tail of the stack (...)
      N1 - ..., value1
      N0 - ..., value1, value2
      Parameters:
      em - the emitter
      Returns:
      the emitter with ..., result
    • fcmpl

      static <N2 extends Emitter.Next, N1 extends Emitter.Ent<N2, Types.TFloat>, N0 extends Emitter.Ent<N1, Types.TFloat>> Emitter<Emitter.Ent<N2,Types.TInt>> fcmpl(Emitter<N0> em)
      Emit an fcmpl instruction
      Type Parameters:
      N2 - the tail of the stack (...)
      N1 - ..., value1
      N0 - ..., value1, value2
      Parameters:
      em - the emitter
      Returns:
      the emitter with ..., result
    • fdiv

      static <N2 extends Emitter.Next, N1 extends Emitter.Ent<N2, Types.TFloat>, N0 extends Emitter.Ent<N1, Types.TFloat>> Emitter<Emitter.Ent<N2,Types.TFloat>> fdiv(Emitter<N0> em)
      Emit an fdiv instruction
      Type Parameters:
      N2 - the tail of the stack (...)
      N1 - ..., value1
      N0 - ..., value1, value2
      Parameters:
      em - the emitter
      Returns:
      the emitter with ..., result
    • fload

      static <N extends Emitter.Next> Emitter<Emitter.Ent<N,Types.TFloat>> fload(Emitter<N> em, Local<Types.TFloat> local)
      Emit an fload instruction
      Type Parameters:
      N - the tail of the stack (...)
      Parameters:
      em - the emitter
      local - the handle to the local
      Returns:
      the emitter with ..., value
    • fmul

      static <N2 extends Emitter.Next, N1 extends Emitter.Ent<N2, Types.TFloat>, N0 extends Emitter.Ent<N1, Types.TFloat>> Emitter<Emitter.Ent<N2,Types.TFloat>> fmul(Emitter<N0> em)
      Emit an fmul instruction
      Type Parameters:
      N2 - the tail of the stack (...)
      N1 - ..., value1
      N0 - ..., value1, value2
      Parameters:
      em - the emitter
      Returns:
      the emitter with ..., result
    • fneg

      static <N1 extends Emitter.Next, N0 extends Emitter.Ent<N1, Types.TFloat>> Emitter<Emitter.Ent<N1,Types.TFloat>> fneg(Emitter<N0> em)
      Emit an fneg instruction
      Type Parameters:
      N1 - the tail of the stack (...)
      N0 - ..., value
      Parameters:
      em - the emitter
      Returns:
      the emitter with ..., result
    • frem

      static <N2 extends Emitter.Next, N1 extends Emitter.Ent<N2, Types.TFloat>, N0 extends Emitter.Ent<N1, Types.TFloat>> Emitter<Emitter.Ent<N2,Types.TFloat>> frem(Emitter<N0> em)
      Emit an frem instruction
      Type Parameters:
      N2 - the tail of the stack (...)
      N1 - ..., value1
      N0 - ..., value1, value2
      Parameters:
      em - the emitter
      Returns:
      the emitter with ..., result
    • freturn

      static <N1 extends Emitter.Next, N0 extends Emitter.Ent<N1, Types.TFloat>> Emitter<Emitter.Dead> freturn(Emitter<N0> em, Methods.RetReq<Types.TFloat> retReq)
      Emit an freturn instruction
      Type Parameters:
      N1 - the tail of the stack (...)
      N0 - ..., value
      Parameters:
      em - the emitter
      retReq - some proof of this method's required return type
      Returns:
      the dead emitter
    • fstore

      static <N1 extends Emitter.Next, N0 extends Emitter.Ent<N1, Types.TFloat>> Emitter<N1> fstore(Emitter<N0> em, Local<Types.TFloat> local)
      Emit an fstore instruction
      Type Parameters:
      N1 - the tail of the stack (...)
      N0 - ..., value
      Parameters:
      em - the emitter
      local - the target local variable
      Returns:
      the emitter with ...
    • fsub

      static <N2 extends Emitter.Next, N1 extends Emitter.Ent<N2, Types.TFloat>, N0 extends Emitter.Ent<N1, Types.TFloat>> Emitter<Emitter.Ent<N2,Types.TFloat>> fsub(Emitter<N0> em)
      Emit an fsub instruction
      Type Parameters:
      N2 - the tail of the stack (...)
      N1 - ..., value1
      N0 - ..., value1, value2
      Parameters:
      em - the emitter
      Returns:
      the emitter with ..., result
    • getfield

      static <OT, T1 extends Types.TRef<? extends OT>, FT extends Types.BNonVoid, N1 extends Emitter.Next, N0 extends Emitter.Ent<N1, T1>> Emitter<Emitter.Ent<N1,FT>> getfield(Emitter<N0> em, Types.TRef<OT> owner, String name, FT type)
      Emit a getfield instruction

      LATER: Some sort of field handle?

      Type Parameters:
      OT - the owner type
      T1 - the type of the object on the stack owning the field
      FT - the type of the field
      N1 - the tail of the stack (...)
      N0 - ..., objectref
      Parameters:
      em - the emitter
      owner - the owner type
      name - the name of the field
      type - the type of the field
      Returns:
      the emitter with ..., value
    • getstatic

      static <FT extends Types.BNonVoid, N extends Emitter.Next> Emitter<Emitter.Ent<N,FT>> getstatic(Emitter<N> em, Types.TRef<?> owner, String name, FT type)
      Emit a getstatic instruction

      LATER: Some sort of field handle?

      Type Parameters:
      FT - the type of the field
      N - the tail of the stack (...)
      Parameters:
      em - the emitter
      owner - the owner type
      name - the name of the field
      type - the type of the field
      Returns:
      the emitter with ..., value
    • goto_

      static <N extends Emitter.Next> Lbl.LblEm<N,Emitter.Dead> goto_(Emitter<N> em)
      Emit a goto instruction to a new target label
      Type Parameters:
      N - the tail of the stack (...)
      Parameters:
      em - the emitter
      Returns:
      the new target label and the dead emitter
    • goto_

      static <N extends Emitter.Next> Emitter<Emitter.Dead> goto_(Emitter<N> em, Lbl<N> target)
      Emit a goto instruction to a given target label
      Type Parameters:
      N - the tail of the stack (...)
      Parameters:
      em - the emitter
      target - the target label
      Returns:
      the dead emitter
    • i2b

      static <N1 extends Emitter.Next, N0 extends Emitter.Ent<N1, Types.TInt>> Emitter<Emitter.Ent<N1,Types.TInt>> i2b(Emitter<N0> em)
      Emit an i2b instruction
      Type Parameters:
      N1 - the tail of the stack (...)
      N0 - ..., value
      Parameters:
      em - the emitter
      Returns:
      the emitter with ..., result
    • i2c

      static <N1 extends Emitter.Next, N0 extends Emitter.Ent<N1, Types.TInt>> Emitter<Emitter.Ent<N1,Types.TInt>> i2c(Emitter<N0> em)
      Emit an i2c instruction
      Type Parameters:
      N1 - the tail of the stack (...)
      N0 - ..., value
      Parameters:
      em - the emitter
      Returns:
      the emitter with ..., result
    • i2d

      static <N1 extends Emitter.Next, N0 extends Emitter.Ent<N1, Types.TInt>> Emitter<Emitter.Ent<N1,Types.TDouble>> i2d(Emitter<N0> em)
      Emit an i2d instruction
      Type Parameters:
      N1 - the tail of the stack (...)
      N0 - ..., value
      Parameters:
      em - the emitter
      Returns:
      the emitter with ..., result
    • i2f

      static <N1 extends Emitter.Next, N0 extends Emitter.Ent<N1, Types.TInt>> Emitter<Emitter.Ent<N1,Types.TFloat>> i2f(Emitter<N0> em)
      Emit an i2f instruction
      Type Parameters:
      N1 - the tail of the stack (...)
      N0 - ..., value
      Parameters:
      em - the emitter
      Returns:
      the emitter with ..., result
    • i2l

      static <N1 extends Emitter.Next, N0 extends Emitter.Ent<N1, Types.TInt>> Emitter<Emitter.Ent<N1,Types.TLong>> i2l(Emitter<N0> em)
      Emit an i2l instruction
      Type Parameters:
      N1 - the tail of the stack (...)
      N0 - ..., value
      Parameters:
      em - the emitter
      Returns:
      the emitter with ..., result
    • i2s

      static <N1 extends Emitter.Next, N0 extends Emitter.Ent<N1, Types.TInt>> Emitter<Emitter.Ent<N1,Types.TInt>> i2s(Emitter<N0> em)
      Emit an i2s instruction
      Type Parameters:
      N1 - the tail of the stack (...)
      N0 - ..., value
      Parameters:
      em - the emitter
      Returns:
      the emitter with ..., result
    • iadd

      static <N2 extends Emitter.Next, N1 extends Emitter.Ent<N2, Types.TInt>, N0 extends Emitter.Ent<N1, Types.TInt>> Emitter<Emitter.Ent<N2,Types.TInt>> iadd(Emitter<N0> em)
      Emit an iadd instruction
      Type Parameters:
      N2 - the tail of the stack (...)
      N1 - ..., value1
      N0 - ..., value1, value2
      Parameters:
      em - the emitter
      Returns:
      the emitter with ..., result
    • iaload

      static <N2 extends Emitter.Next, N1 extends Emitter.Ent<N2, Types.TRef<int[]>>, N0 extends Emitter.Ent<N1, Types.TInt>> Emitter<Emitter.Ent<N2,Types.TInt>> iaload(Emitter<N0> em)
      Emit an iaload instruction
      Type Parameters:
      N2 - the tail of the stack (...)
      N1 - ..., arrayref
      N0 - ..., arrayref, index
      Parameters:
      em - the emitter
      Returns:
      the emitter with ..., value
    • iand

      static <N2 extends Emitter.Next, N1 extends Emitter.Ent<N2, Types.TInt>, N0 extends Emitter.Ent<N1, Types.TInt>> Emitter<Emitter.Ent<N2,Types.TInt>> iand(Emitter<N0> em)
      Emit an iand instruction
      Type Parameters:
      N2 - the tail of the stack (...)
      N1 - ..., value1
      N0 - ..., value1, value2
      Parameters:
      em - the emitter
      Returns:
      the emitter with ..., result
    • iastore

      static <N3 extends Emitter.Next, N2 extends Emitter.Ent<N3, Types.TRef<int[]>>, N1 extends Emitter.Ent<N2, Types.TInt>, N0 extends Emitter.Ent<N1, Types.TInt>> Emitter<N3> iastore(Emitter<N0> em)
      Emit an iastore instruction
      Type Parameters:
      N3 - the tail of the stack (...)
      N2 - ..., arrayref
      N1 - ..., arrayref, index
      N0 - ..., arrayref, index, value
      Parameters:
      em - the emitter
      Returns:
      the emitter with ...
    • idiv

      static <N2 extends Emitter.Next, N1 extends Emitter.Ent<N2, Types.TInt>, N0 extends Emitter.Ent<N1, Types.TInt>> Emitter<Emitter.Ent<N2,Types.TInt>> idiv(Emitter<N0> em)
      Emit an idiv instruction
      Type Parameters:
      N2 - the tail of the stack (...)
      N1 - ..., value1
      N0 - ..., value1, value2
      Parameters:
      em - the emitter
      Returns:
      the emitter with ..., result
    • if_acmpeq

      static <N2 extends Emitter.Next, N1 extends Emitter.Ent<N2, Types.TRef<?>>, N0 extends Emitter.Ent<N1, Types.TRef<?>>> Lbl.LblEm<N2,N2> if_acmpeq(Emitter<N0> em)
      Emit an if_acmpeq instruction to a new target label
      Type Parameters:
      N2 - the tail of the stack (...)
      N1 - ..., value1
      N0 - ..., value1, value2
      Parameters:
      em - the emitter
      Returns:
      the new target label and the emitter with ...
    • if_acmpeq

      static <N2 extends Emitter.Next, N1 extends Emitter.Ent<N2, Types.TRef<?>>, N0 extends Emitter.Ent<N1, Types.TRef<?>>> Emitter<N2> if_acmpeq(Emitter<N0> em, Lbl<N2> target)
      Emit an if_acmpeq instruction to a given target label
      Type Parameters:
      N2 - the tail of the stack (...)
      N1 - ..., value1
      N0 - ..., value1, value2
      Parameters:
      em - the emitter
      target - the target label
      Returns:
      the emitter with ...
    • if_acmpne

      static <N2 extends Emitter.Next, N1 extends Emitter.Ent<N2, Types.TRef<?>>, N0 extends Emitter.Ent<N1, Types.TRef<?>>> Lbl.LblEm<N2,N2> if_acmpne(Emitter<N0> em)
      Emit an if_acmpne instruction to a new target label
      Type Parameters:
      N2 - the tail of the stack (...)
      N1 - ..., value1
      N0 - ..., value1, value2
      Parameters:
      em - the emitter
      Returns:
      the new target label and the emitter with ...
    • if_acmpne

      static <N2 extends Emitter.Next, N1 extends Emitter.Ent<N2, Types.TRef<?>>, N0 extends Emitter.Ent<N1, Types.TRef<?>>> Emitter<N2> if_acmpne(Emitter<N0> em, Lbl<N2> target)
      Emit an if_acmpne instruction to a given target label
      Type Parameters:
      N2 - the tail of the stack (...)
      N1 - ..., value1
      N0 - ..., value1, value2
      Parameters:
      em - the emitter
      target - the target label
      Returns:
      the emitter with ...
    • if_icmpeq

      static <N2 extends Emitter.Next, N1 extends Emitter.Ent<N2, Types.TInt>, N0 extends Emitter.Ent<N1, Types.TInt>> Lbl.LblEm<N2,N2> if_icmpeq(Emitter<N0> em)
      Emit an if_icmpeq instruction to a new target label
      Type Parameters:
      N2 - the tail of the stack (...)
      N1 - ..., value1
      N0 - ..., value1, value2
      Parameters:
      em - the emitter
      Returns:
      the new target label and the emitter with ...
    • if_icmpeq

      static <N2 extends Emitter.Next, N1 extends Emitter.Ent<N2, Types.TInt>, N0 extends Emitter.Ent<N1, Types.TInt>> Emitter<N2> if_icmpeq(Emitter<N0> em, Lbl<N2> target)
      Emit an if_icmpeq instruction to a given target label
      Type Parameters:
      N2 - the tail of the stack (...)
      N1 - ..., value1
      N0 - ..., value1, value2
      Parameters:
      em - the emitter
      target - the target label
      Returns:
      the emitter with ...
    • if_icmpge

      static <N2 extends Emitter.Next, N1 extends Emitter.Ent<N2, Types.TInt>, N0 extends Emitter.Ent<N1, Types.TInt>> Lbl.LblEm<N2,N2> if_icmpge(Emitter<N0> em)
      Emit an if_icmpge instruction to a new target label
      Type Parameters:
      N2 - the tail of the stack (...)
      N1 - ..., value1
      N0 - ..., value1, value2
      Parameters:
      em - the emitter
      Returns:
      the new target label and the emitter with ...
    • if_icmpge

      static <N2 extends Emitter.Next, N1 extends Emitter.Ent<N2, Types.TInt>, N0 extends Emitter.Ent<N1, Types.TInt>> Emitter<N2> if_icmpge(Emitter<N0> em, Lbl<N2> target)
      Emit an if_icmpge instruction to a given target label
      Type Parameters:
      N2 - the tail of the stack (...)
      N1 - ..., value1
      N0 - ..., value1, value2
      Parameters:
      em - the emitter
      target - the target label
      Returns:
      the emitter with ...
    • if_icmpgt

      static <N2 extends Emitter.Next, N1 extends Emitter.Ent<N2, Types.TInt>, N0 extends Emitter.Ent<N1, Types.TInt>> Lbl.LblEm<N2,N2> if_icmpgt(Emitter<N0> em)
      Emit an if_icmpgt instruction to a new target label
      Type Parameters:
      N2 - the tail of the stack (...)
      N1 - ..., value1
      N0 - ..., value1, value2
      Parameters:
      em - the emitter
      Returns:
      the new target label and the emitter with ...
    • if_icmpgt

      static <N2 extends Emitter.Next, N1 extends Emitter.Ent<N2, Types.TInt>, N0 extends Emitter.Ent<N1, Types.TInt>> Emitter<N2> if_icmpgt(Emitter<N0> em, Lbl<N2> target)
      Emit an if_icmpgt instruction to a given target label
      Type Parameters:
      N2 - the tail of the stack (...)
      N1 - ..., value1
      N0 - ..., value1, value2
      Parameters:
      em - the emitter
      target - the target label
      Returns:
      the emitter with ...
    • if_icmple

      static <N2 extends Emitter.Next, N1 extends Emitter.Ent<N2, Types.TInt>, N0 extends Emitter.Ent<N1, Types.TInt>> Lbl.LblEm<N2,N2> if_icmple(Emitter<N0> em)
      Emit an if_icmple instruction to a new target label
      Type Parameters:
      N2 - the tail of the stack (...)
      N1 - ..., value1
      N0 - ..., value1, value2
      Parameters:
      em - the emitter
      Returns:
      the new target label and the emitter with ...
    • if_icmple

      static <N2 extends Emitter.Next, N1 extends Emitter.Ent<N2, Types.TInt>, N0 extends Emitter.Ent<N1, Types.TInt>> Emitter<N2> if_icmple(Emitter<N0> em, Lbl<N2> target)
      Emit an if_icmple instruction to a given target label
      Type Parameters:
      N2 - the tail of the stack (...)
      N1 - ..., value1
      N0 - ..., value1, value2
      Parameters:
      em - the emitter
      target - the target label
      Returns:
      the emitter with ...
    • if_icmplt

      static <N2 extends Emitter.Next, N1 extends Emitter.Ent<N2, Types.TInt>, N0 extends Emitter.Ent<N1, Types.TInt>> Lbl.LblEm<N2,N2> if_icmplt(Emitter<N0> em)
      Emit an if_icmplt instruction to a new target label
      Type Parameters:
      N2 - the tail of the stack (...)
      N1 - ..., value1
      N0 - ..., value1, value2
      Parameters:
      em - the emitter
      Returns:
      the new target label and the emitter with ...
    • if_icmplt

      static <N2 extends Emitter.Next, N1 extends Emitter.Ent<N2, Types.TInt>, N0 extends Emitter.Ent<N1, Types.TInt>> Emitter<N2> if_icmplt(Emitter<N0> em, Lbl<N2> target)
      Emit an if_icmplt instruction to a given target label
      Type Parameters:
      N2 - the tail of the stack (...)
      N1 - ..., value1
      N0 - ..., value1, value2
      Parameters:
      em - the emitter
      target - the target label
      Returns:
      the emitter with ...
    • if_icmpne

      static <N2 extends Emitter.Next, N1 extends Emitter.Ent<N2, Types.TInt>, N0 extends Emitter.Ent<N1, Types.TInt>> Lbl.LblEm<N2,N2> if_icmpne(Emitter<N0> em)
      Emit an if_icmpne instruction to a new target label
      Type Parameters:
      N2 - the tail of the stack (...)
      N1 - ..., value1
      N0 - ..., value1, value2
      Parameters:
      em - the emitter
      Returns:
      the new target label and the emitter with ...
    • if_icmpne

      static <N2 extends Emitter.Next, N1 extends Emitter.Ent<N2, Types.TInt>, N0 extends Emitter.Ent<N1, Types.TInt>> Emitter<N2> if_icmpne(Emitter<N0> em, Lbl<N2> target)
      Emit an if_icmpne instruction to a given target label
      Type Parameters:
      N2 - the tail of the stack (...)
      N1 - ..., value1
      N0 - ..., value1, value2
      Parameters:
      em - the emitter
      target - the target label
      Returns:
      the emitter with ...
    • ifeq

      static <N1 extends Emitter.Next, N0 extends Emitter.Ent<N1, Types.TInt>> Lbl.LblEm<N1,N1> ifeq(Emitter<N0> em)
      Emit an ifeq instruction to a new target label
      Type Parameters:
      N1 - the tail of the stack (...)
      N0 - ..., value
      Parameters:
      em - the emitter
      Returns:
      the new target label and the emitter with ...
    • ifeq

      static <N1 extends Emitter.Next, N0 extends Emitter.Ent<N1, Types.TInt>> Emitter<N1> ifeq(Emitter<N0> em, Lbl<N1> target)
      Emit an ifeq instruction to a given target label
      Type Parameters:
      N1 - the tail of the stack (...)
      N0 - ..., value
      Parameters:
      em - the emitter
      target - the target label
      Returns:
      the emitter with ...
    • ifge

      static <N1 extends Emitter.Next, N0 extends Emitter.Ent<N1, Types.TInt>> Lbl.LblEm<N1,N1> ifge(Emitter<N0> em)
      Emit an ifge instruction to a new target label
      Type Parameters:
      N1 - the tail of the stack (...)
      N0 - ..., value
      Parameters:
      em - the emitter
      Returns:
      the new target label and the emitter with ...
    • ifge

      static <N1 extends Emitter.Next, N0 extends Emitter.Ent<N1, Types.TInt>> Emitter<N1> ifge(Emitter<N0> em, Lbl<N1> target)
      Emit an ifge instruction to a given target label
      Type Parameters:
      N1 - the tail of the stack (...)
      N0 - ..., value
      Parameters:
      em - the emitter
      target - the target label
      Returns:
      the emitter with ...
    • ifgt

      static <N1 extends Emitter.Next, N0 extends Emitter.Ent<N1, Types.TInt>> Lbl.LblEm<N1,N1> ifgt(Emitter<N0> em)
      Emit an ifgt instruction to a new target label
      Type Parameters:
      N1 - the tail of the stack (...)
      N0 - ..., value
      Parameters:
      em - the emitter
      Returns:
      the new target label and the emitter with ...
    • ifgt

      static <N1 extends Emitter.Next, N0 extends Emitter.Ent<N1, Types.TInt>> Emitter<N1> ifgt(Emitter<N0> em, Lbl<N1> target)
      Emit an ifgt instruction to a given target label
      Type Parameters:
      N1 - the tail of the stack (...)
      N0 - ..., value
      Parameters:
      em - the emitter
      target - the target label
      Returns:
      the emitter with ...
    • ifle

      static <N1 extends Emitter.Next, N0 extends Emitter.Ent<N1, Types.TInt>> Lbl.LblEm<N1,N1> ifle(Emitter<N0> em)
      Emit an ifle instruction to a new target label
      Type Parameters:
      N1 - the tail of the stack (...)
      N0 - ..., value
      Parameters:
      em - the emitter
      Returns:
      the new target label and the emitter with ...
    • ifle

      static <N1 extends Emitter.Next, N0 extends Emitter.Ent<N1, Types.TInt>> Emitter<N1> ifle(Emitter<N0> em, Lbl<N1> target)
      Emit an ifle instruction to a given target label
      Type Parameters:
      N1 - the tail of the stack (...)
      N0 - ..., value
      Parameters:
      em - the emitter
      target - the target label
      Returns:
      the emitter with ...
    • iflt

      static <N1 extends Emitter.Next, N0 extends Emitter.Ent<N1, Types.TInt>> Lbl.LblEm<N1,N1> iflt(Emitter<N0> em)
      Emit an iflt instruction to a new target label
      Type Parameters:
      N1 - the tail of the stack (...)
      N0 - ..., value
      Parameters:
      em - the emitter
      Returns:
      the new target label and the emitter with ...
    • iflt

      static <N1 extends Emitter.Next, N0 extends Emitter.Ent<N1, Types.TInt>> Emitter<N1> iflt(Emitter<N0> em, Lbl<N1> target)
      Emit an iflt instruction to a given target label
      Type Parameters:
      N1 - the tail of the stack (...)
      N0 - ..., value
      Parameters:
      em - the emitter
      target - the target label
      Returns:
      the emitter with ...
    • ifne

      static <N1 extends Emitter.Next, N0 extends Emitter.Ent<N1, Types.TInt>> Lbl.LblEm<N1,N1> ifne(Emitter<N0> em)
      Emit an ifne instruction to a new target label
      Type Parameters:
      N1 - the tail of the stack (...)
      N0 - ..., value
      Parameters:
      em - the emitter
      Returns:
      the new target label and the emitter with ...
    • ifne

      static <N1 extends Emitter.Next, N0 extends Emitter.Ent<N1, Types.TInt>> Emitter<N1> ifne(Emitter<N0> em, Lbl<N1> target)
      Emit an ifne instruction to a given target label
      Type Parameters:
      N1 - the tail of the stack (...)
      N0 - ..., value
      Parameters:
      em - the emitter
      target - the target label
      Returns:
      the emitter with ...
    • ifnonnull

      static <N1 extends Emitter.Next, N0 extends Emitter.Ent<N1, Types.TRef<?>>> Lbl.LblEm<N1,N1> ifnonnull(Emitter<N0> em)
      Emit an ifnonnull instruction to a new target label
      Type Parameters:
      N1 - the tail of the stack (...)
      N0 - ..., value
      Parameters:
      em - the emitter
      Returns:
      the new target label and the emitter with ...
    • ifnonnull

      static <N1 extends Emitter.Next, N0 extends Emitter.Ent<N1, Types.TRef<?>>> Emitter<N1> ifnonnull(Emitter<N0> em, Lbl<N1> target)
      Emit an ifnonnull instruction to a given target label
      Type Parameters:
      N1 - the tail of the stack (...)
      N0 - ..., value
      Parameters:
      em - the emitter
      target - the target label
      Returns:
      the emitter with ...
    • ifnull

      static <N1 extends Emitter.Next, N0 extends Emitter.Ent<N1, Types.TRef<?>>> Lbl.LblEm<N1,N1> ifnull(Emitter<N0> em)
      Emit an ifnull instruction to a new target label
      Type Parameters:
      N1 - the tail of the stack (...)
      N0 - ..., value
      Parameters:
      em - the emitter
      Returns:
      the new target label and the emitter with ...
    • ifnull

      static <N1 extends Emitter.Next, N0 extends Emitter.Ent<N1, Types.TRef<?>>> Emitter<N1> ifnull(Emitter<N0> em, Lbl<N1> target)
      Emit an ifnull instruction to a given target label
      Type Parameters:
      N1 - the tail of the stack (...)
      N0 - ..., value
      Parameters:
      em - the emitter
      target - the target label
      Returns:
      the emitter with ...
    • iinc

      static <N extends Emitter.Next> Emitter<N> iinc(Emitter<N> em, Local<Types.TInt> local, int increment)
      Emit an iinc instruction
      Type Parameters:
      N - the tail of the stack (...)
      Parameters:
      em - the emitter
      local - the target local to increment
      increment - the constant value to increment by
      Returns:
      the emitter with ...
    • iload

      static <N extends Emitter.Next> Emitter<Emitter.Ent<N,Types.TInt>> iload(Emitter<N> em, Local<Types.TInt> local)
      Emit an iload instruction
      Type Parameters:
      N - the tail of the stack (...)
      Parameters:
      em - the emitter
      local - the handle to the local
      Returns:
      the emitter with ..., value
    • imul

      static <N2 extends Emitter.Next, N1 extends Emitter.Ent<N2, Types.TInt>, N0 extends Emitter.Ent<N1, Types.TInt>> Emitter<Emitter.Ent<N2,Types.TInt>> imul(Emitter<N0> em)
      Emit an imul instruction
      Type Parameters:
      N2 - the tail of the stack (...)
      N1 - ..., value1
      N0 - ..., value1, value2
      Parameters:
      em - the emitter
      Returns:
      the emitter with ..., result
    • ineg

      static <N1 extends Emitter.Next, N0 extends Emitter.Ent<N1, Types.TInt>> Emitter<Emitter.Ent<N1,Types.TInt>> ineg(Emitter<N0> em)
      Emit an ineg instruction
      Type Parameters:
      N1 - the tail of the stack (...)
      N0 - ..., value
      Parameters:
      em - the emitter
      Returns:
      the emitter with ..., result
    • instanceof_

      static <N1 extends Emitter.Next, N0 extends Emitter.Ent<N1, Types.TRef<?>>> Emitter<Emitter.Ent<N1,Types.TInt>> instanceof_(Emitter<N0> em, Types.TRef<?> type)
      Emit an instanceof instruction
      Type Parameters:
      N1 - the tail of the stack (...)
      N0 - ..., objectref
      Parameters:
      em - the emitter
      type - the given type (T)
      Returns:
      the emitter with ..., result
    • invokedynamic__unsupported

      static <SN extends Emitter.Next, MN extends Emitter.Next, MR extends Types.BType> Methods.Inv<MR,SN,MN> invokedynamic__unsupported(Emitter<SN> em, String name, Methods.MthDesc<MR,MN> desc, org.objectweb.asm.Handle bootstrapMethodHandle, Object... bootstrapMethodArguments)
      Emit an invokedynamic instruction

      WARNING: This is probably not implemented correctly. The JVM spec does not provide an example, but the best we can tell, after all the call site resolution machinery, the net arguments actually consumed from the stack is determined by the given method descriptor. We also just let the ASM types Type, Handle, and ConstantDynamic leak from an API perspective.

      Type Parameters:
      SN - the JVM stack at the call site. Some may be popped as arguments
      MN - the parameters expected by the method descriptor
      MR - the return type from the method descriptor
      Parameters:
      em - the emitter
      name - the name of the method
      desc - the method descriptor
      bootstrapMethodHandle - as in MethodVisitor.visitInvokeDynamicInsn(String, String, Handle, Object...)
      bootstrapMethodArguments - as in MethodVisitor.visitInvokeDynamicInsn(String, String, Handle, Object...)
      Returns:
      an object to complete type checking of the arguments and, if applicable, the result
    • invokeinterface

      static <OT, SN extends Emitter.Next, MN extends Emitter.Next, MR extends Types.BType> Methods.ObjInv<MR,OT,SN,MN> invokeinterface(Emitter<SN> em, Types.TRef<OT> ownerType, String name, Methods.MthDesc<MR,MN> desc)
      Emit an invokeinterface instruction
      Type Parameters:
      OT - the owner (interface) type
      SN - the JVM stack at the call site. Some may be popped as arguments
      MN - the parameters expected by the method descriptor
      MR - the return type from the method descriptor
      Parameters:
      em - the emitter
      ownerType - the owner (interface) type
      name - the name of the method
      desc - the method descriptor
      Returns:
      an object to complete type checking of the arguments and, if applicable, the result
    • invokespecial

      static <OT, SN extends Emitter.Next, MN extends Emitter.Next, MR extends Types.BType> Methods.ObjInv<MR,OT,SN,MN> invokespecial(Emitter<SN> em, Types.TRef<OT> ownerType, String name, Methods.MthDesc<MR,MN> desc, boolean isInterface)
      Emit an invokespecial instruction
      Type Parameters:
      OT - the owner (super) type
      SN - the JVM stack at the call site. Some may be popped as arguments
      MN - the parameters expected by the method descriptor
      MR - the return type from the method descriptor
      Parameters:
      em - the emitter
      ownerType - the owner (super) type
      name - the name of the method
      desc - the method descriptor
      isInterface - true to indicate the owner type is an interface
      Returns:
      an object to complete type checking of the arguments and, if applicable, the result
    • invokestatic

      static <SN extends Emitter.Next, MN extends Emitter.Next, MR extends Types.BType> Methods.Inv<MR,SN,MN> invokestatic(Emitter<SN> em, Types.TRef<?> ownerType, String name, Methods.MthDesc<MR,MN> desc, boolean isInterface)
      Emit an invokestatic instruction
      Type Parameters:
      SN - the JVM stack at the call site. Some may be popped as arguments
      MN - the parameters expected by the method descriptor
      MR - the return type from the method descriptor
      Parameters:
      em - the emitter
      ownerType - the owner type
      name - the name of the method
      desc - the method descriptor
      isInterface - true to indicate the owner type is an interface
      Returns:
      an object to complete type checking of the arguments and, if applicable, the result
    • invokevirtual

      static <OT, SN extends Emitter.Next, MN extends Emitter.Next, MR extends Types.BType> Methods.ObjInv<MR,OT,SN,MN> invokevirtual(Emitter<SN> em, Types.TRef<OT> ownerType, String name, Methods.MthDesc<MR,MN> desc, boolean isInterface)
      Emit an invokevirtual instruction
      Type Parameters:
      OT - the owner type
      SN - the JVM stack at the call site. Some may be popped as arguments
      MN - the parameters expected by the method descriptor
      MR - the return type from the method descriptor
      Parameters:
      em - the emitter
      ownerType - the owner type
      name - the name of the method
      desc - the method descriptor
      isInterface - true to indicate the owner type is an interface
      Returns:
      an object to complete type checking of the arguments and, if applicable, the result
    • ior

      static <N2 extends Emitter.Next, N1 extends Emitter.Ent<N2, Types.TInt>, N0 extends Emitter.Ent<N1, Types.TInt>> Emitter<Emitter.Ent<N2,Types.TInt>> ior(Emitter<N0> em)
      Emit an ior instruction
      Type Parameters:
      N2 - the tail of the stack (...)
      N1 - ..., value1
      N0 - ..., value1, value2
      Parameters:
      em - the emitter
      Returns:
      the emitter with ..., result
    • irem

      static <N2 extends Emitter.Next, N1 extends Emitter.Ent<N2, Types.TInt>, N0 extends Emitter.Ent<N1, Types.TInt>> Emitter<Emitter.Ent<N2,Types.TInt>> irem(Emitter<N0> em)
      Emit an irem instruction
      Type Parameters:
      N2 - the tail of the stack (...)
      N1 - ..., value1
      N0 - ..., value1, value2
      Parameters:
      em - the emitter
      Returns:
      the emitter with ..., result
    • ireturn

      static <N1 extends Emitter.Next, N0 extends Emitter.Ent<N1, Types.TInt>> Emitter<Emitter.Dead> ireturn(Emitter<N0> em, Methods.RetReq<Types.TInt> retReq)
      Emit an ireturn instruction
      Type Parameters:
      N1 - the tail of the stack (...)
      N0 - ..., value
      Parameters:
      em - the emitter
      retReq - some proof of this method's required return type
      Returns:
      the dead emitter
    • ishl

      static <N2 extends Emitter.Next, N1 extends Emitter.Ent<N2, Types.TInt>, N0 extends Emitter.Ent<N1, Types.TInt>> Emitter<Emitter.Ent<N2,Types.TInt>> ishl(Emitter<N0> em)
      Emit an ishl instruction
      Type Parameters:
      N2 - the tail of the stack (...)
      N1 - ..., value1
      N0 - ..., value1, value2
      Parameters:
      em - the emitter
      Returns:
      the emitter with ..., result
    • ishr

      static <N2 extends Emitter.Next, N1 extends Emitter.Ent<N2, Types.TInt>, N0 extends Emitter.Ent<N1, Types.TInt>> Emitter<Emitter.Ent<N2,Types.TInt>> ishr(Emitter<N0> em)
      Emit an ishr instruction
      Type Parameters:
      N2 - the tail of the stack (...)
      N1 - ..., value1
      N0 - ..., value1, value2
      Parameters:
      em - the emitter
      Returns:
      the emitter with ..., result
    • istore

      static <N1 extends Emitter.Next, N0 extends Emitter.Ent<N1, Types.TInt>> Emitter<N1> istore(Emitter<N0> em, Local<Types.TInt> local)
      Emit an istore instruction
      Type Parameters:
      N1 - the tail of the stack (...)
      N0 - ..., value
      Parameters:
      em - the emitter
      local - the target local variable
      Returns:
      the emitter with ...
    • isub

      static <N2 extends Emitter.Next, N1 extends Emitter.Ent<N2, Types.TInt>, N0 extends Emitter.Ent<N1, Types.TInt>> Emitter<Emitter.Ent<N2,Types.TInt>> isub(Emitter<N0> em)
      Emit an isub instruction
      Type Parameters:
      N2 - the tail of the stack (...)
      N1 - ..., value1
      N0 - ..., value1, value2
      Parameters:
      em - the emitter
      Returns:
      the emitter with ..., result
    • iushr

      static <N2 extends Emitter.Next, N1 extends Emitter.Ent<N2, Types.TInt>, N0 extends Emitter.Ent<N1, Types.TInt>> Emitter<Emitter.Ent<N2,Types.TInt>> iushr(Emitter<N0> em)
      Emit an iushr instruction
      Type Parameters:
      N2 - the tail of the stack (...)
      N1 - ..., value1
      N0 - ..., value1, value2
      Parameters:
      em - the emitter
      Returns:
      the emitter with ..., result
    • ixor

      static <N2 extends Emitter.Next, N1 extends Emitter.Ent<N2, Types.TInt>, N0 extends Emitter.Ent<N1, Types.TInt>> Emitter<Emitter.Ent<N2,Types.TInt>> ixor(Emitter<N0> em)
      Emit an ixor instruction
      Type Parameters:
      N2 - the tail of the stack (...)
      N1 - ..., value1
      N0 - ..., value1, value2
      Parameters:
      em - the emitter
      Returns:
      the emitter with ..., result
    • jsr__deprecated

      static Emitter<?> jsr__deprecated(Emitter<?> em, Lbl<?> target)
      DO NOT emit an jsr instruction

      According to Oracle's documentation, this deprecated instruction was used in the implementation of finally blocks prior to Java SE 6. This method is here only to guide users searching for the jsr opcode toward the replacement: Misc.tryCatch(Emitter, Lbl, Lbl, TRef). Syntactically, trying to use this method should result in all sorts of compilation errors, if not on the invocation itself, then on anything following it in the chain. At runtime, this always throws an UnsupportedOperationException.

      Parameters:
      em - the emitter
      target - the target label
      Returns:
      never
    • l2d

      static <N1 extends Emitter.Next, N0 extends Emitter.Ent<N1, Types.TLong>> Emitter<Emitter.Ent<N1,Types.TDouble>> l2d(Emitter<N0> em)
      Emit an l2d instruction
      Type Parameters:
      N1 - the tail of the stack (...)
      N0 - ..., value
      Parameters:
      em - the emitter
      Returns:
      the emitter with ..., result
    • l2f

      static <N1 extends Emitter.Next, N0 extends Emitter.Ent<N1, Types.TLong>> Emitter<Emitter.Ent<N1,Types.TFloat>> l2f(Emitter<N0> em)
      Emit an l2f instruction
      Type Parameters:
      N1 - the tail of the stack (...)
      N0 - ..., value
      Parameters:
      em - the emitter
      Returns:
      the emitter with ..., result
    • l2i

      static <N1 extends Emitter.Next, N0 extends Emitter.Ent<N1, Types.TLong>> Emitter<Emitter.Ent<N1,Types.TInt>> l2i(Emitter<N0> em)
      Emit an l2i instruction
      Type Parameters:
      N1 - the tail of the stack (...)
      N0 - ..., value
      Parameters:
      em - the emitter
      Returns:
      the emitter with ..., result
    • ladd

      static <N2 extends Emitter.Next, N1 extends Emitter.Ent<N2, Types.TLong>, N0 extends Emitter.Ent<N1, Types.TLong>> Emitter<Emitter.Ent<N2,Types.TLong>> ladd(Emitter<N0> em)
      Emit an ladd instruction
      Type Parameters:
      N2 - the tail of the stack (...)
      N1 - ..., value1
      N0 - ..., value1, value2
      Parameters:
      em - the emitter
      Returns:
      the emitter with ..., result
    • laload

      static <N2 extends Emitter.Next, N1 extends Emitter.Ent<N2, Types.TRef<long[]>>, N0 extends Emitter.Ent<N1, Types.TInt>> Emitter<Emitter.Ent<N2,Types.TLong>> laload(Emitter<N0> em)
      Emit an laload instruction
      Type Parameters:
      N2 - the tail of the stack (...)
      N1 - ..., arrayref
      N0 - ..., arrayref, index
      Parameters:
      em - the emitter
      Returns:
      the emitter with ..., value
    • land

      static <N2 extends Emitter.Next, N1 extends Emitter.Ent<N2, Types.TLong>, N0 extends Emitter.Ent<N1, Types.TLong>> Emitter<Emitter.Ent<N2,Types.TLong>> land(Emitter<N0> em)
      Emit an land instruction
      Type Parameters:
      N2 - the tail of the stack (...)
      N1 - ..., value1
      N0 - ..., value1, value2
      Parameters:
      em - the emitter
      Returns:
      the emitter with ..., result
    • lastore

      static <N3 extends Emitter.Next, N2 extends Emitter.Ent<N3, Types.TRef<long[]>>, N1 extends Emitter.Ent<N2, Types.TInt>, N0 extends Emitter.Ent<N1, Types.TLong>> Emitter<N3> lastore(Emitter<N0> em)
      Emit an lastore instruction
      Type Parameters:
      N3 - the tail of the stack (...)
      N2 - ..., arrayref
      N1 - ..., arrayref, index
      N0 - ..., arrayref, index, value
      Parameters:
      em - the emitter
      Returns:
      the emitter with ...
    • lcmp

      static <N2 extends Emitter.Next, N1 extends Emitter.Ent<N2, Types.TLong>, N0 extends Emitter.Ent<N1, Types.TLong>> Emitter<Emitter.Ent<N2,Types.TInt>> lcmp(Emitter<N0> em)
      Emit an lcmp instruction
      Type Parameters:
      N2 - the tail of the stack (...)
      N1 - ..., value1
      N0 - ..., value1, value2
      Parameters:
      em - the emitter
      Returns:
      the emitter with ..., result
    • ldc__i

      static <N extends Emitter.Next> Emitter<Emitter.Ent<N,Types.TInt>> ldc__i(Emitter<N> em, int value)
      Emit an ldc instruction for an integer

      NOTE: The underlying ASM library may emit alternative instructions at its discretion.

      Type Parameters:
      N - the tail of the stack (...)
      Parameters:
      em - the emitter
      value - the value to push
      Returns:
      the emitter with ..., value
    • ldc__l

      static <N extends Emitter.Next> Emitter<Emitter.Ent<N,Types.TLong>> ldc__l(Emitter<N> em, long value)
      Emit an ldc instruction for a long

      NOTE: The underlying ASM library may emit alternative instructions at its discretion.

      Type Parameters:
      N - the tail of the stack (...)
      Parameters:
      em - the emitter
      value - the value to push
      Returns:
      the emitter with ..., value
    • ldc__f

      static <N extends Emitter.Next> Emitter<Emitter.Ent<N,Types.TFloat>> ldc__f(Emitter<N> em, float value)
      Emit an ldc instruction for a float

      NOTE: The underlying ASM library may emit alternative instructions at its discretion.

      Type Parameters:
      N - the tail of the stack (...)
      Parameters:
      em - the emitter
      value - the value to push
      Returns:
      the emitter with ..., value
    • ldc__d

      static <N extends Emitter.Next> Emitter<Emitter.Ent<N,Types.TDouble>> ldc__d(Emitter<N> em, double value)
      Emit an ldc instruction for a double

      NOTE: The underlying ASM library may emit alternative instructions at its discretion.

      Type Parameters:
      N - the tail of the stack (...)
      Parameters:
      em - the emitter
      value - the value to push
      Returns:
      the emitter with ..., value
    • ldc__a

      static <T, N extends Emitter.Next> Emitter<Emitter.Ent<N,Types.TRef<T>>> ldc__a(Emitter<N> em, T value)
      Emit an ldc instruction for a reference

      NOTE: Only certain reference types are permitted. Some of the permitted types are those leaked (API-wise) from the underlying ASM library. The underlying ASM library may emit alternative instructions at its discretion.

      Type Parameters:
      N - the tail of the stack (...)
      Parameters:
      em - the emitter
      value - the value to push
      Returns:
      the emitter with ..., value
    • ldiv

      static <N2 extends Emitter.Next, N1 extends Emitter.Ent<N2, Types.TLong>, N0 extends Emitter.Ent<N1, Types.TLong>> Emitter<Emitter.Ent<N2,Types.TLong>> ldiv(Emitter<N0> em)
      Emit an ldiv instruction
      Type Parameters:
      N2 - the tail of the stack (...)
      N1 - ..., value1
      N0 - ..., value1, value2
      Parameters:
      em - the emitter
      Returns:
      the emitter with ..., result
    • lload

      static <N extends Emitter.Next> Emitter<Emitter.Ent<N,Types.TLong>> lload(Emitter<N> em, Local<Types.TLong> local)
      Emit an lload instruction
      Type Parameters:
      N - the tail of the stack (...)
      Parameters:
      em - the emitter
      local - the handle to the local
      Returns:
      the emitter with ..., value
    • lmul

      static <N2 extends Emitter.Next, N1 extends Emitter.Ent<N2, Types.TLong>, N0 extends Emitter.Ent<N1, Types.TLong>> Emitter<Emitter.Ent<N2,Types.TLong>> lmul(Emitter<N0> em)
      Emit an lmul instruction
      Type Parameters:
      N2 - the tail of the stack (...)
      N1 - ..., value1
      N0 - ..., value1, value2
      Parameters:
      em - the emitter
      Returns:
      the emitter with ..., result
    • lneg

      static <N1 extends Emitter.Next, N0 extends Emitter.Ent<N1, Types.TLong>> Emitter<Emitter.Ent<N1,Types.TLong>> lneg(Emitter<N0> em)
      Emit an lneg instruction
      Type Parameters:
      N1 - the tail of the stack (...)
      N0 - ..., value
      Parameters:
      em - the emitter
      Returns:
      the emitter with ..., result
    • lookupswitch

      static <N1 extends Emitter.Next, N0 extends Emitter.Ent<N1, Types.TInt>> Emitter<Emitter.Dead> lookupswitch(Emitter<N0> em, Lbl<N1> dflt, Map<Integer,Lbl<N1>> cases)
      Emit a lookupswitch instruction
      Type Parameters:
      N1 - the tail of the stack (...)
      N0 - ..., key
      Parameters:
      em - the emitter
      dflt - a target label for the default case. The stack at the label must be ...
      cases - a map of integer case value to target label. The stack at each label must be ...
      Returns:
      the dead emitter
    • lor

      static <N2 extends Emitter.Next, N1 extends Emitter.Ent<N2, Types.TLong>, N0 extends Emitter.Ent<N1, Types.TLong>> Emitter<Emitter.Ent<N2,Types.TLong>> lor(Emitter<N0> em)
      Emit an lor instruction
      Type Parameters:
      N2 - the tail of the stack (...)
      N1 - ..., value1
      N0 - ..., value1, value2
      Parameters:
      em - the emitter
      Returns:
      the emitter with ..., result
    • lrem

      static <N2 extends Emitter.Next, N1 extends Emitter.Ent<N2, Types.TLong>, N0 extends Emitter.Ent<N1, Types.TLong>> Emitter<Emitter.Ent<N2,Types.TLong>> lrem(Emitter<N0> em)
      Emit an lrem instruction
      Type Parameters:
      N2 - the tail of the stack (...)
      N1 - ..., value1
      N0 - ..., value1, value2
      Parameters:
      em - the emitter
      Returns:
      the emitter with ..., result
    • lreturn

      static <N1 extends Emitter.Next, N0 extends Emitter.Ent<N1, Types.TInt>> Emitter<Emitter.Dead> lreturn(Emitter<N0> em, Methods.RetReq<Types.TInt> retReq)
      Emit an lreturn instruction
      Type Parameters:
      N1 - the tail of the stack (...)
      N0 - ..., value
      Parameters:
      em - the emitter
      retReq - some proof of this method's required return type
      Returns:
      the dead emitter
    • lshl

      static <N2 extends Emitter.Next, N1 extends Emitter.Ent<N2, Types.TLong>, N0 extends Emitter.Ent<N1, Types.TInt>> Emitter<Emitter.Ent<N2,Types.TLong>> lshl(Emitter<N0> em)
      Emit an lshl instruction
      Type Parameters:
      N2 - the tail of the stack (...)
      N1 - ..., value1
      N0 - ..., value1, value2
      Parameters:
      em - the emitter
      Returns:
      the emitter with ..., result
    • lshr

      static <N2 extends Emitter.Next, N1 extends Emitter.Ent<N2, Types.TLong>, N0 extends Emitter.Ent<N1, Types.TInt>> Emitter<Emitter.Ent<N2,Types.TLong>> lshr(Emitter<N0> em)
      Emit an lshr instruction
      Type Parameters:
      N2 - the tail of the stack (...)
      N1 - ..., value1
      N0 - ..., value1, value2
      Parameters:
      em - the emitter
      Returns:
      the emitter with ..., result
    • lstore

      static <N1 extends Emitter.Next, N0 extends Emitter.Ent<N1, Types.TLong>> Emitter<N1> lstore(Emitter<N0> em, Local<Types.TLong> local)
      Emit an lstore instruction
      Type Parameters:
      N1 - the tail of the stack (...)
      N0 - ..., value
      Parameters:
      em - the emitter
      local - the target local variable
      Returns:
      the emitter with ...
    • lsub

      static <N2 extends Emitter.Next, N1 extends Emitter.Ent<N2, Types.TLong>, N0 extends Emitter.Ent<N1, Types.TLong>> Emitter<Emitter.Ent<N2,Types.TLong>> lsub(Emitter<N0> em)
      Emit an lsub instruction
      Type Parameters:
      N2 - the tail of the stack (...)
      N1 - ..., value1
      N0 - ..., value1, value2
      Parameters:
      em - the emitter
      Returns:
      the emitter with ..., result
    • lushr

      static <N2 extends Emitter.Next, N1 extends Emitter.Ent<N2, Types.TLong>, N0 extends Emitter.Ent<N1, Types.TInt>> Emitter<Emitter.Ent<N2,Types.TLong>> lushr(Emitter<N0> em)
      Emit an lushr instruction
      Type Parameters:
      N2 - the tail of the stack (...)
      N1 - ..., value1
      N0 - ..., value1, value2
      Parameters:
      em - the emitter
      Returns:
      the emitter with ..., result
    • lxor

      static <N2 extends Emitter.Next, N1 extends Emitter.Ent<N2, Types.TLong>, N0 extends Emitter.Ent<N1, Types.TLong>> Emitter<Emitter.Ent<N2,Types.TLong>> lxor(Emitter<N0> em)
      Emit an lxor instruction
      Type Parameters:
      N2 - the tail of the stack (...)
      N1 - ..., value1
      N0 - ..., value1, value2
      Parameters:
      em - the emitter
      Returns:
      the emitter with ..., result
    • monitorenter

      static <N1 extends Emitter.Next, N0 extends Emitter.Ent<N1, Types.TRef<?>>> Emitter<N1> monitorenter(Emitter<N0> em)
      Emit a monitorenter instruction
      Type Parameters:
      N1 - the tail of the stack (...)
      N0 - ..., objectref
      Parameters:
      em - the emitter
      Returns:
      the emitter with ...
    • monitorexit

      static <N1 extends Emitter.Next, N0 extends Emitter.Ent<N1, Types.TRef<?>>> Emitter<N1> monitorexit(Emitter<N0> em)
      Emit a monitorexit instruction
      Type Parameters:
      N1 - the tail of the stack (...)
      N0 - ..., objectref
      Parameters:
      em - the emitter
      Returns:
      the emitter with ...
    • multianewarray__unsupported

      static Emitter<?> multianewarray__unsupported(Emitter<?> em, Types.TRef<?> type, int dimensions)
      Emit a multianewarray instruction

      NOTE: This will emit the instruction, but derivation of the resulting stack contents is not implemented. The user must cast the emitter to the resulting type. LATER: If required, we may implement this for specific dimensions. Or, we might use a pattern similar to what we used for method invocation to allow us an arbitrary number of stack arguments.

      Parameters:
      em - the emitter
      type - the type of the full multidimensional array (not just the element type)
      dimensions - the number of dimensions to allocate
      Returns:
      the emitter with unknown stack
    • new_

      static <T extends Types.TRef<?>, N extends Emitter.Next> Emitter<Emitter.Ent<N,T>> new_(Emitter<N> em, T type)
      Emit a new instruction
      Type Parameters:
      T - the type of object
      N - the tail of the stack (...)
      Parameters:
      em - the emitter
      type - the type of object
      Returns:
      the emitter with ..., objectref (uninitialized)
      Implementation Notes:
      We considered using a separate URef type to indicate an uninitialized reference; however, this would fail for the standard new-dup-invokespecial sequence, as the reference remaining on the stack would appear uninitialized when it is in fact initialized.
    • newarray

      static <AT, ET extends Types.SPrim<AT>, N1 extends Emitter.Next, N0 extends Emitter.Ent<N1, Types.TInt>> Emitter<Emitter.Ent<N1,Types.TRef<AT>>> newarray(Emitter<N0> em, ET elemType)
      Emit a newarray instruction
      Type Parameters:
      AT - the resulting array type
      ET - the (primitive) element type
      N1 - the tail of the stack (...)
      N0 - ..., count
      Parameters:
      em - the emitter
      elemType - the element type
      Returns:
      the emitter with ..., arrayref
    • nop

      static <N extends Emitter.Next> Emitter<N> nop(Emitter<N> em)
      Emit a nop instruction
      Type Parameters:
      N - the tail of the stack (...)
      Parameters:
      em - the emitter
      Returns:
      the emitter with ...
    • pop

      static <N1 extends Emitter.Next, N0 extends Emitter.Ent<N1, ? extends Types.TCat1>> Emitter<N1> pop(Emitter<N0> em)
      Emit a pop instruction
      Type Parameters:
      N1 - the tail of the stack (...)
      N0 - ..., value
      Parameters:
      em - the emitter
      Returns:
      the emitter with ...
    • pop2__11

      static <N2 extends Emitter.Next, N1 extends Emitter.Ent<N2, ? extends Types.TCat1>, N0 extends Emitter.Ent<N1, ? extends Types.TCat1>> Emitter<N2> pop2__11(Emitter<N0> em)
      Emit a pop2 instruction to pop two operands (Form 1)
      Type Parameters:
      N2 - the tail of the stack (...)
      N1 - ..., value2
      N0 - ..., value2, value1
      Parameters:
      em - the emitter
      Returns:
      the emitter with ...
    • pop2__2

      static <N1 extends Emitter.Next, N0 extends Emitter.Ent<N1, ? extends Types.TCat2>> Emitter<N1> pop2__2(Emitter<N0> em)
      Emit a pop2 instruction to pop one operand (Form 2)
      Type Parameters:
      N1 - the tail of the stack (...)
      N0 - ..., value1
      Parameters:
      em - the emitter
      Returns:
      the emitter with ...
    • putfield

      static <OT, T2 extends Types.TRef<? extends OT>, FT extends Types.BNonVoid, N2 extends Emitter.Next, N1 extends Emitter.Ent<N2, T2>, N0 extends Emitter.Ent<N1, ? extends FT>> Emitter<N2> putfield(Emitter<N0> em, Types.TRef<OT> owner, String name, FT type)
      Emit a putfield instruction
      Type Parameters:
      OT - the owner type
      T2 - the type of the object on the stack owning the field
      FT - the type of the field
      N2 - the tail of the stack (...)
      N1 - ..., objectref
      N0 - ..., objectref, value
      Parameters:
      em - the emitter
      owner - the owner type
      name - the name of the field
      type - the type of the field
      Returns:
      the emitter with ...
    • putstatic

      static <FT extends Types.BNonVoid, N1 extends Emitter.Next, N0 extends Emitter.Ent<N1, ? extends FT>> Emitter<N1> putstatic(Emitter<N0> em, Types.TRef<?> owner, String name, FT type)
      Emit a putstatic instruction
      Type Parameters:
      FT - the type of the field
      N1 - the tail of the stack (...)
      N0 - ..., value
      Parameters:
      em - the emitter
      owner - the owner type
      name - the name of the field
      type - the type of the field
      Returns:
      the emitter with ...
    • ret__deprecated

      static Emitter<?> ret__deprecated(Emitter<?> em, Local<?> local)
      DO NOT emit an ret instruction

      According to Oracle's documentation, this deprecated instruction was used in the implementation of finally blocks prior to Java SE 6. You may actually be searching for the return_(Emitter, RetReq) method. This method is here only to guide users searching for the ret opcode toward the replacement: Misc.tryCatch(Emitter, Lbl, Lbl, TRef). Syntactically, trying to use this method should result in all sorts of compilation errors, if not on the invocation itself, then on anything following it in the chain. At runtime, this always throws an UnsupportedOperationException.

      Parameters:
      em - the emitter
      local - the local variable (NOTE: returnAddress is not a supported type)
      Returns:
      never
    • return_

      static <N extends Emitter.Next> Emitter<Emitter.Dead> return_(Emitter<N> em, Methods.RetReq<Types.TVoid> retReq)
      Emit a return instruction
      Type Parameters:
      N - the tail of the stack (...)
      Parameters:
      em - the emitter
      retReq - some proof of this method's required return type
      Returns:
      the dead emitter
    • saload

      static <N2 extends Emitter.Next, N1 extends Emitter.Ent<N2, Types.TRef<short[]>>, N0 extends Emitter.Ent<N1, Types.TInt>> Emitter<Emitter.Ent<N2,Types.TInt>> saload(Emitter<N0> em)
      Emit an saload instruction
      Type Parameters:
      N2 - the tail of the stack (...)
      N1 - ..., arrayref
      N0 - ..., arrayref, index
      Parameters:
      em - the emitter
      Returns:
      the emitter with ..., value
    • sastore

      static <N3 extends Emitter.Next, N2 extends Emitter.Ent<N3, Types.TRef<short[]>>, N1 extends Emitter.Ent<N2, Types.TInt>, N0 extends Emitter.Ent<N1, Types.TInt>> Emitter<N3> sastore(Emitter<N0> em)
      Emit an sastore instruction
      Type Parameters:
      N3 - the tail of the stack (...)
      N2 - ..., arrayref
      N1 - ..., arrayref, index
      N0 - ..., arrayref, index, value
      Parameters:
      em - the emitter
      Returns:
      the emitter with ...
    • swap

      static <T2 extends Types.TCat1, T1 extends Types.TCat1, N2 extends Emitter.Next, N1 extends Emitter.Ent<N2, T2>, N0 extends Emitter.Ent<N1, T1>> Emitter<Emitter.Ent<Emitter.Ent<N2,T1>,T2>> swap(Emitter<N0> em)
      Emit a swap instruction
      Type Parameters:
      T2 - the type of value2 on the stack
      T1 - the type of value1 on the stack
      N2 - the tail of the stack (...)
      N1 - ..., value2
      N0 - ..., value2, value1
      Parameters:
      em - the emitter
      Returns:
      the emitter with ..., value1, value2
    • tableswitch

      static <N1 extends Emitter.Next, N0 extends Emitter.Ent<N1, Types.TInt>> Emitter<Emitter.Dead> tableswitch(Emitter<N0> em, int low, Lbl<N1> dflt, List<Lbl<N1>> cases)
      Emit a tableswitch instruction
      Type Parameters:
      N1 - the tail of the stack (...)
      N0 - ..., index
      Parameters:
      em - the emitter
      low - the low index
      dflt - a target label for the default case. The stack at the label must be ...
      cases - a list of target labels. The stack at each label must be ...
      Returns:
      the dead emitter