org.luaj.vm2
Class Prototype

java.lang.Object
  extended by org.luaj.vm2.Prototype

public class Prototype
extends java.lang.Object

Prototype representing compiled lua code.

This is both a straight translation of the corresponding C type, and the main data structure for execution of compiled lua bytecode.

See documentatation on LuaClosure for information on how to load and execute a Prototype.

See Also:
LuaClosure

Field Summary
 int[] code
           
 int is_vararg
           
 LuaValue[] k
           
 int lastlinedefined
           
 int linedefined
           
 int[] lineinfo
           
 LocVars[] locvars
           
 int maxstacksize
           
 int numparams
           
 int nups
           
 Prototype[] p
           
 LuaString source
           
 LuaString[] upvalues
           
 
Constructor Summary
Prototype()
           
 
Method Summary
 LuaString getlocalname(int number, int pc)
          Get the name of a local variable.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

k

public LuaValue[] k

code

public int[] code

p

public Prototype[] p

lineinfo

public int[] lineinfo

locvars

public LocVars[] locvars

upvalues

public LuaString[] upvalues

source

public LuaString source

nups

public int nups

linedefined

public int linedefined

lastlinedefined

public int lastlinedefined

numparams

public int numparams

is_vararg

public int is_vararg

maxstacksize

public int maxstacksize
Constructor Detail

Prototype

public Prototype()
Method Detail

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.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


Copyright © 2007-2008 Luaj.org. All Rights Reserved.