Class FPrototype

java.lang.Object
com.prineside.luaj.FPrototype

public final class FPrototype extends Object
A "baked" or fixed prototype definition, stores immutable data and everything is final for performance. Can be obtained from the regular Prototype.
  • Field Details

    • k

      public final LuaValue[] k
    • code

      public final int[] code
    • p

      public final FPrototype[] p
    • lineinfo

      public final short[] lineinfo
    • locvars

      public final LocVars[] locvars
    • upvalues

      public final Upvaldesc[] upvalues
    • source

      public final LuaString source
    • linedefined

      public final short linedefined
    • lastlinedefined

      public final short lastlinedefined
    • numparams

      public final byte numparams
    • is_vararg

      public final boolean is_vararg
    • maxstacksize

      public final byte maxstacksize
  • Constructor Details

    • FPrototype

      public FPrototype(LuaValue[] k, int[] code, FPrototype[] p, short[] lineinfo, LocVars[] locvars, Upvaldesc[] upvalues, LuaString source, short linedefined, short lastlinedefined, byte numparams, boolean is_vararg, byte maxstacksize)
  • Method Details

    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getlocalname

      public LuaString getlocalname(int number, int pc)
      Get the name of a local variable.
      Parameters:
      number - the local variable number to look up
      pc - the program counter
      Returns:
      the name, or null if not found
    • shortsource

      public String shortsource()