update for support of modern JDKs #113

Closed
fabrice-ducos wants to merge 26 commits from fabrice-ducos/master into master

26 Commits

Author SHA1 Message Date
Fabrice Ducos
12ef701595 src/core/org/luaj/vm2/compiler/LexState.java
Store Integers directly in RESERVED (instead of String): Integer.valueOf(FIRST_RESERVED+i) -> new Integer(FIRST_RESERVED+i)
2023-04-24 02:02:28 +02:00
Fabrice Ducos
e54b0c3d57 src/core/org/luaj/vm2/compiler/FuncState.java:
Store Integers directly in h (instead of String): this.h.put(v, Integer.valueOf(idx)) -> this.h.put(v, new Integer(idx))
2023-04-24 02:01:16 +02:00
Fabrice Ducos
91735791f0 TODO: fixed a typo 2023-04-23 15:04:55 +02:00
Fabrice Ducos
3fad817099 New file TODO 2023-04-23 15:03:15 +02:00
Fabrice Ducos
65a5088092 src/core/org/luaj/vm2/compiler/FuncState.java: reverted changed from generic HashMap to non generic Hashtable for JME portability 2023-04-23 14:40:20 +02:00
Fabrice Ducos
113c3a9b97 README.md updated 2023-04-23 14:16:41 +02:00
Fabrice Ducos
1b8d7c7485 README.md updated 2023-04-23 14:08:03 +02:00
Fabrice Ducos
f364bb0189 README.md updated 2023-04-23 13:49:16 +02:00
Fabrice Ducos
f680cce336 README.md updated 2023-04-23 13:46:38 +02:00
Fabrice Ducos
b0df2ddcb0 build.xml: default task is now "jar-jse" instead of "all" 2023-04-23 13:44:20 +02:00
Fabrice Ducos
2207f7f2e2 src/core/org/luaj/vm2/compiler/FuncState.java:
Replaced the deprecated, non generic Hashtable with generic Map (interface) and HashMap (implementation)

Hashtable h -> Map<LuaValue, Integer> h

this.h = new Hashtable() -> this.h = new HashMap<>()
2023-04-23 12:58:56 +02:00
Fabrice Ducos
8df7dd717c build-coverage.xml: javac target="1.5" -> target="1.8" 2023-04-23 12:27:47 +02:00
Fabrice Ducos
a40e6862f4 build-applet.xml:
-target 1.4 -> -target 1.8

<param name=java_version value="1.4+"/> -> <param name=java_version value="1.8+"/>
2023-04-23 12:24:58 +02:00
Fabrice Ducos
33b6428031 grammar/LuaParser.jj, grammer/Lua5[12].jj: JDK_VERSION upgraded from 1.3 to 1.8 2023-04-23 12:19:04 +02:00
Fabrice Ducos
ee08260ce2 build-applet.xml, build-midlet.xml: source and target of javac upgraded from 1.2, 1.3 or 1.4 to 1.8 2023-04-23 12:07:40 +02:00
Fabrice Ducos
393cf23775 build.xml: includeantruntime="false" added to javac
Reference: https://stackoverflow.com/questions/5103384/ant-warning-includeantruntime-was-not-set
2023-04-23 12:00:20 +02:00
Fabrice Ducos
970cfc579a .gitignore: .java-version added (a .jenv configuration file) 2023-04-23 11:58:52 +02:00
Fabrice Ducos
7aa0389f6f README.md updated 2022-06-15 07:14:27 +02:00
Fabrice Ducos
c09d652874 luaj ported to Windows with the name luaj.bat 2022-06-15 07:12:36 +02:00
Fabrice Ducos
3c863714b4 src/core/org/luaj/vm2/compiler/LexState.java: error message on unexpected symbol fixed (it was returning a strange character
corresponding to an internal token code, meaningless to the user)
2022-06-15 01:11:09 +02:00
Fabrice Ducos
bfb7da97cf luaj: new command for invoking the luaj interpreter 2022-06-15 01:09:05 +02:00
Fabrice Ducos
1aa90eb7fa src/core/org/luaj/vm2/lib/CoroutineLib.java:
Internal classes create, resume, ..., yield, wrap renamed Create, Resume, ... Yield, Wrap

This change was motivated by the fact that yield is a restricted name in JDK 14+

A lowercase 'yield' class was producing a warning in JDK 8 and could potentially not compile in newer JDK.
2022-06-14 22:40:10 +02:00
Fabrice Ducos
610833f025 build.xml: includeantruntime="false" appended to javac tasks in order to ensure repeatable builds by ant 2022-06-14 22:30:41 +02:00
Fabrice Ducos
9e1a62662a Removed deprecated wrapper class constructors (new Byte, ..., new Integer, new Double...)
Replaced with valueOf() in order to silence many warnings from modern versions of the JDK
2022-06-14 22:25:20 +02:00
Fabrice Ducos
314ffd6a23 Update README.md 2022-06-14 22:03:47 +02:00
Fabrice Ducos
7395234ccf build.xml: refactored with separate targets for jme and jse: compile-jme and compile-jse
New versions of ant (e.g. 1.10.11) at this time of writing fail to build jar-jme

because the source (1.2) and target (1.3) are considered too old.

The jme target can now be compiled separately with 'ant jar-jme'

and the jse target with 'ant jar-jse'

The jse target will now be built with source="1.8" and target="1.8"
2022-06-14 21:37:48 +02:00