Yevano/JVML-JIT — pull request #45 by gamemanj (2014-11-14 16:24:53+00:00)
Title: Lua Tables

JVML seems to be missing the ability to bind a "native object" (i.e:a Lua table,a file handle,etc.) to a Java object.
This is rather crippling,as file IO calls (and a few mod peripherals) generally work around said native objects.
Hence,I've written a wrapper around Lua tables and functions.
This should also make it possible to pull the Modem peripheral wrapper,as it converts tables into wrapped LuaTable objects.
Currently,it stores handles/objects/whatever in the object's table,under the name "native_data".

The following functions are added to the global namespace:
ToJTable:Converts a lua table into a LuaTable object. This LuaTable object is directly linked to the lua table.
ToLTable:Gets the lua table from a LuaTable object.
ToJFunction:This converts a lua function into a LuaFunction object.
ToLFunction:This converts a LuaFunction object into a lua function.
Class descriptions:
NativeObject: Handles the basic operations of a native object,like redirecting toString,and making hashCode into toString().hashCode().
LuaTable: Interface to a table. Allows iterating through key/value pairs,and getting/setting keys. Can be created using new LuaTable(),which creates a new nice empty table.The global table is at Computer.getGlobalTable().
LuaFunction: Interface to a function. Can be created with new LuaFunction(code),where code is a string containing Lua code.