Skip to content

Conversation

@shai-almog
Copy link
Collaborator

Motivation

  • The BytecodeTranslator emitted "no class definition" errors for reflection-related types and java.io.Externalizable during translation, causing downstream iOS build steps to fail.
  • Providing minimal Java API stubs allows the translator to resolve these referenced types during writeOutput so classes are not purged or translation does not fail.
  • A missing xcodebuild in CI PATH is an environment/configuration issue that must be investigated separately and is not addressed by these stubs.

Description

  • Added stub interfaces under vm/JavaAPI/src/java/lang/reflect: GenericArrayType, ParameterizedType, TypeVariable, and WildcardType.
  • Added IO-related stubs under vm/JavaAPI/src/java/io: Externalizable, ObjectInput, and ObjectOutput.
  • Removed author tags from the new stub files to match repository style.

Testing

  • No automated tests were executed for this change.

Codex Task

@github-actions
Copy link

github-actions bot commented Jan 30, 2026

✅ Continuous Quality Report

Test & Coverage

Static Analysis

Generated automatically by the PR CI workflow.

@github-actions
Copy link

github-actions bot commented Jan 30, 2026

✅ ByteCodeTranslator Quality Report

Test & Coverage

  • Tests: 135 total, 0 failed, 2 skipped

Benchmark Results

  • Execution Time: 9692 ms

  • Hotspots (Top 20 sampled methods):

    • 24.02% java.lang.String.indexOf (404 samples)
    • 18.61% com.codename1.tools.translator.Parser.isMethodUsed (313 samples)
    • 15.87% com.codename1.tools.translator.Parser.addToConstantPool (267 samples)
    • 8.20% java.util.ArrayList.indexOf (138 samples)
    • 4.46% java.lang.Object.hashCode (75 samples)
    • 3.75% com.codename1.tools.translator.ByteCodeClass.calcUsedByNative (63 samples)
    • 2.08% java.lang.System.identityHashCode (35 samples)
    • 1.84% com.codename1.tools.translator.ByteCodeClass.fillVirtualMethodTable (31 samples)
    • 1.49% com.codename1.tools.translator.BytecodeMethod.optimize (25 samples)
    • 1.49% com.codename1.tools.translator.BytecodeMethod.equals (25 samples)
    • 0.95% java.io.FileOutputStream.open0 (16 samples)
    • 0.89% java.io.FileOutputStream.writeBytes (15 samples)
    • 0.83% com.codename1.tools.translator.Parser.cullMethods (14 samples)
    • 0.77% java.lang.Integer.getChars (13 samples)
    • 0.71% java.io.UnixFileSystem.getBooleanAttributes0 (12 samples)
    • 0.71% com.codename1.tools.translator.Parser.generateClassAndMethodIndexHeader (12 samples)
    • 0.65% java.io.FileInputStream.open0 (11 samples)
    • 0.65% org.objectweb.asm.ClassReader.readCode (11 samples)
    • 0.59% com.codename1.tools.translator.BytecodeMethod.isMethodUsedByNative (10 samples)
    • 0.54% java.lang.StringBuilder.append (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.

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