Repository navigation
Java class library additions for ParparVM (split from #5980) - #6044
Conversation
java.util.function, java.util.stream, java.time, java.text, collections, java.util.concurrent, non-file java.io streams, java.lang members, MessageDigest/SecureRandom, charsets and UUID. Host-backed APIs (files, nio.file, prefs, logging, URL, resource bundles, service loader, modules) are left as on master. JdkHost is a narrow internal hook. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
CoreJdkHost serves the EDT waits, log, secure random, digests and locale number symbols; JavaSE and Android carry a copy of JdkHost for the core. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ibrary Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
@codex review |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Developer Guide build artifacts are available for download from this workflow run:
Developer Guide quality checks: |
|
Compared 12 screenshots: 12 matched. |
|
Compared 178 screenshots: 178 matched. Native Android coverage
✅ Native Android screenshot tests passed. Native Android coverage
Benchmark ResultsDetailed Performance Metrics
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2f94e2d35f
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
Compared 214 screenshots: 214 matched. |
- No object serialization: ObjectInput, ObjectOutput and Externalizable are back to master's empty interfaces in vm/JavaAPI and gone from Ports/CLDC11. - Concurrency reads one monotonic clock (BlockingWait.now, System.nanoTime) for every deadline and delay, so a wall-clock change cannot fire a timed wait or a scheduled task early or late. - A positive timeout under a millisecond is rounded up instead of being due immediately (BlockingWait.millis), at every timed call site. - FutureTask consumes the runner's interrupt only when cancel(true) delivered it; cancel(false) leaves the thread's status alone. - Character: the unassigned Greek code points are not letters. - CoreJdkHost finds the locale's separators between any script's decimal digits, not only ASCII ones. - Bulk checks: sub-millisecond timed get, cancel(false) interrupt status. - CI: copyright exclusions for the Harmony/OpenJDK-derived classes, the backend javadoc run no longer documents the class library's internal com.codename1.impl, CodeQL no longer resolves the JDK's SecureRandom to the device class library's copy, and the flutter-bench size overlay. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Compared 193 screenshots: 193 matched. Benchmark ResultsDetailed Performance Metrics
ParparVM vs HotSpot (JDK 25): Windows x64Runner CPU: AMD64 Family 25 Model 1 Stepping 1, AuthenticAMD (baseline Ratios are ParparVM / JDK 25: below 1.00x ParparVM is faster (time) or smaller (RAM). Median of 5 interleaved, paired rounds; every run's output was verified. A ratio more than 20% (time) / 25% (RAM) above its baseline in
Result: no regression |
Flutter vs Codename OneSame application, built both ways: Flutter's AOT compile of the gallery, and the identical Dart source transpiled to Java on Codename One. Lower is better for every metric, so a ratio above 1.00x means Codename One is ahead by that factor. android9 interleaved rounds; host load 0.76, 1.97, 1.68
Compute -- the VM workloads (
Gate: within tolerance against
javascript9 interleaved rounds; host load 2.2, 1.27, 0.54
Compute -- the VM workloads (
Gate: within tolerance against
linux9 interleaved rounds; host load 0.36, 3.15, 2.7
Compute -- the VM workloads (
Gate: OUTSIDE THE BASELINE against
macos9 interleaved rounds; host load 2.15, 9.11, 12.43
Compute -- the VM workloads (
Gate: within tolerance against
windows9 interleaved rounds
Compute -- the VM workloads (
Gate: within tolerance against
Codename One wins 23 of 23 measured metrics across 5 platform(s). |
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 00c805346b
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Cloudflare Preview
|
- Duration.dividedBy is exact past 292 years: the magnitude is divided as an unsigned 128-bit number when the nanosecond count overflows a long. - Character: the unassigned CJK compatibility code points are not letters. - Math.scalb's clamp counts all 53 (24) significand bits, so an extreme negative factor underflows to a signed zero; cbrt scales subnormals. - ScheduledPool saturates a fixed rate's next deadline and consumes only the interrupt cancel(true) delivered. - PrintWriter.checkError reports a wrapped PrintWriter's failure. - Matcher stays exhausted after a zero-width match at the region end. - Bulk checks for each, and MatcherExhaustionTest. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: cb506da229
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
Compared 193 screenshots: 193 matched. Benchmark ResultsDetailed Performance Metrics
|
✅ Continuous Quality ReportTest & Coverage
Static Analysis
Generated automatically by the PR CI workflow. |
|
Compared 193 screenshots: 193 matched. Benchmark ResultsDetailed Performance Metrics
ParparVM vs HotSpot (JDK 25): Windows arm64Runner CPU: ARMv8 (64-bit) Family 8 Model D49 Revision 0, MICROSOFT CORPORATION (baseline Ratios are ParparVM / JDK 25: below 1.00x ParparVM is faster (time) or smaller (RAM). Median of 5 interleaved, paired rounds; every run's output was verified. A ratio more than 20% (time) / 25% (RAM) above its baseline in
Result: no regression |
|
Compared 193 screenshots: 193 matched. ParparVM vs HotSpot (JDK 25): Linux x64Runner CPU: AMD EPYC 7763 64-Core Processor (baseline Ratios are ParparVM / JDK 25: below 1.00x ParparVM is faster (time) or smaller (RAM). Median of 5 interleaved, paired rounds; every run's output was verified. A ratio more than 20% (time) / 25% (RAM) above its baseline in
Result: no regression |
|
Compared 193 screenshots: 193 matched. ParparVM vs HotSpot (JDK 25): Linux arm64Runner CPU: Neoverse-N2 (baseline Ratios are ParparVM / JDK 25: below 1.00x ParparVM is faster (time) or smaller (RAM). Median of 5 interleaved, paired rounds; every run's output was verified. A ratio more than 20% (time) / 25% (RAM) above its baseline in
Result: no regression |
- tanh: Lambert continued fraction for |x| < 1 (within 1.05 ulp). - String(byte[], int, int, ...): range checked before the native reads it. - Pool: a worker thread that fails to start gives its slot back. - Character: CJK extension ranges split at their unassigned gaps. - Recalibrate the Linux flutter size row and the windows-arm64 hello RAM row. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Character.isDigit() admits non-ASCII numerals and the runtime's numeric parsers accept them, so inputs such as Duration.parse("PT١S") succeed even though ISO-8601 duration syntax and the JDK parser reject them. Check explicitly for '0' through '9' in both the whole-number and fractional scans.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
✅ ByteCodeTranslator Quality ReportTest & Coverage
Benchmark Results
Static Analysis
Generated automatically by the PR CI workflow. |
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: da29033b1e
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…is not white space Drops the windows-x64 recursion rebaseline that master's baseline fold superseded. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1f95697b7c
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…eplaced mappings Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
@codex review |
Conflicts: codeql paths-ignore keeps both entries; NavigationTest takes master's comment and keeps clearStack(); the JS LDC float literal takes master's floatLiteral and drops this branch's equivalent numericLiteral. Baselines: master's merged pr/5976.json overlays were stale against the base fold (both gates' self-tests failed on master); their from values are repaired, and this PR's rows that rebaselined the same benchmarks to the same readings are dropped. Flutter linux and javascript re-measured. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…urce - Pattern matches, repeats and backtracks by code point, so "." and a class take a whole surrogate pair, and classes hold code points above U+FFFF. - Scripts, blocks and general categories, and UNICODE_CHARACTER_CLASS ((?U)), are answered from the generated Unicode 15.0 tables in UnicodeTables rather than refused. - UUID.randomUUID throws without a secure random source instead of falling back to a clock-seeded generator. - ChoiceFormat writes an infinite limit as "<" explicitly rather than through a NaN comparison ParparVM answers differently. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…e tables Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Compared 179 screenshots: 179 matched. Benchmark Results
Detailed Performance Metrics
ParparVM vs HotSpot (JDK 25): macOS arm64Runner CPU: Apple M1 (Virtual) (baseline Ratios are ParparVM / JDK 25: below 1.00x ParparVM is faster (time) or smaller (RAM). Median of 5 interleaved, paired rounds; every run's output was verified. A ratio more than 20% (time) / 25% (RAM) above its baseline in
Result: no regression |
…r every property - A search skips the positions inside a surrogate pair when the pattern names a supplementary code point or a surrogate, as the JDK's StartS does, so a negated class no longer matches half a pair. - Two backslash-u escapes spelling a pair are one code point, and \Q...\E quotes code points, inside a class and out (Pattern.quote of an emoji matched nothing). - The JDK's binary properties and the general categories answer from UnicodeTables for all of Unicode; IsWhite_Space no longer takes U+001C-U+001F, and a case category under CASE_INSENSITIVE takes Lu, Ll and Lt as on the JDK. - Ports/CLDC11 Random: a no-break space in a comment failed an ASCII compile. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… and classes, marks in words
- A pattern with a Unicode property or a (?U) shorthand skips the
positions inside a pair, as the JDK's search does, so [^\p{L}] no
longer takes half a supplementary letter.
- A caseless back reference compares code points.
- A caseless Unicode class also tries the lower form of the upper one,
so (?iu)[a-z] takes U+0131 and U+017F as on the JDK.
- \b and \B count a non-spacing mark after a letter or digit as part of
the word, and read the lone high half before a position inside a pair.
- usePattern keeps the match and drops its groups; group(0) is null.
- \p{all}.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… its pair
- A lookbehind may repeat one character without bound, as on JDK 21
("(?<=a+)b"); a group repeated without bound or a back reference
inside one is still refused, as there.
- A quantifier repeats \R whole, so each round takes \r\n as a pair.
- Code comments on the JDK parser accidents left alone: a leading {1},
x{1}{2}, and [a&&&b].
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Compared 171 screenshots: 171 matched. |
…lded class members - An escaped supplementary character is one atom under a quantifier. - COMMENTS mode skips whitespace before the ? or + of a quantifier. - A single class member under UNICODE_CASE also stands for its folded form, so (?iu)[ı] takes "I" as on the JDK. - A possessive repeat of an empty group takes its round and sets it. - (?) is refused. - Code comments on the JDK accidents left alone: which positions inside a pair its search accepts, the inner groups of repeated empty groups, and its && grammar. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
# Conflicts: # vm/selfhost/perf-baseline/pr/5976.json
#6059 rebaselined the JavaScript and Linux gallery size rows from the same values this PR did, so those rows are dropped here to be measured again on top of it. The x64 translator override starts from the row as master now reads it, after #6059 removed the stale #5976 entry. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…he JS gallery sizes dart.core.DateTime named java.util.regex, which no ParparVM target has and nothing relocates in an ordinary application: every native Flutter build failed on a missing java_util_regex_Pattern.h. It now uses com.codename1.util.regex, as RegExp already did. The PR's flutter-bench overlay justified the JavaAPI growth that moved to #6044; its linux rows are dropped and the javascript rows recalibrated from this PR's first gallery run on top of #6044 and #6055. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…uild A reactor build that stops before packaging (mvn test over several modules, as the Java 8 CI leg runs) resolves the runtime to its target/classes directory, and the remap found no runtime jar. The directory is now read like the jar, leaving out com/codename1/impl the way the module's jar does. Also rebaselines the android and linux gallery sizes from their first run on top of #6044 and #6055. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…odename One apps (#5980) * Desktop compatibility runtimes: Swing, SwingX, JavaFX and FXML over Codename One swing-compat (java.awt, javax.swing, java.beans, javax.imageio and a SwingX subset) is authored already relocated under com.codename1.desktopcompat; javafx-compat is authored under the javafx names and relocated at build time. desktop-compat-runtime holds what both layers share, including shims for the host-backed JDK APIs a device lacks (java.io.File, java.net.URL, java.nio.file, ResourceBundle, java.util.logging, java.util.prefs). fxml-compiler turns FXML and JavaFX CSS into code and tables at build time. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Build: one relocation pass for the Android, Swing and JavaFX layers ClassRelocator applies every active layer in one pass; CompatRewrites redirects the JDK members a device cannot have; the compliance check reports unsupported desktop API under its original name. remap-compat and import-desktop-project in Maven and Gradle, with the archetype wiring. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Desktop compatibility: samples, integration tests, CI and documentation Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Read .properties bundles as UTF-8 first; never report AutoCloseable as Closeable A stream bundle is UTF-8 when its bytes are well-formed UTF-8 and ISO-8859-1 otherwise, as the JDK has read them since Java 9. The compliance report no longer reverses a shim whose target is itself a JDK class. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Fix CI: drop tests of the abandoned design, keep master's Android desugaring, doc snippet roles The four core-unittests and AndroidDesugaringDependencyTest covered the core JDK host and the nio desugaring this PR no longer has. The nio desugar_jdk_libs variant clashed with the Flutter Android build (DartList.reversed), so AndroidGradleBuilder is master's again. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Flutter: DateTime.parse on the framework's regex engine; rebaseline the JS gallery sizes dart.core.DateTime named java.util.regex, which no ParparVM target has and nothing relocates in an ordinary application: every native Flutter build failed on a missing java_util_regex_Pattern.h. It now uses com.codename1.util.regex, as RegExp already did. The PR's flutter-bench overlay justified the JavaAPI growth that moved to #6044; its linux rows are dropped and the javascript rows recalibrated from this PR's first gallery run on top of #6044 and #6055. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Flutter: DartList.reversed() clashes with Android's List.reversed() Android API 35 gives java.util.List a reversed() answering a List, and every Flutter plugin class extending DartList (dio's Interceptors) failed to compile in the generated Android project. Dart's reversed getter is now dartReversed() in Java; the transpiler emits that name. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Extract the desktop runtime from its classes directory in a reactor build A reactor build that stops before packaging (mvn test over several modules, as the Java 8 CI leg runs) resolves the runtime to its target/classes directory, and the remap found no runtime jar. The directory is now read like the jar, leaving out com/codename1/impl the way the module's jar does. Also rebaselines the android and linux gallery sizes from their first run on top of #6044 and #6055. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Mark the fallback open dialog's identity comparison for PMD Command.equals compares names, so the cancel and accept buttons must be told apart by identity; master's #6052 tripped the forbidden-PMD gate. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * ParparVM GC: never name a thread that may have exited A collection that cannot stop a thread records a root miss and skips the sweep, then names each missed thread with pthread_getname_np. The thread it could not stop is usually one that is exiting: markDeadThread deregisters it and the pthread ends, so the recorded handle can name a thread that no longer exists, and glibc reads its freed descriptor. The bulk conformance run, whose pool checks start and retire many threads, crashed with SIGSEGV in this diagnostic right after the skip line (vm-tests, StringBuilderGrowthApp, exit 139). The name is now read only for a handle still registered in allThreads, under the critical section markDeadThread takes, and blocked threads are released before that lock is taken. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Split out of #5980 so the class library can be reviewed and merged on its own. The desktop compatibility layer will rebase onto this.
What is in it
vm/JavaAPI, mirrored as compile stubs inPorts/CLDC11:java.util.function,java.util.stream,java.time(temporal, chrono, format),java.text, collections,java.util.concurrent, non-filejava.iostreams, readers and writers,java.langadditions,MessageDigest/SecureRandom,java.nio.charset,UUID.com.codename1.impl.JdkHost, installed by the ParparVM ports, offering only what those classes cannot do alone. Each member is justified in the class comment:invokeAndBlockStringregex members are rewritten in every build, on every target, tocom.codename1.util.regex.StringRegex. That coversmatches, bothsplitoverloads,replaceAllandreplaceFirst, called directly or through a method reference. There is now one engine everywhere. Previouslymatcheswas not rewritten at all, and the old fallback engine silently treated a bad pattern as literal text. The rule is unconditional by design; see the comment onBytecodeCompliance.createInvocationRewriteRules, which is guarded by tests.theStringRegexRewriteIsUnconditionalandeveryRegexMemberOfStringIsRewritten.matches/splitcases in hellocodenameone'sStringApiTest.Deliberately not in it
ServiceLoader.java.nio.file,java.util.prefs,java.util.logging,URLandResourceBundleare unchanged from master. They will follow as declarations plus build-time rewrites onto Codename One APIs (FileSystemStorage,Preferences,Log), so each behaves the same on every target.Verified locally
BulkConformanceIntegrationTest,JavascriptRuntimeSemanticsTest,CldcJavaApiParityTestandBytecodeComplianceTestpass.@authorand@sincegates pass.🤖 Generated with Claude Code