Fix bytecode generator following Buffer api change.

This commit is contained in:
James Roseborough
2010-07-29 05:07:08 +00:00
parent a5d7889d27
commit e3d1330763
4 changed files with 32 additions and 33 deletions

View File

@@ -67,6 +67,7 @@ at improving on the 1.0 vm in the following aspects.
<li>Improved class and package naming conventions.
<li>Improved unit tests of core classes.
<li>Improved quality due to major redesign and rewrite of core elements.
<li>Improved weak table support, including weak keys.
</ul>
<h1>2 - <a name="2">Simple Examples</a></h1>
@@ -193,6 +194,31 @@ An ant script to build and run the midlet is in
<p>
You must install the wireless toolkit and define <em>WTK_HOME</em> for this script to work.
<h2>Run a script using JSR-233 Dynamic Scripting</h2>
<p>
The standard use of JSR-233 scripting engines may be used:
<pre>
ScriptEngineManager mgr = new ScriptEngineManager();
ScriptEngine e = mgr.getEngineByExtension(".lua");
e.put("x", 25);
e.eval("y = math.sqrt(x)");
System.out.println( "y="+e.get("y") );
</pre>
<p>
All standard aspects of script engines including compiled statements should be supported.
<p>
You must include the library <b>lib/luaj-jse-2.0.jar</b> in your class path.
<p>
A working example may be found in
<pre>
examples/jse/ScriptEngineSample.java
</pre>
<h2>Excluding the lua bytecode compiler</h2>
By default, the compiler is included whenever <em>standardGlobals()</em> or <em>debugGlobals()</em> are called.
@@ -239,31 +265,6 @@ lua source or lua binary files.
<p>
The <em>bcel</em> library must be on the class path for this to work.
<h2>Run a script using JSR-233 Dynamic Scripting</h2>
<p>
The standard use of JSR-233 scripting engines may be used:
<pre>
ScriptEngineManager mgr = new ScriptEngineManager();
ScriptEngine e = mgr.getEngineByExtension(".lua");
e.put("x", 25);
e.eval("y = math.sqrt(x)");
System.out.println( "y="+e.get("y") );
</pre>
<p>
All standard aspects of script engines including compiled statements should be supported.
<p>
You must include the library <b>lib/luaj-jse-2.0.jar</b> in your class path.
<p>
A working example may be found in
<pre>
examples/jse/ScriptEngineSample.java
</pre>
<h1>3 - <a name="3">Concepts</a></h1>
<h2>Globals</h2>
@@ -446,9 +447,7 @@ and LuaForge:
<h2>Main Changes by Version</h2>
<table cellspacing="10"><tr><td><table cellspacing="4">
<tr valign="top"><td>&nbsp;&nbsp;<b>2.0</b></td><td><ul>
<li>Core vm and core libraries completed.
<li>lua2java source-to-source compiler produces working files for all unit tests.
<li>luajc bytecode-to-bytecode compiler produces working files for all unit tests.
<li>Initial release of 2.0 version
</ul></td></tr>
</table>
@@ -456,8 +455,9 @@ and LuaForge:
<ul>
<li>debug code may not be completely removed by some obfuscators
<li>tail calls are not tracked in debug information
<li>using both version 1 and 2 libraries together in the same java vm has not been tested.
<li>using both version 1 and 2 libraries together in the same java vm has not been tested
<li>module() and setfenv() only partially supported for lau2java or luajc compiled lua
<li>luajc may infer incorrect upvalue boundaries
<li>luajc can produce invalid class files in some cases
<li>values associated with weak keys may linger longer than expected
</ul>