Skip to content

Core batch: ParparVM perf improvements + RichText component & GPU shadow rendering#5421

Merged
shai-almog merged 7 commits into
masterfrom
parparvm-perf-improvements
Jul 20, 2026
Merged

Core batch: ParparVM perf improvements + RichText component & GPU shadow rendering#5421
shai-almog merged 7 commits into
masterfrom
parparvm-perf-improvements

Conversation

@shai-almog

@shai-almog shai-almog commented Jul 20, 2026

Copy link
Copy Markdown
Collaborator

Summary

A batch of independent Codename One core improvements, grouped into one PR to validate CI together and keep the work focused. Two areas: ParparVM (the iOS bytecode→C translator + C runtime + minimal Java API) and a set of UI component / rendering additions. No public API is removed or broken, and both parparvm and core compile clean against current master.

ParparVM (vm/)

Strings & allocation

  • Compact strings (JEP 254-style). String.value holds a byte[] (Latin-1) or char[] (UTF-16) with a coder discriminator, halving footprint for the common ASCII case. Coder-aware fast paths in nativeMethods.m.
  • Fused string allocation. The byte[] backing store is inlined into the String object block (single allocation) via the BiBOP allocator, using an init-before-publish discipline safe under the concurrent collector.
  • Direct-digit Long/Integer.toString fast path (no intermediate buffer).
  • Concatenation lowering. makeConcat/makeConcatWithConstants sites with 2–5 all-String parts are rewritten to a cn1ConcatN native that sizes the result once and fills it directly.

Arithmetic & escape analysis

  • Per-usage escape analysis de-gates scalar replacement: a provably non-escaping object used only via trivial accessors becomes registers instead of a heap allocation.
  • Double comparison codegen avoids clang's fcsel if-conversion (which serializes FP recurrences) by biasing the guard to a branch; dcmp fusion plus a noreturn OOB helper that unblocks LICM under -fno-strict-aliasing.

Concurrent GC

  • Sweep crash fix on abandoned unpublished object slots (null-guards + slot reclaim).

Benchmarks

  • Updated self-contained micro-benchmark suite (vm/benchmarks) that runs identically on Java SE and the translated C runtime.

UI components (CodenameOne/src, Ports/)

  • RichTextComponent + RichRunPainter — a rich-text rendering/editing component over a block model (RichBlocks/RichView/HtmlImporter/TextStyle), with a unit test.
  • GPU-accelerated shape shadows for RoundRectBorder. New Graphics.fillShapeShadow / isShapeShadowSupported path avoids the per-border bitmap cache where the platform supports it (JavaSE paints directly; Android falls back to the cached path, documented inline).
  • Clipboard content plumbing in CodenameOneImplementation; MCP tooling updates (MCPServer / MCPSocketTransport).

Testing

  • mvn -pl parparvm compileBUILD SUCCESS.
  • mvn -pl core compile -Plocal-dev-javaseBUILD SUCCESS.
  • Benchmark suite exercises the VM paths on both Java SE and translated C; RichTextComponentTest covers the component.

Risk

Low-to-moderate. Changes are confined to vm/, CodenameOne/src, and platform ports; no public API changes. The compact-string representation is the most invasive VM change (covered by the string benchmark + concurrent-GC sweep fix); the GPU-shadow path degrades gracefully to the existing cached rendering where unsupported.

🤖 Generated with Claude Code

@shai-almog
shai-almog force-pushed the parparvm-perf-improvements branch from 5d25e03 to b12b3e3 Compare July 20, 2026 04:29
@shai-almog shai-almog changed the title ParparVM: compact strings, fused allocation & arithmetic codegen improvements Core batch: ParparVM perf improvements + RichText component & GPU shadow rendering Jul 20, 2026
@shai-almog
shai-almog force-pushed the parparvm-perf-improvements branch 3 times, most recently from 658fa10 to 60b776c Compare July 20, 2026 07:07
@shai-almog

shai-almog commented Jul 20, 2026

Copy link
Copy Markdown
Collaborator Author

Compared 12 screenshots: 12 matched.
✅ JavaSE simulator integration screenshots matched stored baselines.

@github-actions

Copy link
Copy Markdown
Contributor

Cloudflare Preview

@shai-almog

shai-almog commented Jul 20, 2026

Copy link
Copy Markdown
Collaborator Author

Compared 146 screenshots: 146 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 60ms / native 3ms = 20.0x speedup
SIMD float-mul (64K x300) java 59ms / native 3ms = 19.6x speedup
SIMD kernel correctness PASS (native result == scalar reference)

@shai-almog

shai-almog commented Jul 20, 2026

Copy link
Copy Markdown
Collaborator Author

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

@shai-almog
shai-almog force-pushed the parparvm-perf-improvements branch from 60b776c to 3ba3d93 Compare July 20, 2026 07:54
…ichText component & GPU shadow

Groups a set of independent Codename One core improvements into one PR to
validate CI together. No public API is removed or broken.

## ParparVM (vm/) — iOS bytecode → C translation
- Compact strings (JEP 254-style): String.value holds byte[] (Latin-1) or
  char[] (UTF-16) with a coder discriminator, halving footprint for ASCII;
  coder-aware fast paths in nativeMethods.m.
- Fused string allocation: byte[] backing store inlined into the String
  object block (single allocation) via the BiBOP allocator, init-before-
  publish safe under the concurrent collector.
- Direct-digit Long/Integer.toString fast path (no intermediate buffer).
- String concat lowering: makeConcat/makeConcatWithConstants sites with 2-5
  all-String parts rewritten to a cn1ConcatN native that sizes the result
  once and fills it directly.
- Per-usage escape analysis de-gates scalar replacement.
- Double comparison codegen avoids clang's fcsel if-conversion; dcmp fusion
  and a noreturn OOB helper that unblocks LICM under -fno-strict-aliasing.
- Concurrent-GC sweep crash fix on abandoned unpublished object slots.
- Updated self-contained micro-benchmark suite (vm/benchmarks).

## Compact-string native ABI follow-through
Because compact strings changes String's native representation, hand-written
native code that reads String.value as char[] is made coder-aware:
- iOS port IOSNative.m splitString now reads through the coder-safe charAt/
  substring accessors instead of casting the backing array to char[].
- The StackOverflow VM integration test's native helper decodes byte[] or
  char[] based on the value array class.

## UI components (CodenameOne/src, Ports/)
- RichTextComponent + RichRunPainter: rich text rendering component with a
  block model (RichBlocks/RichView/HtmlImporter/TextStyle), unit test.
- GPU-accelerated shape shadows for RoundRectBorder: Graphics.fillShapeShadow
  / isShapeShadowSupported avoids the per-border bitmap cache where supported
  (JavaSE paints directly; Android falls back to the cached path).
- Clipboard content plumbing; MCP tooling updates.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@shai-almog
shai-almog force-pushed the parparvm-perf-improvements branch from 3ba3d93 to 440d7ba Compare July 20, 2026 07:54
@shai-almog

shai-almog commented Jul 20, 2026

Copy link
Copy Markdown
Collaborator Author

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

Benchmark Results

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

Detailed Performance Metrics

Metric Duration
SIMD kernel backend SSE2 (x64) / NEON (arm64) native kernels
SIMD int-add (64K x300) java 108ms / native 6ms = 18.0x speedup
SIMD float-mul (64K x300) java 113ms / native 4ms = 28.2x 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 170.000 ms
Base64 CN1 decode 114.000 ms
Base64 native encode 546.000 ms
Base64 encode ratio (CN1/native) 0.311x (68.9% faster)
Base64 native decode 246.000 ms
Base64 decode ratio (CN1/native) 0.463x (53.7% faster)
Base64 SIMD encode 78.000 ms
Base64 encode ratio (SIMD/CN1) 0.459x (54.1% faster)
Base64 SIMD decode 51.000 ms
Base64 decode ratio (SIMD/CN1) 0.447x (55.3% faster)
Base64 encode ratio (SIMD/native) 0.143x (85.7% faster)
Base64 decode ratio (SIMD/native) 0.207x (79.3% faster)
Image encode benchmark iterations 100
Image createMask (SIMD off) 8.000 ms
Image createMask (SIMD on) 3.000 ms
Image createMask ratio (SIMD on/off) 0.375x (62.5% faster)
Image applyMask (SIMD off) 80.000 ms
Image applyMask (SIMD on) 47.000 ms
Image applyMask ratio (SIMD on/off) 0.588x (41.3% faster)
Image modifyAlpha (SIMD off) 57.000 ms
Image modifyAlpha (SIMD on) 35.000 ms
Image modifyAlpha ratio (SIMD on/off) 0.614x (38.6% faster)
Image modifyAlpha removeColor (SIMD off) 49.000 ms
Image modifyAlpha removeColor (SIMD on) 31.000 ms
Image modifyAlpha removeColor ratio (SIMD on/off) 0.633x (36.7% faster)

@shai-almog

shai-almog commented Jul 20, 2026

Copy link
Copy Markdown
Collaborator Author

Compared 144 screenshots: 144 matched.
✅ Native Apple TV (tvOS, Metal) screenshot tests passed.

@shai-almog

shai-almog commented Jul 20, 2026

Copy link
Copy Markdown
Collaborator Author

Compared 151 screenshots: 151 matched.

Native Android coverage

  • 📊 Line coverage: 11.45% (12054/105280 lines covered) [HTML preview] (artifact android-coverage-report, jacocoAndroidReport/html/index.html)
    • Other counters: instruction 10.25% (59713/582526), branch 5.31% (2826/53233), complexity 5.06% (2823/55788), method 7.56% (2168/28690), class 11.96% (489/4090)
    • Lowest covered classes
      • kotlin.collections.kotlin.collections.ArraysKt___ArraysKt – 0.00% (0/6327 lines covered)
      • kotlin.collections.unsigned.kotlin.collections.unsigned.UArraysKt___UArraysKt – 0.00% (0/2384 lines covered)
      • org.jacoco.agent.rt.internal_b6258fc.asm.org.jacoco.agent.rt.internal_b6258fc.asm.ClassReader – 0.00% (0/1519 lines covered)
      • kotlin.collections.kotlin.collections.CollectionsKt___CollectionsKt – 0.00% (0/1148 lines covered)
      • org.jacoco.agent.rt.internal_b6258fc.asm.org.jacoco.agent.rt.internal_b6258fc.asm.MethodWriter – 0.00% (0/923 lines covered)
      • kotlin.sequences.kotlin.sequences.SequencesKt___SequencesKt – 0.00% (0/730 lines covered)
      • com.google.common.cache.com.google.common.cache.LocalCache$Segment – 0.00% (0/726 lines covered)
      • kotlin.text.kotlin.text.StringsKt___StringsKt – 0.00% (0/623 lines covered)
      • org.jacoco.agent.rt.internal_b6258fc.asm.org.jacoco.agent.rt.internal_b6258fc.asm.Frame – 0.00% (0/564 lines covered)
      • kotlin.collections.kotlin.collections.ArraysKt___ArraysJvmKt – 0.00% (0/495 lines covered)

✅ Native Android screenshot tests passed.

Native Android coverage

  • 📊 Line coverage: 11.45% (12054/105280 lines covered) [HTML preview] (artifact android-coverage-report, jacocoAndroidReport/html/index.html)
    • Other counters: instruction 10.25% (59713/582526), branch 5.31% (2826/53233), complexity 5.06% (2823/55788), method 7.56% (2168/28690), class 11.96% (489/4090)
    • Lowest covered classes
      • kotlin.collections.kotlin.collections.ArraysKt___ArraysKt – 0.00% (0/6327 lines covered)
      • kotlin.collections.unsigned.kotlin.collections.unsigned.UArraysKt___UArraysKt – 0.00% (0/2384 lines covered)
      • org.jacoco.agent.rt.internal_b6258fc.asm.org.jacoco.agent.rt.internal_b6258fc.asm.ClassReader – 0.00% (0/1519 lines covered)
      • kotlin.collections.kotlin.collections.CollectionsKt___CollectionsKt – 0.00% (0/1148 lines covered)
      • org.jacoco.agent.rt.internal_b6258fc.asm.org.jacoco.agent.rt.internal_b6258fc.asm.MethodWriter – 0.00% (0/923 lines covered)
      • kotlin.sequences.kotlin.sequences.SequencesKt___SequencesKt – 0.00% (0/730 lines covered)
      • com.google.common.cache.com.google.common.cache.LocalCache$Segment – 0.00% (0/726 lines covered)
      • kotlin.text.kotlin.text.StringsKt___StringsKt – 0.00% (0/623 lines covered)
      • org.jacoco.agent.rt.internal_b6258fc.asm.org.jacoco.agent.rt.internal_b6258fc.asm.Frame – 0.00% (0/564 lines covered)
      • kotlin.collections.kotlin.collections.ArraysKt___ArraysJvmKt – 0.00% (0/495 lines covered)

Benchmark Results

Detailed Performance Metrics

Metric Duration
SIMD kernel backend scalar fallback (no native SIMD)
SIMD int-add (64K x300) java 238ms / native 182ms = 1.3x speedup
SIMD float-mul (64K x300) java 178ms / native 115ms = 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 86.000 ms
Base64 CN1 decode 84.000 ms
Base64 native encode 372.000 ms
Base64 encode ratio (CN1/native) 0.231x (76.9% faster)
Base64 native decode 289.000 ms
Base64 decode ratio (CN1/native) 0.291x (70.9% faster)
Image encode benchmark status skipped (SIMD unsupported)

@shai-almog

shai-almog commented Jul 20, 2026

Copy link
Copy Markdown
Collaborator Author

Compared 143 screenshots: 143 matched.
✅ Native iOS screenshot tests passed.

Benchmark Results

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

Build and Run Timing

Metric Duration
Simulator Boot 111000 ms
Simulator Boot (Run) 0 ms
App Install 15000 ms
App Launch 5000 ms
Test Execution 1134000 ms

Detailed Performance Metrics

Metric Duration
SIMD kernel backend SSE2 (x64) / NEON (arm64) native kernels
SIMD int-add (64K x300) java 135ms / native 2ms = 67.5x speedup
SIMD float-mul (64K x300) java 119ms / native 5ms = 23.8x 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 282.000 ms
Base64 CN1 decode 159.000 ms
Base64 native encode 1010.000 ms
Base64 encode ratio (CN1/native) 0.279x (72.1% faster)
Base64 native decode 473.000 ms
Base64 decode ratio (CN1/native) 0.336x (66.4% faster)
Base64 SIMD encode 74.000 ms
Base64 encode ratio (SIMD/CN1) 0.262x (73.8% faster)
Base64 SIMD decode 47.000 ms
Base64 decode ratio (SIMD/CN1) 0.296x (70.4% faster)
Base64 encode ratio (SIMD/native) 0.073x (92.7% faster)
Base64 decode ratio (SIMD/native) 0.099x (90.1% faster)
Image encode benchmark iterations 100
Image createMask (SIMD off) 9.000 ms
Image createMask (SIMD on) 2.000 ms
Image createMask ratio (SIMD on/off) 0.222x (77.8% faster)
Image applyMask (SIMD off) 68.000 ms
Image applyMask (SIMD on) 57.000 ms
Image applyMask ratio (SIMD on/off) 0.838x (16.2% faster)
Image modifyAlpha (SIMD off) 60.000 ms
Image modifyAlpha (SIMD on) 46.000 ms
Image modifyAlpha ratio (SIMD on/off) 0.767x (23.3% faster)
Image modifyAlpha removeColor (SIMD off) 53.000 ms
Image modifyAlpha removeColor (SIMD on) 66.000 ms
Image modifyAlpha removeColor ratio (SIMD on/off) 1.245x (24.5% slower)

@github-actions

github-actions Bot commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

✅ ByteCodeTranslator Quality Report

Test & Coverage

  • Tests: 405 total, 0 failed, 14 skipped

Benchmark Results

  • Execution Time: 16841 ms

  • Hotspots (Top 20 sampled methods):

    • 18.87% java.util.ArrayList.indexOf (286 samples)
    • 10.09% com.codename1.tools.translator.BytecodeMethod.addToConstantPool (153 samples)
    • 4.02% java.lang.StringBuilder.append (61 samples)
    • 2.37% com.codename1.tools.translator.Parser.cn1EnsureSubclassIndex (36 samples)
    • 2.31% com.codename1.tools.translator.ByteCodeClass.hasDeclaredMethod (35 samples)
    • 2.11% org.objectweb.asm.tree.analysis.Analyzer.findSubroutine (32 samples)
    • 2.11% com.codename1.tools.translator.Parser.generateClassAndMethodIndexHeader (32 samples)
    • 1.91% java.lang.String.equals (29 samples)
    • 1.78% java.util.HashMap.put (27 samples)
    • 1.65% com.codename1.tools.translator.bytecodes.Invoke.resolveDirectTarget (25 samples)
    • 1.58% com.codename1.tools.translator.BytecodeMethod.appendCMethodPrefix (24 samples)
    • 1.45% java.lang.System.identityHashCode (22 samples)
    • 1.45% com.codename1.tools.translator.Parser.addToConstantPool (22 samples)
    • 1.39% org.objectweb.asm.tree.analysis.Analyzer.analyze (21 samples)
    • 1.39% com.codename1.tools.translator.BytecodeMethod.optimize (21 samples)
    • 1.32% com.codename1.tools.translator.ByteCodeClass.markDependent (20 samples)
    • 1.25% java.util.HashMap.hash (19 samples)
    • 1.12% com.codename1.tools.translator.BytecodeMethod.equals (17 samples)
    • 0.99% sun.nio.fs.UnixNativeDispatcher.open0 (15 samples)
    • 0.92% java.lang.StringCoding.encode (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 Jul 20, 2026

Copy link
Copy Markdown
Collaborator Author

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

Benchmark Results

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

Build and Run Timing

Metric Duration
Simulator Boot 99000 ms
Simulator Boot (Run) 2000 ms
App Install 37000 ms
App Launch 3000 ms
Test Execution 1026000 ms

Detailed Performance Metrics

Metric Duration
SIMD kernel backend SSE2 (x64) / NEON (arm64) native kernels
SIMD int-add (64K x300) java 104ms / native 3ms = 34.6x speedup
SIMD float-mul (64K x300) java 153ms / native 8ms = 19.1x 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 209.000 ms
Base64 CN1 decode 198.000 ms
Base64 native encode 425.000 ms
Base64 encode ratio (CN1/native) 0.492x (50.8% faster)
Base64 native decode 428.000 ms
Base64 decode ratio (CN1/native) 0.463x (53.7% faster)
Base64 SIMD encode 54.000 ms
Base64 encode ratio (SIMD/CN1) 0.258x (74.2% faster)
Base64 SIMD decode 62.000 ms
Base64 decode ratio (SIMD/CN1) 0.313x (68.7% faster)
Base64 encode ratio (SIMD/native) 0.127x (87.3% faster)
Base64 decode ratio (SIMD/native) 0.145x (85.5% faster)
Image encode benchmark iterations 100
Image createMask (SIMD off) 11.000 ms
Image createMask (SIMD on) 1.000 ms
Image createMask ratio (SIMD on/off) 0.091x (90.9% faster)
Image applyMask (SIMD off) 123.000 ms
Image applyMask (SIMD on) 62.000 ms
Image applyMask ratio (SIMD on/off) 0.504x (49.6% faster)
Image modifyAlpha (SIMD off) 45.000 ms
Image modifyAlpha (SIMD on) 60.000 ms
Image modifyAlpha ratio (SIMD on/off) 1.333x (33.3% slower)
Image modifyAlpha removeColor (SIMD off) 63.000 ms
Image modifyAlpha removeColor (SIMD on) 63.000 ms
Image modifyAlpha removeColor ratio (SIMD on/off) 1.000x (0.0% slower)

@shai-almog

shai-almog commented Jul 20, 2026

Copy link
Copy Markdown
Collaborator Author

Compared 146 screenshots: 146 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 59ms / native 4ms = 14.7x speedup
SIMD float-mul (64K x300) java 60ms / native 6ms = 10.0x speedup
SIMD kernel correctness PASS (native result == scalar reference)

@shai-almog

shai-almog commented Jul 20, 2026

Copy link
Copy Markdown
Collaborator Author

Compared 146 screenshots: 146 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 56ms / native 3ms = 18.6x speedup
SIMD float-mul (64K x300) java 56ms / native 4ms = 14.0x speedup
SIMD kernel correctness PASS (native result == scalar reference)

…suite SIGSEGV

- RichTextComponent: use Font.equals() instead of == (PMD CompareObjectsWithEquals).
- cn1_globals.m: TEMP diagnostic SIGSEGV/SIGABRT/SIGBUS handler that symbolizes the
  native fault site (backtrace_symbols_fd, async-signal-safe, glibc-only). The full
  native screenshot suite crashes deterministically (exit 139) in the theme phase and
  the VM installs no fatal-signal handler, so there is no crash output. This surfaces
  the fault address + native stack to isolate the compact-string / GC interaction.
  To be removed before merge.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@shai-almog

shai-almog commented Jul 20, 2026

Copy link
Copy Markdown
Collaborator Author

Compared 217 screenshots: 217 matched.
✅ Native Apple Watch (watchOS, Core Graphics) screenshot tests passed.

shai-almog and others added 4 commits July 20, 2026 14:35
…marker

The stderr crash output was not captured by the CN1SS screenshot harness (it tees
stdout). Emit the SIGSEGV/SIGABRT/SIGBUS fault site + backtrace to stdout (fd 1) as
well, and print a one-line install confirmation so we can verify the handler is wired
into the native suite build. Still TEMP -- to be removed before merge.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
cn1GcInstallSignalHandler (gated on CN1_CONSERVATIVE_GC_ROOTS + first GC) did not
emit the install marker on the desktop suite build, so the SIGSEGV handler was never
active. Install it from an __attribute__((constructor)) at process load so it is
guaranteed present regardless of GC configuration. Still TEMP -- remove before merge.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…SEGV)

Gate the NoZero single-allocation String fast paths behind CN1_ENABLE_FUSED_STRINGS
(undefined = off): cn1InlSbToString, java_lang_StringBuilder_toString (routes to the
non-fused toStringImpl twin), and cn1FusedLatin1Begin (used by newStringFromAsciiLen +
cn1FusedConcat, which fall back to the safe __NEW+__INIT+separate-array path). These
NoZero paths leave the slot GC-invisible (parentCls==0) with garbage fields during the
fill, and the non-Latin-1 abandon branch is heavily exercised by theme-icon codepoints
(>0xFF) in the native theme-fidelity tests where the suite deterministically SIGSEGVs.
Compact byte[]/char[] string representation is unchanged; only single-alloc fusion is
dropped. If this clears the crash, the NoZero window is the cause.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@github-actions

github-actions Bot commented Jul 20, 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)

@github-actions

github-actions Bot commented Jul 20, 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)
    • codenameone-maven-plugin: 0 findings (no issues)
    • core-unittests: 0 findings (no issues)
    • ios: 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 Jul 20, 2026

Copy link
Copy Markdown
Collaborator Author

Compared 147 screenshots: 147 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.

@shai-almog

shai-almog commented Jul 20, 2026

Copy link
Copy Markdown
Collaborator Author

Compared 147 screenshots: 147 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.

@shai-almog
shai-almog merged commit c8c120e into master Jul 20, 2026
58 checks passed
@shai-almog
shai-almog deleted the parparvm-perf-improvements branch July 20, 2026 17:46
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.

1 participant