New implementation for Lua tables. Does not use Vector or Hashtable, instead
uses plain Java arrays directly to keep heap allocation to a minimum. Includes some unit tests that seem to indicate the basic operations are correct. However, the following things are not implemented: * Shrinking the capacity when elements are removed * Optimal storage of each element in array vs. hash when entries are added out of order. A junit test case is there for this.
This commit is contained in:
@@ -18,7 +18,12 @@ public class LValue {
|
||||
public boolean luaAsBoolean() {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
/** Return true if this value can be represented as an "int" */
|
||||
public boolean isInteger() {
|
||||
return false;
|
||||
}
|
||||
|
||||
// perform a lua call, return true if the call is to a lua function, false
|
||||
// if it ran to completion.
|
||||
public boolean luaStackCall(VM vm) {
|
||||
|
||||
Reference in New Issue
Block a user