Skip to content

CSSThemeCompiler: #Constants, font-size and box semantics matching the build-time compiler - #6032

Merged
shai-almog merged 61 commits into
masterfrom
css-theme-compiler-parity-6024
Oct 22, 2026
Merged

shai-almog merged 61 commits into
masterfrom
css-theme-compiler-parity-6024

Conversation

@shai-almog

Copy link
Copy Markdown
Collaborator

Fixes #6024.

The runtime CSS compiler (com.codename1.ui.css.CSSThemeCompiler, used for live reload and by apps that build themes on device) now matches the build-time compiler (CSSTheme) on constants, fonts and spacing.

Theme constants

  • #Constants { ... } is a constants block alongside @constants. Any number of blocks are allowed, in any position, and they are excluded from UIID rule processing.
  • Constant and custom-property names keep their case (includeNativeBool -> @includeNativeBool). Before, var(--myColor) could not find a :root{--myColor:...} declaration.
  • Quoted values are decoded ('true' / "true" -> true), and a ; inside quotes no longer splits the declaration.
  • --name inside #Constants becomes @name, as in the build-time compiler.

Fonts

  • font-family + font-size resolve to a real Font. Before, the raw family string was stored and never resolved at runtime.
  • Size conversions follow CSSTheme/Resources: px, pt (/72*25.4 mm), mm, cm, in, rem, vw/vh/vmin/vmax, % of medium, and the size keywords.
  • The family defaults to native:MainRegular, so a size alone works. Family and size are tracked per UIID state and combine across rules.
  • Without a running Display (e.g. IsCssValid), font declarations are validated but no Font is created.

Padding / margin

  • 1-4 value shorthand is stored in the theme's top,bottom,left,right order. It used to be stored in CSS order, so sides were swapped.
  • Per-side padUnit/marUnit are emitted: px/pt/bare numbers as rounded pixels (as CSSTheme does), mm/cm as mm, % as screen percentage, and rem/vw/vh/vmin/vmax with their own units.
  • Malformed values throw CSSSyntaxException.

Behaviour changes

  • @constants{primaryColor:...} now yields @primaryColor (was @primarycolor).
  • Multi-value padding/margin now land on the correct sides.
  • The two existing assertions that pinned the old output are updated.

Tests

  • CSSThemeCompilerTest: the issue's examples, every shorthand length, mixed units, state-specific fonts and spacing, resolved Style values, and the existing @constants behaviour.
  • New RuntimeCompilerParityTest (maven/css-compiler): compiles one sheet with both compilers and compares constants, padding, margin and unit arrays.
  • All in-tree scripts/*/common/src/main/css/theme.css compile exactly as they do on master. The three that fail (rgba() colours, a display-dependent background-image) fail identically there.

🤖 Generated with Claude Code

…e build-time compiler

Fixes #6024.

- #Constants is a constants block like @constants, wherever it sits; constant
  and custom-property names keep their case and quoted values are unquoted.
- font-family/font-size build a Font with the build-time compiler's unit
  conversions, per UIID state, even when declared in separate rules.
- padding/margin expand 1-4 values into top,bottom,left,right storage order
  and emit padUnit/marUnit per side (px/pt pixels, mm/cm, %, rem, vw...).

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

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 16, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review 🔄 Running since 2026-10-21T10:28:52.863286Z 1e4c9c3 Manual request
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 63a6e3843d

ℹ️ 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".

Comment thread CodenameOne/src/com/codename1/ui/css/CSSThemeCompiler.java Outdated
Comment thread CodenameOne/src/com/codename1/ui/css/CSSThemeCompiler.java
Comment thread CodenameOne/src/com/codename1/ui/css/CSSThemeCompiler.java Outdated
@github-actions

github-actions Bot commented Oct 16, 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

Copy link
Copy Markdown
Contributor

Cloudflare Preview

@shai-almog

shai-almog commented Oct 16, 2026 •

Copy link
Copy Markdown
Collaborator Author

Compared 178 screenshots: 178 matched.

Native Android coverage

  • 📊 Line coverage: 17.40% (30679/176345 lines covered) [HTML preview] (artifact android-coverage-report, jacocoAndroidReport/html/index.html)
    • Other counters: instruction 15.70% (144888/923101), branch 10.66% (10013/93896), complexity 8.22% (7449/90604), method 12.01% (5157/42930), class 20.74% (1059/5105)
    • Lowest covered classes
      • kotlin.collections.kotlin.collections.ArraysKt___ArraysKt – 0.00% (0/6367 lines covered)
      • kotlin.collections.unsigned.kotlin.collections.unsigned.UArraysKt___UArraysKt – 0.00% (0/2384 lines covered)
      • org.jacoco.agent.rt.internal_0e20598.asm.org.jacoco.agent.rt.internal_0e20598.asm.ClassReader – 0.00% (0/1524 lines covered)
      • org.jacoco.agent.rt.internal_0e20598.asm.org.jacoco.agent.rt.internal_0e20598.asm.MethodWriter – 0.00% (0/922 lines covered)
      • kotlin.sequences.kotlin.sequences.SequencesKt___SequencesKt – 0.00% (0/736 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/625 lines covered)
      • com.codename1.androidcompat.rt.com.codename1.androidcompat.rt.TextXmlPullParser – 0.00% (0/623 lines covered)
      • com.codename1.androidcompat.androidx.constraintlayout.core.widgets.com.codename1.androidcompat.androidx.constraintlayout.core.widgets.Flow – 0.00% (0/576 lines covered)

✅ Native Android screenshot tests passed.

Native Android coverage

  • 📊 Line coverage: 17.40% (30679/176345 lines covered) [HTML preview] (artifact android-coverage-report, jacocoAndroidReport/html/index.html)
    • Other counters: instruction 15.70% (144888/923101), branch 10.66% (10013/93896), complexity 8.22% (7449/90604), method 12.01% (5157/42930), class 20.74% (1059/5105)
    • Lowest covered classes
      • kotlin.collections.kotlin.collections.ArraysKt___ArraysKt – 0.00% (0/6367 lines covered)
      • kotlin.collections.unsigned.kotlin.collections.unsigned.UArraysKt___UArraysKt – 0.00% (0/2384 lines covered)
      • org.jacoco.agent.rt.internal_0e20598.asm.org.jacoco.agent.rt.internal_0e20598.asm.ClassReader – 0.00% (0/1524 lines covered)
      • org.jacoco.agent.rt.internal_0e20598.asm.org.jacoco.agent.rt.internal_0e20598.asm.MethodWriter – 0.00% (0/922 lines covered)
      • kotlin.sequences.kotlin.sequences.SequencesKt___SequencesKt – 0.00% (0/736 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/625 lines covered)
      • com.codename1.androidcompat.rt.com.codename1.androidcompat.rt.TextXmlPullParser – 0.00% (0/623 lines covered)
      • com.codename1.androidcompat.androidx.constraintlayout.core.widgets.com.codename1.androidcompat.androidx.constraintlayout.core.widgets.Flow – 0.00% (0/576 lines covered)

Benchmark Results

Detailed Performance Metrics

Metric Duration
SIMD kernel backend scalar fallback (no native SIMD)
SIMD int-add (64K x300) java 263ms / native 69ms = 3.8x speedup
SIMD float-mul (64K x300) java 126ms / native 121ms = 1.0x 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 51.000 ms
Base64 CN1 decode 47.000 ms
Base64 native encode 315.000 ms
Base64 encode ratio (CN1/native) 0.162x (83.8% faster)
Base64 native decode 144.000 ms
Base64 decode ratio (CN1/native) 0.326x (67.4% faster)
Image encode benchmark status skipped (SIMD unsupported)

@shai-almog

shai-almog commented Oct 16, 2026 •

Copy link
Copy Markdown
Collaborator Author

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

…base

- Unquoted color literals in a constants block are stored as plain hex, as the
  build-time compiler stores them; consumers parse them with parseInt(v, 16).
- A constant whose name ends in Image resolves to the resource image and a
  missing one fails the compile; getThemeImageConstant casts to Image, which
  is unchecked on iOS.
- Fonts are built after all rules: a state that sets only family or size takes
  the other from the base style (and a dark style from the light one).

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

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 821dc2cb05

ℹ️ 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".

Comment thread CodenameOne/src/com/codename1/ui/css/CSSThemeCompiler.java Outdated
Comment thread CodenameOne/src/com/codename1/ui/css/CSSThemeCompiler.java Outdated
Comment thread CodenameOne/src/com/codename1/ui/css/CSSThemeCompiler.java
…erive-aware state fonts

- Constants blocks are applied again in source order, so a later declaration
  wins against :root and in-rule custom properties; the first pass still makes
  them visible to rules above the block.
- A constant written as var(--x) is normalized to plain hex once resolved if
  it is a color.
- A state font missing family or size completes it from the UIID's base style
  and then each cn1-derive parent's matching state and base, as the build-time
  compiler's flattening does.

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

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: bc3cbf4a2d

ℹ️ 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".

Comment thread CodenameOne/src/com/codename1/ui/css/CSSThemeCompiler.java Outdated
An image constant written as var(--x) is looked up once variables are
resolved, so a custom property declared after the constants block (or in
:root) no longer fails the compile with an unresolved image name.

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

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 51a606ec92

ℹ️ 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".

Comment thread CodenameOne/src/com/codename1/ui/css/CSSThemeCompiler.java Outdated
Comment thread CodenameOne/src/com/codename1/ui/css/CSSThemeCompiler.java Outdated
Comment thread CodenameOne/src/com/codename1/ui/css/CSSThemeCompiler.java Outdated
Comment thread CodenameOne/src/com/codename1/ui/css/CSSThemeCompiler.java
Comment thread CodenameOne/src/com/codename1/ui/css/CSSThemeCompiler.java
@github-actions

github-actions Bot commented Oct 16, 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)
    • ✅ core-unittests: 0 findings (no issues)
    • ✅ ios: 0 findings (no issues)
    • ✅ javac: 0 findings (no issues)
    • ✅ project-model: 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 Oct 16, 2026 •

Copy link
Copy Markdown
Collaborator Author

Compared 193 screenshots: 193 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 62ms / native 4ms = 15.5x speedup
SIMD float-mul (64K x300) java 56ms / native 5ms = 11.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 75.000 ms
Base64 CN1 decode 89.000 ms
Base64 SIMD encode 104.000 ms
Base64 encode ratio (SIMD/CN1) 1.387x (38.7% slower)
Base64 SIMD decode 99.000 ms
Base64 decode ratio (SIMD/CN1) 1.112x (11.2% slower)
Image encode benchmark iterations 100
Image createMask (SIMD off) 11.000 ms
Image createMask (SIMD on) 7.000 ms
Image createMask ratio (SIMD on/off) 0.636x (36.4% faster)
Image applyMask (SIMD off) 44.000 ms
Image applyMask (SIMD on) 63.000 ms
Image applyMask ratio (SIMD on/off) 1.432x (43.2% slower)
Image modifyAlpha (SIMD off) 63.000 ms
Image modifyAlpha (SIMD on) 18.000 ms
Image modifyAlpha ratio (SIMD on/off) 0.286x (71.4% faster)
Image modifyAlpha removeColor (SIMD off) 37.000 ms
Image modifyAlpha removeColor (SIMD on) 18.000 ms
Image modifyAlpha removeColor ratio (SIMD on/off) 0.486x (51.4% faster)

ParparVM vs HotSpot (JDK 25): Windows x64

Runner CPU: AMD64 Family 25 Model 1 Stepping 1, AuthenticAMD (baseline windows-x64@amd64-family-25-model-1-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.31x (base 1.22x, +7.4%) 0.75x (base 0.94x, -19.7%) ok
translator (self) 4 0.69x (base 0.60x, +14.1%) 0.56x (base 0.54x, +3.7%) ok
intArithmetic 4 1.19x (base 1.10x, +8.2%) 0.06x (base 0.06x, +4.4%) ok
longArithmetic 4 1.08x (base 1.08x, -0.1%) 0.05x (base 0.05x, +0.8%) ok
mathTranscendental 4 0.77x (base 0.79x, -2.3%) 0.06x (base 0.06x, -4.5%) ok
arraySequential 4 1.35x (base 1.36x, -1.1%) 0.39x (base 0.39x, +0.2%) ok
arrayRandom 4 1.04x (base 1.06x, -1.9%) 0.23x (base 0.23x, -0.0%) ok
objectAllocation 4 1.61x (base 1.56x, +3.2%) 0.31x (base 0.39x, -18.7%) ok
valueEscape 4 0.10x (base 0.10x, +0.3%) 0.04x (base 0.04x, -0.3%) ok
hashMapChurn 4 1.73x (base 1.80x, -3.7%) 0.10x (base 0.09x, +3.9%) ok
stringBuilding 4 1.30x (base 1.22x, +7.2%) 0.29x (base 0.32x, -8.7%) ok
recursion 4 1.49x (base 1.49x, -0.3%) 0.06x (base 0.06x, -1.5%) ok
quicksort 4 1.13x (base 1.13x, -0.5%) 0.12x (base 0.12x, -0.6%) ok

Result: no regression

@shai-almog

shai-almog commented Oct 16, 2026 •

Copy link
Copy Markdown
Collaborator Author

Compared 193 screenshots: 193 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.78x (base 0.85x, -8.4%) 0.91x (base 0.83x, +9.2%) ok
translator (self) 4 0.52x (base 0.50x, +4.0%) 0.49x (base 0.52x, -6.4%) ok
intArithmetic 4 1.14x (base 1.12x, +2.0%) 0.08x (base 0.06x, +35.0%) ok
longArithmetic 4 1.08x (base 1.08x, -0.0%) 0.05x (base 0.05x, +0.5%) ok
mathTranscendental 4 1.09x (base 1.08x, +0.4%) 0.08x (base 0.07x, +2.2%) ok
arraySequential 4 2.01x (base 2.00x, +0.1%) 0.36x (base 0.36x, -0.2%) ok
arrayRandom 4 1.02x (base 0.91x, +12.6%) 0.23x (base 0.21x, +8.8%) ok
objectAllocation 4 1.63x (base 1.65x, -1.1%) 0.30x (base 0.37x, -18.3%) ok
valueEscape 4 0.10x (base 0.10x, -0.4%) 0.06x (base 0.04x, +33.5%) ok
hashMapChurn 4 1.50x (base 1.48x, +1.1%) 0.09x (base 0.09x, -7.4%) ok
stringBuilding 4 1.40x (base 1.39x, +0.9%) 0.26x (base 0.26x, +2.2%) ok
recursion 4 1.19x (base 1.25x, -5.2%) 0.07x (base 0.08x, -2.1%) ok
quicksort 4 1.11x (base 1.07x, +3.4%) 0.11x (base 0.11x, -2.0%) ok

Result: no regression

@shai-almog

shai-almog commented Oct 16, 2026 •

Copy link
Copy Markdown
Collaborator Author

Compared 193 screenshots: 193 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.94x (base 1.02x, -8.0%) 0.77x (base 0.93x, -17.9%) ok
translator (self) 4 0.72x (base 0.70x, +3.5%) 0.47x (base 0.51x, -7.6%) ok
intArithmetic 4 1.04x (base 1.04x, -0.1%) 0.03x (base 0.03x, -1.2%) ok
longArithmetic 4 0.79x (base 0.79x, -0.1%) 0.03x (base 0.03x, -3.4%) ok
mathTranscendental 4 1.10x (base 1.10x, +0.3%) 0.03x (base 0.03x, -0.4%) ok
arraySequential 4 0.35x (base 0.36x, -3.5%) 0.37x (base 0.37x, -0.0%) ok
arrayRandom 4 0.93x (base 0.94x, -0.2%) 0.20x (base 0.20x, -0.0%) ok
objectAllocation 4 1.95x (base 1.77x, +10.5%) 0.38x (base 0.37x, +2.4%) ok
valueEscape 4 0.51x (base 0.51x, -0.1%) 0.03x (base 0.03x, -2.4%) ok
hashMapChurn 4 0.84x (base 0.84x, -0.1%) 0.12x (base 0.12x, -0.1%) ok
stringBuilding 4 1.51x (base 1.57x, -3.6%) 0.26x (base 0.26x, -0.2%) ok
recursion 4 1.56x (base 1.43x, +8.6%) 0.03x (base 0.04x, -4.3%) ok
quicksort 4 0.99x (base 0.99x, +0.1%) 0.09x (base 0.09x, +0.5%) ok

Result: no regression

@shai-almog

shai-almog commented Oct 16, 2026 •

Copy link
Copy Markdown
Collaborator Author

Compared 193 screenshots: 193 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 50ms / native 3ms = 16.6x speedup
SIMD float-mul (64K x300) java 48ms / native 3ms = 16.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 61.000 ms
Base64 CN1 decode 71.000 ms
Base64 SIMD encode 81.000 ms
Base64 encode ratio (SIMD/CN1) 1.328x (32.8% slower)
Base64 SIMD decode 73.000 ms
Base64 decode ratio (SIMD/CN1) 1.028x (2.8% slower)
Image encode benchmark iterations 100
Image createMask (SIMD off) 6.000 ms
Image createMask (SIMD on) 2.000 ms
Image createMask ratio (SIMD on/off) 0.333x (66.7% faster)
Image applyMask (SIMD off) 21.000 ms
Image applyMask (SIMD on) 25.000 ms
Image applyMask ratio (SIMD on/off) 1.190x (19.0% slower)
Image modifyAlpha (SIMD off) 22.000 ms
Image modifyAlpha (SIMD on) 15.000 ms
Image modifyAlpha ratio (SIMD on/off) 0.682x (31.8% faster)
Image modifyAlpha removeColor (SIMD off) 27.000 ms
Image modifyAlpha removeColor (SIMD on) 14.000 ms
Image modifyAlpha removeColor ratio (SIMD on/off) 0.519x (48.1% 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.02x (base 1.11x, -8.2%) 0.76x (base 0.75x, +1.5%) ok
translator (self) 4 0.86x (base 0.84x, +3.1%) 0.49x (base 0.51x, -3.5%) ok
intArithmetic 4 1.04x (base 1.04x, -0.0%) 0.06x (base 0.06x, +1.2%) ok
longArithmetic 4 0.79x (base 0.80x, -0.2%) 0.06x (base 0.06x, +1.6%) ok
mathTranscendental 4 0.72x (base 0.72x, -0.3%) 0.06x (base 0.06x, +0.1%) ok
arraySequential 4 0.37x (base 0.46x, -19.7%) 0.39x (base 0.39x, +0.0%) ok
arrayRandom 4 0.94x (base 0.94x, +0.4%) 0.23x (base 0.23x, +0.1%) ok
objectAllocation 4 1.75x (base 2.81x, -37.6%) 0.41x (base 0.43x, -5.4%) ok
valueEscape 4 0.76x (base 0.76x, +0.1%) 0.05x (base 0.05x, +1.6%) ok
hashMapChurn 4 0.98x (base 0.98x, -0.4%) 0.11x (base 0.12x, -7.6%) ok
stringBuilding 4 1.56x (base 1.43x, +9.2%) 0.27x (base 0.27x, -0.4%) ok
recursion 4 1.42x (base 1.46x, -3.0%) 0.06x (base 0.07x, -0.5%) ok
quicksort 4 1.00x (base 1.00x, -0.5%) 0.12x (base 0.12x, -0.2%) ok

Result: no regression

@shai-almog

shai-almog commented Oct 16, 2026 •

Copy link
Copy Markdown
Collaborator Author

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

Benchmark Results

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

Build and Run Timing

Metric Duration
Simulator Boot 75000 ms
Simulator Boot (Run) 3000 ms
App Install 19000 ms
App Launch 5000 ms
Test Execution 451000 ms

Detailed Performance Metrics

Metric Duration
SIMD kernel backend SSE2 (x64) / NEON (arm64) native kernels
SIMD int-add (64K x300) java 217ms / native 3ms = 72.3x speedup
SIMD float-mul (64K x300) java 241ms / native 9ms = 26.7x 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 110.000 ms
Base64 CN1 decode 79.000 ms
Base64 native encode 2687.000 ms
Base64 encode ratio (CN1/native) 0.041x (95.9% faster)
Base64 native decode 1521.000 ms
Base64 decode ratio (CN1/native) 0.052x (94.8% faster)
Base64 SIMD encode 87.000 ms
Base64 encode ratio (SIMD/CN1) 0.791x (20.9% faster)
Base64 SIMD decode 109.000 ms
Base64 decode ratio (SIMD/CN1) 1.380x (38.0% slower)
Base64 encode ratio (SIMD/native) 0.032x (96.8% faster)
Base64 decode ratio (SIMD/native) 0.072x (92.8% faster)
Image encode benchmark iterations 100
Image createMask (SIMD off) 11.000 ms
Image createMask (SIMD on) 3.000 ms
Image createMask ratio (SIMD on/off) 0.273x (72.7% faster)
Image applyMask (SIMD off) 90.000 ms
Image applyMask (SIMD on) 41.000 ms
Image applyMask ratio (SIMD on/off) 0.456x (54.4% faster)
Image modifyAlpha (SIMD off) 64.000 ms
Image modifyAlpha (SIMD on) 75.000 ms
Image modifyAlpha ratio (SIMD on/off) 1.172x (17.2% slower)
Image modifyAlpha removeColor (SIMD off) 48.000 ms
Image modifyAlpha removeColor (SIMD on) 313.000 ms
Image modifyAlpha removeColor ratio (SIMD on/off) 6.521x (552.1% slower)

@shai-almog

shai-almog commented Oct 16, 2026 •

Copy link
Copy Markdown
Collaborator Author

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

@shai-almog

shai-almog commented Oct 16, 2026 •

Copy link
Copy Markdown
Collaborator Author

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

@shai-almog

shai-almog commented Oct 16, 2026 •

Copy link
Copy Markdown
Collaborator Author

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

Benchmark Results

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

Build and Run Timing

Metric Duration
Simulator Boot 83000 ms
Simulator Boot (Run) 1000 ms
App Install 21000 ms
App Launch 4000 ms
Test Execution 557000 ms

Detailed Performance Metrics

Metric Duration
SIMD kernel backend SSE2 (x64) / NEON (arm64) native kernels
SIMD int-add (64K x300) java 63ms / native 3ms = 21.0x speedup
SIMD float-mul (64K x300) java 77ms / native 3ms = 25.6x 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 124.000 ms
Base64 CN1 decode 78.000 ms
Base64 native encode 1725.000 ms
Base64 encode ratio (CN1/native) 0.072x (92.8% faster)
Base64 native decode 1589.000 ms
Base64 decode ratio (CN1/native) 0.049x (95.1% faster)
Base64 SIMD encode 112.000 ms
Base64 encode ratio (SIMD/CN1) 0.903x (9.7% faster)
Base64 SIMD decode 118.000 ms
Base64 decode ratio (SIMD/CN1) 1.513x (51.3% slower)
Base64 encode ratio (SIMD/native) 0.065x (93.5% faster)
Base64 decode ratio (SIMD/native) 0.074x (92.6% faster)
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) 704.000 ms
Image applyMask (SIMD on) 186.000 ms
Image applyMask ratio (SIMD on/off) 0.264x (73.6% faster)
Image modifyAlpha (SIMD off) 502.000 ms
Image modifyAlpha (SIMD on) 61.000 ms
Image modifyAlpha ratio (SIMD on/off) 0.122x (87.8% faster)
Image modifyAlpha removeColor (SIMD off) 118.000 ms
Image modifyAlpha removeColor (SIMD on) 580.000 ms
Image modifyAlpha removeColor ratio (SIMD on/off) 4.915x (391.5% slower)

…braces, state-first font fallback

Image constants are looked up after every rule ran, so a cn1-mutable-image
can supply one. Only the winning declaration of a constant decides whether
it is reinterpreted as an image or a var() color. A quoted brace no longer
ends a rule. A state font searches the matching state along the derive
chain before any unselected style. The GUI builder normalizer keeps the
units the compiler already stored instead of resetting them to px.

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

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

theme.put(key, resolveVars(theme, (String) value));

P2 Badge Stop cyclic constants from hanging variable resolution

When a constants block contains a self-reference or cycle, such as #Constants { a: var(--a); } or a: var(--b); b: var(--a);, this call enters resolveVars(), which repeatedly replaces one var() with another without cycle detection or a progress bound. Compilation then never returns, potentially freezing live reload or the GUI builder; detect repeated keys and reject cyclic constant definitions.


theme.put(key, resolveVars(theme, (String) value));

P2 Badge Preserve var() text in quoted constants

When a quoted string happens to contain variable syntax, for example #Constants { message: "var(--name)"; }, quote information has already been discarded before this unconditional pass, so the literal message is replaced with the value of --name (or with an empty string if it is undefined). The build-time compiler treats this as a string value, so only declarations that were originally unquoted variable expressions should be resolved.

ℹ️ 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".

Comment thread CodenameOne/src/com/codename1/ui/css/CSSThemeCompiler.java
Comment thread CodenameOne/src/com/codename1/ui/css/CSSThemeCompiler.java
Comment thread CodenameOne/src/com/codename1/ui/css/CSSThemeCompiler.java Outdated
…cyclic vars, * font fallback

rgba() color constants are stored as their RGB hex. A quoted constant is
a string: its var() text is not resolved, and comment delimiters inside
quotes are text. A cyclic var() reference is a syntax error instead of a
compile that never returns. A state font falls back to the * style after
the derive chain. The GUI builder test that used font-size as its example
of an unsupported declaration now uses font-style, since the canvas
compiler supports font-size.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ble stays text for its aliases

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

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: daee10eec5

ℹ️ 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".

Comment thread CodenameOne/src/com/codename1/ui/css/CSSThemeCompiler.java Outdated
Comment thread CodenameOne/src/com/codename1/ui/css/CSSThemeCompiler.java Outdated
Comment thread CodenameOne/src/com/codename1/ui/css/CSSThemeCompiler.java Outdated
Comment thread CodenameOne/src/com/codename1/ui/css/CSSThemeCompiler.java Outdated
…amed chains typed by their leading token, universal font-size not validated, escaped #Constants selector recognised

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

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 07e0d66a90

ℹ️ 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".

Comment thread CodenameOne/src/com/codename1/ui/css/CSSThemeCompiler.java
Comment thread CodenameOne/src/com/codename1/ui/css/CSSThemeCompiler.java
Comment thread CodenameOne/src/com/codename1/ui/css/CSSThemeCompiler.java Outdated
…d var() fallback is rejected like a direct one, hex escapes take ASCII digits only

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

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 617245d725

ℹ️ 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".

Comment thread CodenameOne/src/com/codename1/ui/css/CSSThemeCompiler.java
Comment thread CodenameOne/src/com/codename1/ui/css/CSSThemeCompiler.java
Comment thread CodenameOne/src/com/codename1/ui/css/CSSThemeCompiler.java
shai-almog and others added 2 commits October 21, 2026 11:46
…t's url() fallback is left out, an undefined font-size variable is passed over; GUI builder keeps the last medium variant like the build

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

Copy link
Copy Markdown
Collaborator Author

@codex review

shai-almog and others added 3 commits October 21, 2026 16:20
…abled states, as in the build

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ead again as a number

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

shai-almog commented Oct 21, 2026 •

Copy link
Copy Markdown
Collaborator Author

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

Benchmark Results

  • VM Translation Time: 0 seconds
  • Compilation Time: 450 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 63ms / native 3ms = 21.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 47.000 ms
Base64 CN1 decode 54.000 ms
Image encode benchmark iterations 100
Image createMask (SIMD off) 12.000 ms
Image createMask (SIMD on) 6.000 ms
Image createMask ratio (SIMD on/off) 0.500x (50.0% faster)
Image applyMask (SIMD off) 71.000 ms
Image applyMask (SIMD on) 70.000 ms
Image applyMask ratio (SIMD on/off) 0.986x (1.4% faster)
Image modifyAlpha (SIMD off) 84.000 ms
Image modifyAlpha (SIMD on) 69.000 ms
Image modifyAlpha ratio (SIMD on/off) 0.821x (17.9% faster)
Image modifyAlpha removeColor (SIMD off) 83.000 ms
Image modifyAlpha removeColor (SIMD on) 56.000 ms
Image modifyAlpha removeColor ratio (SIMD on/off) 0.675x (32.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.77x (base 0.96x, -19.1%) 0.86x (base 0.93x, -6.6%) ok
translator (self) 3 0.60x (base 0.62x, -4.2%) 0.54x (base 0.58x, -6.7%) ok
intArithmetic 3 1.09x (base 1.03x, +5.0%) 0.12x (base 0.12x, +0.4%) ok
longArithmetic 3 1.04x (base 1.03x, +1.8%) 0.11x (base 0.07x, +58.7%) ok
mathTranscendental 3 1.03x (base 1.01x, +2.4%) 0.12x (base 0.12x, +0.6%) ok
arraySequential 3 0.43x (base 0.42x, +3.2%) 0.53x (base 0.53x, +0.1%) ok
arrayRandom 3 1.00x (base 0.99x, +1.0%) 0.32x (base 0.32x, -0.2%) ok
objectAllocation 3 1.04x (base 1.11x, -5.9%) 0.81x (base 0.72x, +11.4%) ok
valueEscape 3 0.51x (base 0.51x, +0.3%) 0.08x (base 0.09x, -4.7%) ok
hashMapChurn 3 1.00x (base 1.18x, -14.7%) 0.08x (base 0.07x, +13.4%) ok
stringBuilding 3 0.87x (base 0.84x, +3.2%) 0.47x (base 0.46x, +1.0%) ok
recursion 3 1.18x (base 1.24x, -4.3%) 0.11x (base 0.12x, -2.6%) ok
quicksort 3 0.99x (base 1.01x, -2.6%) 0.11x (base 0.11x, +0.2%) ok

Result: no regression

shai-almog and others added 7 commits October 22, 2026 04:16
…r already moved are dropped or re-anchored)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… queries with an ASCII fold, not the device locale

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…e, per-side padding/margin, rgba/transparent/opacity, the full CSS named-color table

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…e the build, keep .unselected rules out of the other states

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… lengths in #Constants, drop combinator selectors

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… compound media queries, decode escaped UIIDs

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…keep hex escapes out of the combinator check

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

shai-almog commented Oct 22, 2026 •

Copy link
Copy Markdown
Collaborator Author

Compared 193 screenshots: 193 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 44ms / native 3ms = 14.6x speedup
SIMD float-mul (64K x300) java 44ms / native 2ms = 22.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 60.000 ms
Base64 CN1 decode 73.000 ms
Base64 SIMD encode 92.000 ms
Base64 encode ratio (SIMD/CN1) 1.533x (53.3% slower)
Base64 SIMD decode 81.000 ms
Base64 decode ratio (SIMD/CN1) 1.110x (11.0% slower)
Image encode benchmark iterations 100
Image createMask (SIMD off) 8.000 ms
Image createMask (SIMD on) 4.000 ms
Image createMask ratio (SIMD on/off) 0.500x (50.0% faster)
Image applyMask (SIMD off) 22.000 ms
Image applyMask (SIMD on) 21.000 ms
Image applyMask ratio (SIMD on/off) 0.955x (4.5% faster)
Image modifyAlpha (SIMD off) 25.000 ms
Image modifyAlpha (SIMD on) 11.000 ms
Image modifyAlpha ratio (SIMD on/off) 0.440x (56.0% faster)
Image modifyAlpha removeColor (SIMD off) 27.000 ms
Image modifyAlpha removeColor (SIMD on) 15.000 ms
Image modifyAlpha removeColor ratio (SIMD on/off) 0.556x (44.4% faster)

…iler's parity code

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

github-actions Bot commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

Flutter vs Codename One

No benchmark results were produced.

@github-actions

Copy link
Copy Markdown
Contributor

✅ ByteCodeTranslator Quality Report

Test & Coverage

  • ✅ Tests: 879 total, 0 failed, 57 skipped

Benchmark Results

  • Execution Time: 5950 ms

  • Hotspots (Top 20 sampled methods):

    • 6.96% com.codename1.tools.translator.BytecodeMethod.equals (67 samples)
    • 6.44% com.codename1.tools.translator.IteratorEscape.ctorOnlyStoresParamsIntoThis (62 samples)
    • 5.09% java.lang.Object.hashCode (49 samples)
    • 4.99% java.lang.System.identityHashCode (48 samples)
    • 3.43% com.codename1.tools.translator.IteratorEscape.mangle (33 samples)
    • 3.43% java.lang.StringBuilder.append (33 samples)
    • 3.22% java.util.ArrayList.indexOf (31 samples)
    • 2.49% java.util.AbstractCollection.containsAll (24 samples)
    • 2.08% com.codename1.tools.translator.bytecodes.Invoke.resolveDirectTarget (20 samples)
    • 1.98% com.codename1.tools.translator.JavascriptReachability.enqueueResolved (19 samples)
    • 1.98% com.codename1.tools.translator.Parser.cullMethods (19 samples)
    • 1.77% java.lang.String.equals (17 samples)
    • 1.77% com.codename1.tools.translator.ByteCodeClass.fillVirtualMethodTable (17 samples)
    • 1.77% java.util.HashMap.hash (17 samples)
    • 1.56% com.codename1.tools.translator.ReachabilityCull.run (15 samples)
    • 1.35% com.codename1.tools.translator.classfile.analysis.Frame.execute (13 samples)
    • 1.35% com.codename1.tools.translator.BytecodeMethod.updateInlinableFieldDependencies (13 samples)
    • 1.25% com.codename1.tools.translator.ByteCodeClass.hasDeclaredMethod (12 samples)
    • 0.94% java.io.FileOutputStream.open0 (9 samples)
    • 0.94% com.codename1.tools.translator.classfile.analysis.SourceInterpreter.merge (9 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.

The compiler runs on the EDT, so Hashtable's locking buys nothing. Only
the theme map itself stays a Hashtable, since that is the Resources API type.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@shai-almog
shai-almog merged commit b579d46 into master Oct 22, 2026
36 of 58 checks passed
@shai-almog
shai-almog deleted the css-theme-compiler-parity-6024 branch October 22, 2026 11:26
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.

CSSThemeCompiler: support theme constants, font sizes, and spacing semantics for parity

1 participant