# Lua (Luaj API)
Date: 2015-04-29

## org.luaj.vm2
Class Lua

    java.lang.Object
      org.luaj.vm2.Lua

Direct Known Subclasses:
  Print

    public class Lua

extends java.lang.Object

Constants for lua limits and opcodes.

This is a direct translation of C lua distribution header file constants for bytecode creation and processing.

Field Summary
`static java.lang.String` `_VERSION` version is supplied by ant build task
`static int` `BITRK` this bit 1 means constant (0 means register)
`static int` `iABC`
`static int` `iABx`
`static int` `iAsBx`
`static int` `iAx`
`static int` `LFIELDS_PER_FLUSH`
`static int` `LUA_MULTRET` use return values from previous op
`static int[]` `luaP_opmodes`
`static int` `MASK_A`
`static int` `MASK_B`
`static int` `MASK_Bx`
`static int` `MASK_C`
`static int` `MASK_NOT_A`
`static int` `MASK_NOT_B`
`static int` `MASK_NOT_Bx`
`static int` `MASK_NOT_C`
`static int` `MASK_NOT_OP`
`static int` `MASK_OP`
`static int` `MAX_OP`
`static int` `MAXARG_A`
`static int` `MAXARG_Ax`
`static int` `MAXARG_B`
`static int` `MAXARG_Bx`
`static int` `MAXARG_C`
`static int` `MAXARG_sBx`
`static int` `MAXINDEXRK`
`static int` `NO_REG` invalid register that fits in 8 bits
`static int` `NUM_OPCODES`
`static int` `OP_ADD`
`static int` `OP_AND`
`static int` `OP_CALL`
`static int` `OP_CLOSURE`
`static int` `OP_CONCAT`
`static int` `OP_DIV`
`static int` `OP_EQ`
`static int` `OP_EXTRAARG`
`static int` `OP_FORLOOP`
`static int` `OP_FORPREP`
`static int` `OP_GE`
`static int` `OP_GETTABLE`
`static int` `OP_GETTABUP`
`static int` `OP_GETUPVAL`
`static int` `OP_GT`
`static int` `OP_JMP`
`static int` `OP_LE`
`static int` `OP_LEN`
`static int` `OP_LOADBOOL`
`static int` `OP_LOADK`
`static int` `OP_LOADKX`
`static int` `OP_LOADNIL`
`static int` `OP_LT`
`static int` `OP_MOD`
`static int` `OP_MOVE`
`static int` `OP_MUL`
`static int` `OP_NEQ`
`static int` `OP_NEWTABLE`
`static int` `OP_NOT`
`static int` `OP_OR`
`static int` `OP_POW`
`static int` `OP_RETURN`
`static int` `OP_SELF`
`static int` `OP_SETLIST`
`static int` `OP_SETTABLE`
`static int` `OP_SETTABUP`
`static int` `OP_SETUPVAL`
`static int` `OP_SUB`
`static int` `OP_TAILCALL`
`static int` `OP_TEST`
`static int` `OP_TESTSET`
`static int` `OP_TFORCALL`
`static int` `OP_TFORLOOP`
`static int` `OP_UNM`
`static int` `OP_VARARG`
`static int` `OpArgK`
`static int` `OpArgN`
`static int` `OpArgR`
`static int` `OpArgU`
`static int` `POS_A`
`static int` `POS_Ax`
`static int` `POS_B`
`static int` `POS_Bx`
`static int` `POS_C`
`static int` `POS_OP`
`static int` `SIZE_A`
`static int` `SIZE_Ax`
`static int` `SIZE_B`
`static int` `SIZE_Bx`
`static int` `SIZE_C`
`static int` `SIZE_OP`

Constructor Summary
`Lua()`

Method Summary
`static java.lang.String` `chunkid(java.lang.String source)`
`static int` `GET_OPCODE(int i)`
`static int` `GETARG_A(int i)`
`static int` `GETARG_Ax(int i)`
`static int` `GETARG_B(int i)`
`static int` `GETARG_Bx(int i)`
`static int` `GETARG_C(int i)`
`static int` `GETARG_sBx(int i)`
`static int` `getBMode(int m)`
`static int` `getCMode(int m)`
`static int` `getOpMode(int m)`
`static int` `INDEXK(int r)` gets the index of the constant
`static boolean` `ISK(int x)` test whether value is a constant
`static int` `RKASK(int x)` code a constant index as a RK value
`static boolean` `testAMode(int m)`
`static boolean` `testTMode(int m)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### _VERSION

    public static final java.lang.String _VERSION

  version is supplied by ant build task

  See Also:
    Constant Field Values

### LUA_MULTRET

    public static final int LUA_MULTRET

  use return values from previous op

  See Also:
    Constant Field Values

### iABC

    public static final int iABC

See Also:
  Constant Field Values

### iABx

    public static final int iABx

See Also:
  Constant Field Values

### iAsBx

    public static final int iAsBx

See Also:
  Constant Field Values

### iAx

    public static final int iAx

See Also:
  Constant Field Values

### SIZE_C

    public static final int SIZE_C

See Also:
  Constant Field Values

### SIZE_B

    public static final int SIZE_B

See Also:
  Constant Field Values

### SIZE_Bx

    public static final int SIZE_Bx

See Also:
  Constant Field Values

### SIZE_A

    public static final int SIZE_A

See Also:
  Constant Field Values

### SIZE_Ax

    public static final int SIZE_Ax

See Also:
  Constant Field Values

### SIZE_OP

    public static final int SIZE_OP

See Also:
  Constant Field Values

### POS_OP

    public static final int POS_OP

See Also:
  Constant Field Values

### POS_A

    public static final int POS_A

See Also:
  Constant Field Values

### POS_C

    public static final int POS_C

See Also:
  Constant Field Values

### POS_B

    public static final int POS_B

See Also:
  Constant Field Values

### POS_Bx

    public static final int POS_Bx

See Also:
  Constant Field Values

### POS_Ax

    public static final int POS_Ax

See Also:
  Constant Field Values

### MAX_OP

    public static final int MAX_OP

See Also:
  Constant Field Values

### MAXARG_A

    public static final int MAXARG_A

See Also:
  Constant Field Values

### MAXARG_B

    public static final int MAXARG_B

See Also:
  Constant Field Values

### MAXARG_C

    public static final int MAXARG_C

See Also:
  Constant Field Values

### MAXARG_Bx

    public static final int MAXARG_Bx

See Also:
  Constant Field Values

### MAXARG_sBx

    public static final int MAXARG_sBx

See Also:
  Constant Field Values

### MAXARG_Ax

    public static final int MAXARG_Ax

See Also:
  Constant Field Values

### MASK_OP

    public static final int MASK_OP

See Also:
  Constant Field Values

### MASK_A

    public static final int MASK_A

See Also:
  Constant Field Values

### MASK_B

    public static final int MASK_B

See Also:
  Constant Field Values

### MASK_C

    public static final int MASK_C

See Also:
  Constant Field Values

### MASK_Bx

    public static final int MASK_Bx

See Also:
  Constant Field Values

### MASK_NOT_OP

    public static final int MASK_NOT_OP

See Also:
  Constant Field Values

### MASK_NOT_A

    public static final int MASK_NOT_A

See Also:
  Constant Field Values

### MASK_NOT_B

    public static final int MASK_NOT_B

See Also:
  Constant Field Values

### MASK_NOT_C

    public static final int MASK_NOT_C

See Also:
  Constant Field Values

### MASK_NOT_Bx

    public static final int MASK_NOT_Bx

See Also:
  Constant Field Values

### BITRK

    public static final int BITRK

  this bit 1 means constant (0 means register)

  See Also:
    Constant Field Values

### MAXINDEXRK

    public static final int MAXINDEXRK

See Also:
  Constant Field Values

### NO_REG

    public static final int NO_REG

  invalid register that fits in 8 bits

  See Also:
    Constant Field Values

### OP_MOVE

    public static final int OP_MOVE

See Also:
  Constant Field Values

### OP_LOADK

    public static final int OP_LOADK

See Also:
  Constant Field Values

### OP_LOADKX

    public static final int OP_LOADKX

See Also:
  Constant Field Values

### OP_LOADBOOL

    public static final int OP_LOADBOOL

See Also:
  Constant Field Values

### OP_LOADNIL

    public static final int OP_LOADNIL

See Also:
  Constant Field Values

### OP_GETUPVAL

    public static final int OP_GETUPVAL

See Also:
  Constant Field Values

### OP_GETTABUP

    public static final int OP_GETTABUP

See Also:
  Constant Field Values

### OP_GETTABLE

    public static final int OP_GETTABLE

See Also:
  Constant Field Values

### OP_SETTABUP

    public static final int OP_SETTABUP

See Also:
  Constant Field Values

### OP_SETUPVAL

    public static final int OP_SETUPVAL

See Also:
  Constant Field Values

### OP_SETTABLE

    public static final int OP_SETTABLE

See Also:
  Constant Field Values

### OP_NEWTABLE

    public static final int OP_NEWTABLE

See Also:
  Constant Field Values

### OP_SELF

    public static final int OP_SELF

See Also:
  Constant Field Values

### OP_ADD

    public static final int OP_ADD

See Also:
  Constant Field Values

### OP_SUB

    public static final int OP_SUB

See Also:
  Constant Field Values

### OP_MUL

    public static final int OP_MUL

See Also:
  Constant Field Values

### OP_DIV

    public static final int OP_DIV

See Also:
  Constant Field Values

### OP_MOD

    public static final int OP_MOD

See Also:
  Constant Field Values

### OP_POW

    public static final int OP_POW

See Also:
  Constant Field Values

### OP_UNM

    public static final int OP_UNM

See Also:
  Constant Field Values

### OP_NOT

    public static final int OP_NOT

See Also:
  Constant Field Values

### OP_LEN

    public static final int OP_LEN

See Also:
  Constant Field Values

### OP_CONCAT

    public static final int OP_CONCAT

See Also:
  Constant Field Values

### OP_JMP

    public static final int OP_JMP

See Also:
  Constant Field Values

### OP_EQ

    public static final int OP_EQ

See Also:
  Constant Field Values

### OP_LT

    public static final int OP_LT

See Also:
  Constant Field Values

### OP_LE

    public static final int OP_LE

See Also:
  Constant Field Values

### OP_TEST

    public static final int OP_TEST

See Also:
  Constant Field Values

### OP_TESTSET

    public static final int OP_TESTSET

See Also:
  Constant Field Values

### OP_CALL

    public static final int OP_CALL

See Also:
  Constant Field Values

### OP_TAILCALL

    public static final int OP_TAILCALL

See Also:
  Constant Field Values

### OP_RETURN

    public static final int OP_RETURN

See Also:
  Constant Field Values

### OP_FORLOOP

    public static final int OP_FORLOOP

See Also:
  Constant Field Values

### OP_FORPREP

    public static final int OP_FORPREP

See Also:
  Constant Field Values

### OP_TFORCALL

    public static final int OP_TFORCALL

See Also:
  Constant Field Values

### OP_TFORLOOP

    public static final int OP_TFORLOOP

See Also:
  Constant Field Values

### OP_SETLIST

    public static final int OP_SETLIST

See Also:
  Constant Field Values

### OP_CLOSURE

    public static final int OP_CLOSURE

See Also:
  Constant Field Values

### OP_VARARG

    public static final int OP_VARARG

See Also:
  Constant Field Values

### OP_EXTRAARG

    public static final int OP_EXTRAARG

See Also:
  Constant Field Values

### NUM_OPCODES

    public static final int NUM_OPCODES

See Also:
  Constant Field Values

### OP_GT

    public static final int OP_GT

See Also:
  Constant Field Values

### OP_GE

    public static final int OP_GE

See Also:
  Constant Field Values

### OP_NEQ

    public static final int OP_NEQ

See Also:
  Constant Field Values

### OP_AND

    public static final int OP_AND

See Also:
  Constant Field Values

### OP_OR

    public static final int OP_OR

See Also:
  Constant Field Values

### OpArgN

    public static final int OpArgN

See Also:
  Constant Field Values

### OpArgU

    public static final int OpArgU

See Also:
  Constant Field Values

### OpArgR

    public static final int OpArgR

See Also:
  Constant Field Values

### OpArgK

    public static final int OpArgK

See Also:
  Constant Field Values

### luaP_opmodes

    public static final int[] luaP_opmodes

### LFIELDS_PER_FLUSH

    public static final int LFIELDS_PER_FLUSH

See Also:
  Constant Field Values

Constructor Detail

### Lua

    public Lua()

Method Detail

### GET_OPCODE

    public static int GET_OPCODE(int i)

### GETARG_A

    public static int GETARG_A(int i)

### GETARG_Ax

    public static int GETARG_Ax(int i)

### GETARG_B

    public static int GETARG_B(int i)

### GETARG_C

    public static int GETARG_C(int i)

### GETARG_Bx

    public static int GETARG_Bx(int i)

### GETARG_sBx

    public static int GETARG_sBx(int i)

### ISK

    public static boolean ISK(int x)

  test whether value is a constant

### INDEXK

    public static int INDEXK(int r)

  gets the index of the constant

### RKASK

    public static int RKASK(int x)

  code a constant index as a RK value

### getOpMode

    public static int getOpMode(int m)

### getBMode

    public static int getBMode(int m)

### getCMode

    public static int getCMode(int m)

### testAMode

    public static boolean testAMode(int m)

### testTMode

    public static boolean testTMode(int m)

### chunkid

    public static java.lang.String chunkid(java.lang.String source)

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