Fix math.frexp() and add more tests (thanks Florob, Link Mauve, xnyhps) default tip

Add math.frexp() and tests (many thanks to Florob and Link Mauve!)

Implement basic string.format() supporting %d/%s

baselib: Implement basic message-only error()

Implement string.find (mostly) and string.sub

Replace error reporting code with calls to LVM.traceback()

Add LVM.traceback() function

OP_SETLIST: Implement support for B==0 (to top of stack)

OP_RETURN: Pad out results with nils if we get less results than expected

OP_TAILCALL: Fall through to OP_CALL for native functions

OP_VARARG: Fix off-by-one

OP_GETUPVALUE: Clone original LValue

Create local function to use as chunk prototype

Better verification of function validity in LVM.call()

Indentation fix

Change LVM.call() to take an LValue rather than the raw native/LFunction object. Also add LVM.loadstring(chunk, env) and use that for loading luac.out.

Implement OP_TAILCALL - the last opcode!

Add a whole bunch of tests I've been using for recent additions

Adjust pc down by 1 when calculating error lines, pc is always the /next/ instruction

Remove some debugging in the gmatch function

Implement OP_VARARG

OP_RETURN: Shrink stack on return

OP_CALL: Don't push varargs into called function's stack

Fix OP_CONCAT: missing break; and should supply empty separator to join()

assert(): Throw "assertion failed" message when none supplied

"Implement" OP_CLOSE

Fix OP_FORLOOP to set the loop counter variable properly

Implement LValue.len() and OP_LEN (no metamethod yet)

Switch to [] for representing tables (for now)

Don't use this.LValue() inside the VM - it's for JS types only

(0) -100 -50 -30 tip

mercurial