Skip to content

Backend: close the gaps found porting BuildCloud (#6153) - #6158

Merged
shai-almog merged 25 commits into
masterfrom
backend-gaps-6153
Nov 4, 2026
Merged

shai-almog merged 25 commits into
masterfrom
backend-gaps-6153

Conversation

@shai-almog

Copy link
Copy Markdown
Collaborator

Closes #6153: the backend gaps found while porting BuildCloud.

  • Logging: com.codename1.backend.log -- Logger with {} placeholders, per-logger logging.level.*, a per-thread MDC cleared before each request.
  • Regex: backend-package relocates java.util.regex and String's regex members onto com.codename1.util.regex.
  • Typed JSON: Json.read(String, Class), readList, convert and Json.write(dto), through codecs the build generates for every class literal passed to them (bytecode scan) and installs at startup.
  • ORM: @Column(insertable/updatable) and @Lob; new CrudRepository methods and default repository methods.
  • Web: produces/consumes (415/406, a wildcard Content-Type is refused), @CrossOrigin, ResponseStatusException(int).
  • Class library: Semaphore, ConcurrentLinkedQueue, Flow, YearMonth, TemporalAdjusters, BigDecimal, InetAddress (literals and localhost).
  • XML: streaming pull parser (no DOCTYPE processing, so no XXE or entity expansion), element tree, XML property lists; ImageInfo for PNG/JPEG/GIF/WebP headers. Binary plists are refused.
  • HTTP/2 on the JVM: a client that requires HTTP/2 goes through java.net.http (reflectively, Java 11+ at run time), refuses an HTTP/1.1 answer, and bounds the body by size and time. Streamed exchanges stay HTTP/1.1.
  • Security: {sha256} encoder for legacy recovery codes, remember-me devices (user_agent, ip_address; schema version 12), configurable security table names with indexes named after them.

Reviewed adversarially in three rounds; the fixes it produced are in the last three commits.

Not covered: the security schema changes were tested on SQLite only.

🤖 Generated with Claude Code

shai-almog and others added 13 commits November 1, 2026 20:59
…es/consumes, @crossorigin

Part of #6153: @column(insertable/updatable), @lob accepted on string and
byte fields, CrudRepository delete/deleteAll/saveAll/findAllById/flush and
default methods in repository interfaces, consumes/produces on the mapping
annotations (415/406), a per-route @crossorigin policy that replaces the
global one for its route, and ResponseStatusException(int).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…djusters, BigDecimal, InetAddress (#6153)

Item 5 of #6153: classes the backend needed that the ParparVM class
library lacked. BigDecimal keeps its unscaled value as decimal digits,
since there is no java.math.BigInteger here. InetAddress resolves
address literals only; the backend's getaddrinfo lives in its own TCP
natives, so other host names throw UnknownHostException. LocalDate
gains with(TemporalAdjuster) and implements TemporalAdjuster.

JdkGapChecks holds all of them to HotSpot in the bulk conformance run.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… the shared engine

checkBackend now moves java.util.regex onto com.codename1.util.regex (the
java/util/regex rows of Relocation.JDK_SHIMS) and rewrites String's regex
members to StringRegex (the String rows of the client's rewrite rules), and
the regex package (all but REDebugCompiler) is @SharedWithBackend so it
ships in codenameone-backend. Issue #6153 item 2.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…generated codecs

The build finds the class literals the application hands to the typed Json
methods, writes a codec for each, and the entry point installs a generated
registry over them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…er reader (#6153 items 6, 7)

com.codename1.backend.xml: XmlPullParser (XXE-safe by construction: DOCTYPE
skipped, only predefined and numeric entities, nesting capped), XmlElement,
PropertyLists (XML plists and the plist inside a signed provisioning profile).
com.codename1.backend.ImageInfo: PNG/JPEG/GIF/WebP format and dimensions from
the header, JPEG walked segment by segment to its SOFn.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…onfigurable table names

Recovery codes are verified through a DelegatingPasswordEncoder: new codes
are {pbkdf2-sha256}, imported {sha256} hex hashes verify in constant time,
and unprefixed hashes stay PBKDF2. Remember-me tokens record user agent and
client address (schema version 12), and repositories list a user's tokens
and revoke one by owner. Every cn1_* table name can be configured through
cn1.security.table.<name> or cn1.security.table-prefix, validated as a
safe SQL identifier.

Refs #6153 (item 9)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…chema to version 12

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…MDC reset, plist dates, registry codecs

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@shai-almog

shai-almog commented Nov 2, 2026 •

Copy link
Copy Markdown
Collaborator Author

Compared 195 screenshots: 195 matched.

Native Android coverage

  • 📊 Line coverage: 19.19% (56041/292047 lines covered) [HTML preview] (artifact android-coverage-report, jacocoAndroidReport/html/index.html)
    • Other counters: instruction 18.15% (270036/1488151), branch 12.40% (19638/158314), complexity 10.37% (15815/152567), method 15.72% (11380/72383), class 27.89% (2236/8017)
    • Lowest covered classes
      • kotlin.collections.unsigned.kotlin.collections.unsigned.UArraysKt___UArraysKt – 0.00% (0/2396 lines covered)
      • org.jacoco.agent.rt.internal_0e20598.asm.org.jacoco.agent.rt.internal_0e20598.asm.ClassReader – 0.00% (0/1524 lines covered)
      • androidx.compose.runtime.androidx.compose.runtime.LinkComposer – 0.00% (0/1430 lines covered)
      • org.jacoco.agent.rt.internal_0e20598.asm.org.jacoco.agent.rt.internal_0e20598.asm.MethodWriter – 0.00% (0/922 lines covered)
      • kotlinx.coroutines.channels.kotlinx.coroutines.channels.BufferedChannel – 0.00% (0/863 lines covered)
      • kotlin.sequences.kotlin.sequences.SequencesKt___SequencesKt – 0.00% (0/744 lines covered)
      • com.google.common.cache.com.google.common.cache.LocalCache$Segment – 0.00% (0/726 lines covered)
      • okio.okio.Buffer – 0.00% (0/687 lines covered)
      • kotlin.text.kotlin.text.StringsKt___StringsKt – 0.00% (0/630 lines covered)
      • com.codename1.androidcompat.rt.com.codename1.androidcompat.rt.TextXmlPullParser – 0.00% (0/623 lines covered)

✅ Native Android screenshot tests passed.

Native Android coverage

  • 📊 Line coverage: 19.19% (56041/292047 lines covered) [HTML preview] (artifact android-coverage-report, jacocoAndroidReport/html/index.html)
    • Other counters: instruction 18.15% (270036/1488151), branch 12.40% (19638/158314), complexity 10.37% (15815/152567), method 15.72% (11380/72383), class 27.89% (2236/8017)
    • Lowest covered classes
      • kotlin.collections.unsigned.kotlin.collections.unsigned.UArraysKt___UArraysKt – 0.00% (0/2396 lines covered)
      • org.jacoco.agent.rt.internal_0e20598.asm.org.jacoco.agent.rt.internal_0e20598.asm.ClassReader – 0.00% (0/1524 lines covered)
      • androidx.compose.runtime.androidx.compose.runtime.LinkComposer – 0.00% (0/1430 lines covered)
      • org.jacoco.agent.rt.internal_0e20598.asm.org.jacoco.agent.rt.internal_0e20598.asm.MethodWriter – 0.00% (0/922 lines covered)
      • kotlinx.coroutines.channels.kotlinx.coroutines.channels.BufferedChannel – 0.00% (0/863 lines covered)
      • kotlin.sequences.kotlin.sequences.SequencesKt___SequencesKt – 0.00% (0/744 lines covered)
      • com.google.common.cache.com.google.common.cache.LocalCache$Segment – 0.00% (0/726 lines covered)
      • okio.okio.Buffer – 0.00% (0/687 lines covered)
      • kotlin.text.kotlin.text.StringsKt___StringsKt – 0.00% (0/630 lines covered)
      • com.codename1.androidcompat.rt.com.codename1.androidcompat.rt.TextXmlPullParser – 0.00% (0/623 lines covered)

Benchmark Results

Detailed Performance Metrics

Metric Duration
SIMD kernel backend scalar fallback (no native SIMD)
SIMD int-add (64K x300) java 201ms / native 73ms = 2.7x speedup
SIMD float-mul (64K x300) java 109ms / native 70ms = 1.5x speedup
SIMD kernel correctness PASS (native result == scalar reference)
Base64 payload size 8192 bytes
Base64 benchmark iterations 6000
Base64 SIMD byte path gated to scalar (CPU autovectorizes scalar; explicit SIMD not beneficial here)
Base64 CN1 encode 80.000 ms
Base64 CN1 decode 86.000 ms
Base64 native encode 478.000 ms
Base64 encode ratio (CN1/native) 0.167x (83.3% faster)
Base64 native decode 307.000 ms
Base64 decode ratio (CN1/native) 0.280x (72.0% faster)
Image encode benchmark status skipped (SIMD unsupported)

@github-actions

github-actions Bot commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

Cloudflare Preview

@shai-almog

shai-almog commented Nov 2, 2026 •

Copy link
Copy Markdown
Collaborator Author

Compared 231 screenshots: 231 matched.
✅ JavaScript-port screenshot tests passed.

@github-actions

github-actions Bot commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

✅ Continuous Quality Report

Test & Coverage

Static Analysis

  • SpotBugs [Report archive]
    • ✅ ByteCodeTranslator: 0 findings (no issues)
    • ✅ android: 0 findings (no issues)
    • ✅ android-compat: 0 findings (no issues)
    • ✅ android-res-compiler: 0 findings (no issues)
    • ✅ backend: 0 findings (no issues)
    • ✅ backend-test: 0 findings (no issues)
    • ✅ build-engine: 0 findings (no issues)
    • ✅ build-hint-catalog: 0 findings (no issues)
    • ✅ build-hint-tools: 0 findings (no issues)
    • ✅ codenameone-gradle-plugin: 0 findings (no issues)
    • ✅ codenameone-maven-plugin: 0 findings (no issues)
    • ✅ compose-compat: 0 findings (no issues)
    • ✅ core-unittests: 0 findings (no issues)
    • ✅ desktop-compat-runtime: 0 findings (no issues)
    • ✅ fxml-compiler: 0 findings (no issues)
    • ✅ ios: 0 findings (no issues)
    • ✅ javac: 0 findings (no issues)
    • ✅ javafx-compat: 0 findings (no issues)
    • ✅ project-model: 0 findings (no issues)
    • ✅ swing-compat: 0 findings (no issues)
  • ✅ PMD: 0 findings (no issues) [Report archive]
  • ✅ Checkstyle: 0 findings (no issues) [Report archive]

Generated automatically by the PR CI workflow.

@shai-almog

shai-almog commented Nov 2, 2026 •

Copy link
Copy Markdown
Collaborator Author

Compared 210 screenshots: 210 matched.
Native Windows port (x64 / Intel-AMD): full hellocodenameone screenshot suite rendered offscreen with Direct2D/DirectWrite, plus the real benchmarks (base64 native/CN1/SIMD, image createMask/applyMask/modifyAlpha/PNG/JPEG, SSE2 SIMD kernels). Compared against the in-repo baseline in scripts/windows/screenshots.

Benchmark Results

Detailed Performance Metrics

Metric Duration
SIMD kernel backend SSE2 (x64) / NEON (arm64) native kernels
SIMD int-add (64K x300) java 56ms / native 3ms = 18.6x speedup
SIMD float-mul (64K x300) java 57ms / native 4ms = 14.2x speedup
SIMD kernel correctness PASS (native result == scalar reference)
Base64 native bridge unavailable (CN1 + SIMD + image benchmarks only)
Base64 payload size 8192 bytes
Base64 benchmark iterations 6000
Base64 SIMD byte path gated to scalar (CPU autovectorizes scalar; explicit SIMD not beneficial here)
Base64 CN1 encode 78.000 ms
Base64 CN1 decode 95.000 ms
Base64 SIMD encode 118.000 ms
Base64 encode ratio (SIMD/CN1) 1.513x (51.3% slower)
Base64 SIMD decode 98.000 ms
Base64 decode ratio (SIMD/CN1) 1.032x (3.2% slower)
Image encode benchmark iterations 100
Image createMask (SIMD off) 9.000 ms
Image createMask (SIMD on) 3.000 ms
Image createMask ratio (SIMD on/off) 0.333x (66.7% faster)
Image applyMask (SIMD off) 44.000 ms
Image applyMask (SIMD on) 51.000 ms
Image applyMask ratio (SIMD on/off) 1.159x (15.9% slower)
Image modifyAlpha (SIMD off) 55.000 ms
Image modifyAlpha (SIMD on) 21.000 ms
Image modifyAlpha ratio (SIMD on/off) 0.382x (61.8% faster)
Image modifyAlpha removeColor (SIMD off) 35.000 ms
Image modifyAlpha removeColor (SIMD on) 22.000 ms
Image modifyAlpha removeColor ratio (SIMD on/off) 0.629x (37.1% faster)

ParparVM vs HotSpot (JDK 25): Windows x64

Runner CPU: AMD64 Family 25 Model 17 Stepping 1, AuthenticAMD (baseline windows-x64@amd64-family-25-model-17-authenticamd)

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 vm/selfhost/perf-baseline/ is a regression and fails; one that far below is an improvement, reported but not failed (a row whose calibration runs were noisier carries a wider tolerance), and for RAM the change must also exceed 0.05x in absolute terms. Both run unpinned on all of the runner's CPUs, with their own default thread counts.

Benchmark Cores Time RAM Status
hello (WinHelloMain) 4 1.38x (base 1.38x, +0.6%) 0.68x (base 0.82x, -17.0%) ok
translator (self) 4 0.78x (base 0.89x, -11.9%) 0.52x (base 0.55x, -6.2%) ok
intArithmetic 4 1.10x (base 1.10x, +0.4%) 0.06x (base 0.06x, +7.8%) ok
longArithmetic 4 1.08x (base 1.08x, -0.0%) 0.06x (base 0.06x, +1.6%) ok
mathTranscendental 4 0.83x (base 0.85x, -2.3%) 0.06x (base 0.06x, +4.8%) ok
arraySequential 4 1.67x (base 1.72x, -2.8%) 0.39x (base 0.38x, +0.8%) ok
arrayRandom 4 1.02x (base 1.01x, +0.1%) 0.23x (base 0.23x, +1.0%) ok
objectAllocation 4 1.24x (base 1.25x, -1.2%) 0.29x (base 0.29x, -2.6%) ok
valueEscape 4 0.10x (base 0.10x, -1.6%) 0.05x (base 0.04x, +2.4%) ok
hashMapChurn 4 1.77x (base 1.39x, +27.1%) 0.10x (base 0.10x, -1.0%) ok
stringBuilding 4 1.33x (base 1.36x, -2.0%) 0.29x (base 0.28x, +5.2%) ok
recursion 4 1.38x (base 1.43x, -3.6%) 0.06x (base 0.06x, +3.4%) ok
quicksort 4 1.10x (base 1.11x, -0.9%) 0.12x (base 0.12x, +0.9%) ok

Result: no regression

@shai-almog

shai-almog commented Nov 2, 2026 •

Copy link
Copy Markdown
Collaborator Author

Compared 210 screenshots: 210 matched.
Native Windows port, REAL shipping pipeline: the hellocodenameone screenshot suite rendered by a binary CROSS-COMPILED on Linux (clang-cl + xwin, WebView2 linked) and RUN on a Windows x64 runner. Compared against the in-repo baseline in scripts/windows/screenshots.

Benchmark Results

Detailed Performance Metrics

Metric Duration
SIMD kernel backend SSE2 (x64) / NEON (arm64) native kernels
SIMD int-add (64K x300) java 56ms / native 4ms = 14.0x speedup
SIMD float-mul (64K x300) java 56ms / native 4ms = 14.0x speedup
SIMD kernel correctness PASS (native result == scalar reference)
Base64 native bridge unavailable (CN1 + SIMD + image benchmarks only)
Base64 payload size 8192 bytes
Base64 benchmark iterations 6000
Base64 SIMD byte path gated to scalar (CPU autovectorizes scalar; explicit SIMD not beneficial here)
Base64 CN1 encode 76.000 ms
Base64 CN1 decode 90.000 ms
Base64 SIMD encode 113.000 ms
Base64 encode ratio (SIMD/CN1) 1.487x (48.7% slower)
Base64 SIMD decode 111.000 ms
Base64 decode ratio (SIMD/CN1) 1.233x (23.3% slower)
Image encode benchmark iterations 100
Image createMask (SIMD off) 9.000 ms
Image createMask (SIMD on) 4.000 ms
Image createMask ratio (SIMD on/off) 0.444x (55.6% faster)
Image applyMask (SIMD off) 29.000 ms
Image applyMask (SIMD on) 29.000 ms
Image applyMask ratio (SIMD on/off) 1.000x (0.0% slower)
Image modifyAlpha (SIMD off) 33.000 ms
Image modifyAlpha (SIMD on) 20.000 ms
Image modifyAlpha ratio (SIMD on/off) 0.606x (39.4% faster)
Image modifyAlpha removeColor (SIMD off) 31.000 ms
Image modifyAlpha removeColor (SIMD on) 16.000 ms
Image modifyAlpha removeColor ratio (SIMD on/off) 0.516x (48.4% faster)

…res never links SecuritySchema

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

Developer Guide build artifacts are available for download from this workflow run:

Developer Guide quality checks:

  • AsciiDoc linter: No issues found (report)
  • Vale: No alerts found (report)
  • Paragraph capitalization: No paragraph capitalization issues (report)
  • LanguageTool: No grammar matches (report)
  • Image references: No unused images detected (report)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

✅ ByteCodeTranslator Quality Report

Test & Coverage

  • ✅ Tests: 908 total, 0 failed, 55 skipped

Benchmark Results

  • Execution Time: 10574 ms

  • Hotspots (Top 20 sampled methods):

    • 11.56% java.lang.System.identityHashCode (180 samples)
    • 10.60% com.codename1.tools.translator.IteratorEscape.mangle (165 samples)
    • 7.39% java.lang.Object.hashCode (115 samples)
    • 4.75% com.codename1.tools.translator.BytecodeMethod.equals (74 samples)
    • 4.17% java.util.ArrayList.indexOf (65 samples)
    • 2.44% java.lang.StringBuilder.append (38 samples)
    • 2.25% java.util.HashMap.hash (35 samples)
    • 1.80% java.util.HashMap.putVal (28 samples)
    • 1.80% com.codename1.tools.translator.bytecodes.Invoke.resolveDirectTarget (28 samples)
    • 1.73% com.codename1.tools.translator.ByteCodeClass.hasDeclaredMethod (27 samples)
    • 1.67% java.io.FileOutputStream.writeBytes (26 samples)
    • 1.54% java.util.AbstractCollection.containsAll (24 samples)
    • 1.48% com.codename1.tools.translator.ByteCodeClass.fillVirtualMethodTable (23 samples)
    • 1.35% com.codename1.tools.translator.classfile.analysis.Frame.execute (21 samples)
    • 1.35% com.codename1.tools.translator.bytecodes.Invoke.findMethodUp (21 samples)
    • 1.09% com.codename1.tools.translator.ByteCodeClass.markDependencies (17 samples)
    • 1.03% com.codename1.tools.translator.ByteCodeClass.updateAllDependencies (16 samples)
    • 1.03% java.io.UnixFileSystem.getBooleanAttributes0 (16 samples)
    • 0.96% com.codename1.tools.translator.BytecodeMethod.updateInlinableFieldDependencies (15 samples)
    • 0.90% com.codename1.tools.translator.IteratorEscape.ctorOnlyStoresParamsIntoThis (14 samples)
  • ⚠️ Coverage report not generated.

Static Analysis

  • ✅ SpotBugs: no findings (report was not generated by the build).
  • ⚠️ PMD report not generated.
  • ⚠️ Checkstyle report not generated.

Generated automatically by the PR CI workflow.

@shai-almog

shai-almog commented Nov 2, 2026 •

Copy link
Copy Markdown
Collaborator Author

Compared 210 screenshots: 210 matched.
Native Linux port (x64), GTK3/Cairo/Pango, ParparVM bytecode-to-C (no JVM): the hellocodenameone screenshot suite rendered by a native ELF built + run on the GitHub x64 runner. Baseline: scripts/linux/screenshots.

ParparVM vs HotSpot (JDK 25): Linux x64

Runner CPU: AMD EPYC 7763 64-Core Processor (baseline linux-x64@amd-epyc-7763-64-core-processor)

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 vm/selfhost/perf-baseline/ is a regression and fails; one that far below is an improvement, reported but not failed (a row whose calibration runs were noisier carries a wider tolerance), and for RAM the change must also exceed 0.05x in absolute terms. Both run unpinned on all of the runner's CPUs, with their own default thread counts.

Benchmark Cores Time RAM Status
hello (LinuxHelloMain) 4 0.93x (base 0.85x, +9.4%) 0.75x (base 0.83x, -9.6%) ok
translator (self) 4 0.52x (base 0.64x, -19.1%) 0.44x (base 0.52x, -15.5%) ok
intArithmetic 4 1.10x (base 1.12x, -1.2%) 0.04x (base 0.06x, -28.9%) ok
longArithmetic 4 1.08x (base 1.08x, +0.0%) 0.04x (base 0.05x, -30.1%) ok
mathTranscendental 4 1.08x (base 1.08x, +0.0%) 0.04x (base 0.07x, -44.5%) ok
arraySequential 4 2.18x (base 2.00x, +8.8%) 0.36x (base 0.36x, +0.6%) ok
arrayRandom 4 1.26x (base 0.91x, +38.9%) 0.20x (base 0.21x, -2.9%) ok
objectAllocation 4 1.54x (base 1.65x, -6.4%) 0.25x (base 0.35x, -27.8%) ok
valueEscape 4 0.10x (base 0.10x, -0.2%) 0.03x (base 0.04x, -24.9%) ok
hashMapChurn 4 1.51x (base 1.48x, +1.8%) 0.11x (base 0.09x, +14.9%) ok
stringBuilding 4 1.30x (base 1.39x, -6.4%) 0.26x (base 0.31x, -16.6%) ok
recursion 4 1.39x (base 1.25x, +10.5%) 0.04x (base 0.08x, -47.1%) ok
quicksort 4 1.09x (base 1.07x, +1.4%) 0.10x (base 0.11x, -13.1%) ok

Result: no regression

@shai-almog

shai-almog commented Nov 2, 2026 •

Copy link
Copy Markdown
Collaborator Author

Compared 210 screenshots: 210 matched.
Native Linux port (arm64), GTK3/Cairo/Pango, ParparVM bytecode-to-C (no JVM): the hellocodenameone screenshot suite rendered by a native ELF built + run on the GitHub arm64 runner. Baseline: scripts/linux/screenshots-arm.

ParparVM vs HotSpot (JDK 25): Linux arm64

Runner CPU: Neoverse-N2 (baseline linux-arm64@neoverse-n2)

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 vm/selfhost/perf-baseline/ is a regression and fails; one that far below is an improvement, reported but not failed (a row whose calibration runs were noisier carries a wider tolerance), and for RAM the change must also exceed 0.05x in absolute terms. Both run unpinned on all of the runner's CPUs, with their own default thread counts.

Benchmark Cores Time RAM Status
hello (LinuxHelloMain) 4 0.95x (base 1.02x, -7.3%) 0.77x (base 0.66x, +16.3%) ok
translator (self) 4 0.74x (base 0.70x, +5.5%) 0.43x (base 0.43x, +0.6%) ok
intArithmetic 4 1.04x (base 1.04x, -0.0%) 0.03x (base 0.03x, +4.6%) ok
longArithmetic 4 0.79x (base 0.79x, -0.1%) 0.03x (base 0.03x, +4.8%) ok
mathTranscendental 4 1.09x (base 1.10x, -0.3%) 0.04x (base 0.03x, +9.8%) ok
arraySequential 4 0.35x (base 0.36x, -2.1%) 0.37x (base 0.37x, +0.3%) ok
arrayRandom 4 0.94x (base 0.94x, +0.4%) 0.20x (base 0.20x, +0.6%) ok
objectAllocation 4 1.98x (base 1.77x, +11.8%) 0.41x (base 0.37x, +9.6%) ok
valueEscape 4 0.51x (base 0.51x, -0.1%) 0.03x (base 0.03x, +5.6%) ok
hashMapChurn 4 0.86x (base 0.84x, +1.8%) 0.13x (base 0.12x, +6.8%) ok
stringBuilding 4 1.51x (base 1.57x, -3.5%) 0.26x (base 0.26x, +0.1%) ok
recursion 4 1.55x (base 1.43x, +8.4%) 0.04x (base 0.04x, +3.2%) ok
quicksort 4 1.00x (base 0.99x, +0.5%) 0.09x (base 0.09x, +1.1%) ok

Result: no regression

@shai-almog

shai-almog commented Nov 2, 2026 •

Copy link
Copy Markdown
Collaborator Author

Compared 210 screenshots: 210 matched.
Native Windows port (arm64 / Apple Silicon - Arm): full hellocodenameone screenshot suite rendered offscreen with Direct2D/DirectWrite, plus the real benchmarks (base64 native/CN1/SIMD, image createMask/applyMask/modifyAlpha/PNG/JPEG, NEON SIMD kernels). Compared against the in-repo baseline in scripts/windows/screenshots.

Benchmark Results

Detailed Performance Metrics

Metric Duration
SIMD kernel backend SSE2 (x64) / NEON (arm64) native kernels
SIMD int-add (64K x300) java 49ms / native 2ms = 24.5x speedup
SIMD float-mul (64K x300) java 49ms / native 2ms = 24.5x speedup
SIMD kernel correctness PASS (native result == scalar reference)
Base64 native bridge unavailable (CN1 + SIMD + image benchmarks only)
Base64 payload size 8192 bytes
Base64 benchmark iterations 6000
Base64 SIMD byte path gated to scalar (CPU autovectorizes scalar; explicit SIMD not beneficial here)
Base64 CN1 encode 61.000 ms
Base64 CN1 decode 70.000 ms
Base64 SIMD encode 74.000 ms
Base64 encode ratio (SIMD/CN1) 1.213x (21.3% slower)
Base64 SIMD decode 73.000 ms
Base64 decode ratio (SIMD/CN1) 1.043x (4.3% slower)
Image encode benchmark iterations 100
Image createMask (SIMD off) 5.000 ms
Image createMask (SIMD on) 1.000 ms
Image createMask ratio (SIMD on/off) 0.200x (80.0% faster)
Image applyMask (SIMD off) 18.000 ms
Image applyMask (SIMD on) 19.000 ms
Image applyMask ratio (SIMD on/off) 1.056x (5.6% slower)
Image modifyAlpha (SIMD off) 16.000 ms
Image modifyAlpha (SIMD on) 12.000 ms
Image modifyAlpha ratio (SIMD on/off) 0.750x (25.0% faster)
Image modifyAlpha removeColor (SIMD off) 14.000 ms
Image modifyAlpha removeColor (SIMD on) 8.000 ms
Image modifyAlpha removeColor ratio (SIMD on/off) 0.571x (42.9% faster)

ParparVM vs HotSpot (JDK 25): Windows arm64

Runner CPU: ARMv8 (64-bit) Family 8 Model D49 Revision 0, MICROSOFT CORPORATION (baseline windows-arm64@armv8-64-bit-family-8-model-d49-microsoft-corporation)

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 vm/selfhost/perf-baseline/ is a regression and fails; one that far below is an improvement, reported but not failed (a row whose calibration runs were noisier carries a wider tolerance), and for RAM the change must also exceed 0.05x in absolute terms. Both run unpinned on all of the runner's CPUs, with their own default thread counts.

Benchmark Cores Time RAM Status
hello (WinHelloMain) 4 1.06x (base 1.11x, -4.6%) 0.73x (base 0.75x, -3.2%) ok
translator (self) 4 0.88x (base 0.84x, +5.6%) 0.48x (base 0.51x, -5.8%) ok
intArithmetic 4 1.04x (base 1.04x, +0.0%) 0.06x (base 0.06x, +3.4%) ok
longArithmetic 4 0.79x (base 0.80x, -0.1%) 0.06x (base 0.06x, +3.6%) ok
mathTranscendental 4 0.75x (base 0.72x, +3.8%) 0.07x (base 0.06x, +2.0%) ok
arraySequential 4 0.39x (base 0.46x, -14.9%) 0.39x (base 0.39x, -0.0%) ok
arrayRandom 4 0.94x (base 0.94x, +0.6%) 0.23x (base 0.23x, +0.3%) ok
objectAllocation 4 1.82x (base 1.82x, +0.2%) 0.40x (base 0.43x, -6.1%) ok
valueEscape 4 0.76x (base 0.76x, +0.0%) 0.05x (base 0.05x, +3.5%) ok
hashMapChurn 4 1.02x (base 0.98x, +3.0%) 0.12x (base 0.12x, -3.3%) ok
stringBuilding 4 1.55x (base 1.43x, +8.5%) 0.27x (base 0.27x, -0.1%) ok
recursion 4 1.54x (base 1.46x, +4.9%) 0.07x (base 0.07x, +1.3%) ok
quicksort 4 1.00x (base 1.00x, +0.1%) 0.12x (base 0.12x, +0.6%) ok

Result: no regression

@shai-almog

shai-almog commented Nov 3, 2026 •

Copy link
Copy Markdown
Collaborator Author

Compared 196 screenshots: 196 matched.
✅ Native Mac screenshot tests passed.

Benchmark Results

  • VM Translation Time: 0 seconds
  • Compilation Time: 599 seconds

Detailed Performance Metrics

Metric Duration
SIMD kernel backend SSE2 (x64) / NEON (arm64) native kernels
SIMD int-add (64K x300) java 54ms / native 3ms = 18.0x speedup
SIMD float-mul (64K x300) java 54ms / native 3ms = 18.0x speedup
SIMD kernel correctness PASS (native result == scalar reference)
Base64 native bridge unavailable (CN1 + SIMD + image benchmarks only)
Base64 payload size 8192 bytes
Base64 benchmark iterations 6000
Base64 SIMD byte path active (NEON-accelerated)
Base64 CN1 encode 45.000 ms
Base64 CN1 decode 53.000 ms
Image encode benchmark iterations 100
Image createMask (SIMD off) 15.000 ms
Image createMask (SIMD on) 9.000 ms
Image createMask ratio (SIMD on/off) 0.600x (40.0% faster)
Image applyMask (SIMD off) 76.000 ms
Image applyMask (SIMD on) 83.000 ms
Image applyMask ratio (SIMD on/off) 1.092x (9.2% slower)
Image modifyAlpha (SIMD off) 65.000 ms
Image modifyAlpha (SIMD on) 60.000 ms
Image modifyAlpha ratio (SIMD on/off) 0.923x (7.7% faster)
Image modifyAlpha removeColor (SIMD off) 68.000 ms
Image modifyAlpha removeColor (SIMD on) 50.000 ms
Image modifyAlpha removeColor ratio (SIMD on/off) 0.735x (26.5% faster)

ParparVM vs HotSpot (JDK 25): macOS arm64

Runner CPU: Apple M1 (Virtual) (baseline macos-arm64)

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 vm/selfhost/perf-baseline/ is a regression and fails; one that far below is an improvement, reported but not failed (a row whose calibration runs were noisier carries a wider tolerance), and for RAM the change must also exceed 0.05x in absolute terms. Both run unpinned on all of the runner's CPUs, with their own default thread counts.

Benchmark Cores Time RAM Status
hello (HelloCodenameOne) 3 0.76x (base 0.96x, -20.5%) 0.87x (base 0.93x, -5.5%) ok
translator (self) 3 0.62x (base 0.62x, -0.9%) 0.95x (base 0.78x, +21.3%) ok
intArithmetic 3 1.07x (base 1.03x, +4.0%) 0.11x (base 0.12x, -1.8%) ok
longArithmetic 3 1.02x (base 1.03x, -0.5%) 0.12x (base 0.07x, +67.2%) ok
mathTranscendental 3 0.98x (base 1.01x, -2.3%) 0.12x (base 0.12x, -0.7%) ok
arraySequential 3 0.43x (base 0.42x, +3.1%) 0.53x (base 0.53x, +0.3%) ok
arrayRandom 3 0.98x (base 0.99x, -0.7%) 0.32x (base 0.32x, +0.1%) ok
objectAllocation 3 0.96x (base 1.11x, -13.1%) 0.54x (base 0.72x, -24.8%) ok
valueEscape 3 0.51x (base 0.51x, +0.1%) 0.09x (base 0.09x, +0.7%) ok
hashMapChurn 3 1.09x (base 1.18x, -7.1%) 0.07x (base 0.07x, +4.0%) ok
stringBuilding 3 0.90x (base 0.84x, +7.4%) 0.46x (base 0.46x, -1.1%) ok
recursion 3 1.22x (base 1.24x, -0.8%) 0.04x (base 0.12x, -65.9%) ok
quicksort 3 1.00x (base 1.01x, -1.0%) 0.11x (base 0.11x, +0.8%) ok

Result: no regression

shai-almog and others added 2 commits November 3, 2026 04:42
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ames

ElementCollection can name its owner column and declare the value column's
SQL type, which reaches CREATE TABLE and the schema report. A name wrapped in
backticks or double quotes is unwrapped, since the runtime quotes every
identifier itself and the quotes otherwise became part of the name.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@shai-almog

shai-almog commented Nov 3, 2026 •

Copy link
Copy Markdown
Collaborator Author

Apple Watch (watchOS / Core Graphics)

Compared 253 screenshots: 252 matched, 1 updated.

  • Sheet — updated screenshot. Screenshot differs (416x496 px, bit depth 8).

    Sheet
    Preview info: JPEG preview quality 70; JPEG preview quality 70.
    Full-resolution PNG saved as Sheet.png in workflow artifacts.

@shai-almog

shai-almog commented Nov 3, 2026 •

Copy link
Copy Markdown
Collaborator Author

Compared 193 screenshots: 193 matched.
✅ Native iOS Metal screenshot tests passed.

Benchmark Results

  • VM Translation Time: 0 seconds
  • Compilation Time: 2945 seconds

Build and Run Timing

Metric Duration
Simulator Boot 59000 ms
Simulator Boot (Run) 1000 ms
App Install 15000 ms
App Launch 4000 ms
Test Execution 445000 ms

Detailed Performance Metrics

Metric Duration
SIMD kernel backend SSE2 (x64) / NEON (arm64) native kernels
SIMD int-add (64K x300) java 73ms / native 3ms = 24.3x speedup
SIMD float-mul (64K x300) java 135ms / native 3ms = 45.0x speedup
SIMD kernel correctness PASS (native result == scalar reference)
Base64 payload size 8192 bytes
Base64 benchmark iterations 6000
Base64 SIMD byte path active (NEON-accelerated)
Base64 CN1 encode 67.000 ms
Base64 CN1 decode 111.000 ms
Base64 native encode 1868.000 ms
Base64 encode ratio (CN1/native) 0.036x (96.4% faster)
Base64 native decode 1770.000 ms
Base64 decode ratio (CN1/native) 0.063x (93.7% faster)
Base64 SIMD encode 170.000 ms
Base64 encode ratio (SIMD/CN1) 2.537x (153.7% slower)
Base64 SIMD decode 60.000 ms
Base64 decode ratio (SIMD/CN1) 0.541x (45.9% faster)
Base64 encode ratio (SIMD/native) 0.091x (90.9% faster)
Base64 decode ratio (SIMD/native) 0.034x (96.6% faster)
Image encode benchmark iterations 100
Image createMask (SIMD off) 23.000 ms
Image createMask (SIMD on) 17.000 ms
Image createMask ratio (SIMD on/off) 0.739x (26.1% faster)
Image applyMask (SIMD off) 723.000 ms
Image applyMask (SIMD on) 610.000 ms
Image applyMask ratio (SIMD on/off) 0.844x (15.6% faster)
Image modifyAlpha (SIMD off) 198.000 ms
Image modifyAlpha (SIMD on) 463.000 ms
Image modifyAlpha ratio (SIMD on/off) 2.338x (133.8% slower)
Image modifyAlpha removeColor (SIMD off) 674.000 ms
Image modifyAlpha removeColor (SIMD on) 238.000 ms
Image modifyAlpha removeColor ratio (SIMD on/off) 0.353x (64.7% faster)

shai-almog and others added 8 commits November 3, 2026 21:14
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
XMLParser, Element, ParserCallback and the new CharEntities and
XMLParseException are @SharedWithBackend. XMLParser no longer links
HTMLUtils (entity tables moved to CharEntities, HTMLUtils delegates) or
Log (I/O errors go to the callback as ERROR_IO). Strict mode now refuses
malformed input with XMLParseException, caps nesting (setMaxDepth,
default 256), skips DOCTYPE internal subsets without expanding them, and
defines only the XML entities. Element gains child, children, childText.
PropertyLists uses the shared parser; XmlElement, XmlPullParser and
XmlException are deleted.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…greSQL names; ICU collation names

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Timestamps, PropertyLists, Credentials, Clock, Http1Date and Asn1 each had
their own days-from-civil / civil-from-days / leap-year / pad copy. They now
share com.codename1.impl.backend.CivilTime; each keeps its own parsing,
separators and error behaviour. Asn1.parseTime now rejects a day past the
month's end, as the other parsers already did.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…tMalformed

setStrict(true) again only reports to the callback, as on master, so
Mappers.fromXml and callbacks that continue keep working. The new
setRejectMalformed(true) implies strict and adds throwing on malformed
input, entity refusal, the depth cap and DOCTYPE skipping. It also refuses
C0 control characters and &#X, skips comments and PIs in a DOCTYPE
internal subset whole, reports line and column, and throws on I/O errors
with the IOException as cause. Outside it, an I/O error with no callback
is printed rather than lost. PropertyLists uses the new mode.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… abort, effective strict flag

Line/column tracking and the control-character check run only in reject
mode, counted inside the existing text scan, so default and HTML parsing
pay one boolean test. Outside reject mode an I/O error is reported to the
callback but its answer is ignored, returning the partial tree as master
did. setRejectMalformed no longer changes what isStrict reports, and
turning it off restores the mode setStrict chose.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@shai-almog
shai-almog merged commit 3842e56 into master Nov 4, 2026
@shai-almog
shai-almog deleted the backend-gaps-6153 branch November 4, 2026 03:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Backend gaps found porting to the Codename One Backend 7.0.280

1 participant