Skip to content

Conversation

@google-labs-jules
Copy link
Contributor

Implemented java.util.concurrent Executor framework from scratch to replace potential copyrighted code and ensure compatibility with the minimal ParparVM test harness.

Key changes:

  • Created clean-room implementations for Executor, ExecutorService, Future, Callable, Executors, FutureTask, LinkedBlockingQueue, AtomicInteger, and related exceptions in vm/JavaAPI.
  • Implemented SimpleThreadPool using standard Java synchronization (wait/notify) to avoid dependency on ReentrantLock and Unsafe.
  • Added ExecutorIntegrationTest in vm/tests which compiles a test application using the new framework, translates it to C, and verifies execution.
  • Updated CompilerHelper in vm/tests with necessary native stubs to support linking the new concurrent classes.
  • Verified compilation and basic execution logic.

PR created automatically by Jules for task 25243132648091636 started by @shai-almog

…ests

Implemented a clean-room, minimal version of java.util.concurrent Executor framework (Executor, ExecutorService, Future, Executors, FutureTask, LinkedBlockingQueue) in vm/JavaAPI. This implementation avoids Oracle-copyrighted code and complex dependencies to facilitate usage in the ParparVM native test environment.

Added ExecutorIntegrationTest in vm/tests to verify the framework compiles and executes correctly when translated to C. The test includes extensive native stubs to support the minimal runtime required for execution.
@google-labs-jules
Copy link
Contributor Author

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!


For security, I will only act on instructions from the user who triggered this task.

New to Jules? Learn more at jules.google/docs.

@github-actions
Copy link

github-actions bot commented Dec 25, 2025

✅ Continuous Quality Report

Test & Coverage

Static Analysis

Generated automatically by the PR CI workflow.

…ests

Implemented a clean-room, minimal version of java.util.concurrent Executor framework (Executor, ExecutorService, Future, Executors, FutureTask, LinkedBlockingQueue) in vm/JavaAPI. This implementation avoids Oracle-copyrighted code and complex dependencies to facilitate usage in the ParparVM native test environment.

Added ExecutorIntegrationTest in vm/tests to verify the framework compiles and executes correctly when translated to C. The test includes extensive native stubs to support the minimal runtime required for execution.
@shai-almog
Copy link
Collaborator

shai-almog commented Dec 25, 2025

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: 352 seconds
  • Compilation Time: 92 seconds

Detailed Performance Metrics

Metric Duration
Build Time Statistics
Setup & Unzip 35783 ms
Extract Extensions 25 ms
Google Services Setup 2 ms
Scan Classes 1686 ms
Extract Libs 830 ms
Inject Build Hints 59 ms
Generate Unit Tests 3 ms
Generate Stubs 1320 ms
Compile Stubs 2912 ms
Generate Icons 2597 ms
Prepare ParparVM 292 ms
ParparVM Execution 183541 ms
Post-VM Setup 135 ms
CocoaPods 4353 ms
Finalize 39 ms
Total Time 233578 msMaven Overhead : 119000 ms
CocoaPods Install (Script) 2000 ms
Simulator Boot (Run) 66000 ms
App Install 12000 ms
App Launch 5000 ms
Test Execution 167000 ms

@github-actions
Copy link

✅ ByteCodeTranslator Quality Report

Test & Coverage

  • Tests: 169 total, 0 failed, 2 skipped

Benchmark Results

  • Execution Time: 9766 ms

  • Hotspots (Top 20 sampled methods):

    • 23.70% java.lang.String.indexOf (405 samples)
    • 17.50% com.codename1.tools.translator.Parser.isMethodUsed (299 samples)
    • 15.21% com.codename1.tools.translator.Parser.addToConstantPool (260 samples)
    • 9.30% java.util.ArrayList.indexOf (159 samples)
    • 3.86% java.lang.Object.hashCode (66 samples)
    • 3.34% com.codename1.tools.translator.ByteCodeClass.calcUsedByNative (57 samples)
    • 2.69% java.lang.System.identityHashCode (46 samples)
    • 2.11% com.codename1.tools.translator.ByteCodeClass.fillVirtualMethodTable (36 samples)
    • 1.76% com.codename1.tools.translator.BytecodeMethod.equals (30 samples)
    • 1.40% com.codename1.tools.translator.BytecodeMethod.optimize (24 samples)
    • 1.35% java.lang.Integer.getChars (23 samples)
    • 1.23% com.codename1.tools.translator.Parser.cullMethods (21 samples)
    • 1.23% java.io.FileOutputStream.writeBytes (21 samples)
    • 1.23% java.lang.StringBuilder.append (21 samples)
    • 1.11% com.codename1.tools.translator.ByteCodeClass.markDependent (19 samples)
    • 0.94% java.io.FileOutputStream.open0 (16 samples)
    • 0.59% java.io.FileInputStream.open0 (10 samples)
    • 0.59% com.codename1.tools.translator.Parser.generateClassAndMethodIndexHeader (10 samples)
    • 0.53% com.codename1.tools.translator.BytecodeMethod.appendCMethodPrefix (9 samples)
    • 0.53% java.lang.StringCoding$StringEncoder.encode (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.

@shai-almog shai-almog marked this pull request as ready for review December 25, 2025 05:41
@shai-almog shai-almog merged commit 47ebae4 into master Dec 25, 2025
11 checks passed
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.

2 participants