Skip to content

Conversation

@shai-almog
Copy link
Collaborator

Motivation

  • The existing default-method support did not account for interface hierarchies, so a subinterface default method that calls super would not correctly replace the base interface entry in the virtual method table.
  • This could lead to incorrect generated C code where implementing classes point vtable slots at the base interface default instead of the overriding subinterface default.

Description

  • Add a helper isInterfaceInHierarchy to detect when a class name appears in an interface's inheritance chain.
  • Modify fillVirtualMethodTable to allow an interface method to replace a base-interface entry when the current class is an interface and the existing entry belongs to an interface in its hierarchy.
  • Add a regression test translatesDefaultInterfaceMethodOverridesWithSuperCalls in ParserTest which generates a base interface, derived interface that invokes super, and an implementation, and asserts both the derived method calls the base default and that the implementation points its vtable to the derived default.

Testing

  • Executed mvn -Dtest=ParserTest test in vm/tests to exercise the updated ParserTest including translatesDefaultInterfaceMethodOverridesWithSuperCalls.
  • The Maven run failed due to an unresolved dependency com.codename1.parparvm:ByteCodeTranslator:jar:1.0-SNAPSHOT, so the test suite could not complete in this environment.

Codex Task

@github-actions
Copy link

✅ Continuous Quality Report

Test & Coverage

Static Analysis

Generated automatically by the PR CI workflow.

@github-actions
Copy link

✅ ByteCodeTranslator Quality Report

Test & Coverage

  • Tests: 171 total, 0 failed, 2 skipped

Benchmark Results

  • Execution Time: 10262 ms

  • Hotspots (Top 20 sampled methods):

    • 22.67% java.lang.String.indexOf (399 samples)
    • 18.98% java.util.ArrayList.indexOf (334 samples)
    • 17.10% com.codename1.tools.translator.Parser.isMethodUsed (301 samples)
    • 5.57% com.codename1.tools.translator.BytecodeMethod.addToConstantPool (98 samples)
    • 5.34% java.lang.Object.hashCode (94 samples)
    • 3.24% com.codename1.tools.translator.ByteCodeClass.calcUsedByNative (57 samples)
    • 2.56% java.lang.System.identityHashCode (45 samples)
    • 1.88% com.codename1.tools.translator.BytecodeMethod.optimize (33 samples)
    • 1.70% com.codename1.tools.translator.Parser.generateClassAndMethodIndexHeader (30 samples)
    • 1.65% com.codename1.tools.translator.ByteCodeClass.markDependent (29 samples)
    • 1.36% java.io.FileOutputStream.writeBytes (24 samples)
    • 1.25% com.codename1.tools.translator.BytecodeMethod.appendMethodC (22 samples)
    • 1.14% com.codename1.tools.translator.Parser.cullMethods (20 samples)
    • 1.08% java.lang.StringBuilder.append (19 samples)
    • 0.74% java.io.FileOutputStream.open0 (13 samples)
    • 0.68% com.codename1.tools.translator.Parser.getClassByName (12 samples)
    • 0.57% java.io.FileInputStream.open0 (10 samples)
    • 0.51% com.codename1.tools.translator.BytecodeMethod.appendCMethodPrefix (9 samples)
    • 0.45% java.util.TreeMap.getEntry (8 samples)
    • 0.40% com.codename1.tools.translator.bytecodes.CustomInvoke.appendExpression (7 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
Copy link
Collaborator Author

shai-almog commented Jan 12, 2026

iOS screenshot updates

Compared 30 screenshots: 23 matched, 6 updated, 1 missing reference.

  • BrowserComponent — updated screenshot. Screenshot differs (1206x2622 px, bit depth 8).

    BrowserComponent
    Preview info: Preview provided by instrumentation.
    Full-resolution PNG saved as BrowserComponent.png in workflow artifacts.

  • graphics-draw-arc — updated screenshot. Screenshot differs (1206x2622 px, bit depth 8).

    graphics-draw-arc
    Preview info: JPEG preview quality 20; JPEG preview quality 20; downscaled to 603x1311.
    Full-resolution PNG saved as graphics-draw-arc.png in workflow artifacts.

  • graphics-draw-gradient — updated screenshot. Screenshot differs (1206x2622 px, bit depth 8).

    graphics-draw-gradient
    Preview info: JPEG preview quality 10; JPEG preview quality 10; downscaled to 844x1835.
    Full-resolution PNG saved as graphics-draw-gradient.png in workflow artifacts.

  • graphics-draw-round-rect — missing reference. Reference screenshot missing at /Users/runner/work/CodenameOne/CodenameOne/scripts/ios/screenshots/graphics-draw-round-rect.png.

    graphics-draw-round-rect
    Preview info: JPEG preview quality 10; JPEG preview quality 10; downscaled to 844x1835.
    Full-resolution PNG saved as graphics-draw-round-rect.png in workflow artifacts.

  • graphics-draw-string — updated screenshot. Screenshot differs (1206x2622 px, bit depth 8).

    graphics-draw-string
    Preview info: JPEG preview quality 10; JPEG preview quality 10; downscaled to 422x918.
    Full-resolution PNG saved as graphics-draw-string.png in workflow artifacts.

  • graphics-draw-string-decorated — updated screenshot. Screenshot differs (1206x2622 px, bit depth 8).

    graphics-draw-string-decorated
    Preview info: JPEG preview quality 10; JPEG preview quality 10; downscaled to 603x1311.
    Full-resolution PNG saved as graphics-draw-string-decorated.png in workflow artifacts.

  • kotlin — updated screenshot. Screenshot differs (1206x2622 px, bit depth 8).

    kotlin
    Preview info: Preview provided by instrumentation.
    Full-resolution PNG saved as kotlin.png in workflow artifacts.

Benchmark Results

  • VM Translation Time: 269 seconds
  • Compilation Time: 59 seconds

Detailed Performance Metrics

Metric Duration
Build Time Statistics
Setup & Unzip 23898 ms
Extract Extensions 13 ms
Google Services Setup 1 ms
Scan Classes 515 ms
Extract Libs 1016 ms
Inject Build Hints 25 ms
Generate Unit Tests 1 ms
Generate Stubs 825 ms
Compile Stubs 1897 ms
Generate Icons 896 ms
Prepare ParparVM 103 ms
ParparVM Execution 159000 ms
Post-VM Setup 144 ms
CocoaPods 4185 ms
Finalize 20 ms
Total Time 192540 msMaven Overhead : 77000 ms
CocoaPods Install (Script) 1000 ms
Simulator Boot (Run) 52000 ms
App Install 67000 ms
App Launch 10000 ms
Test Execution 139000 ms

@shai-almog shai-almog merged commit 1201717 into master Jan 12, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants