Add ParparVM annotations to disable debug and safety checks for hot Base64 methods#4732
Merged
liannacasper merged 14 commits intomasterfrom Apr 11, 2026
Merged
Conversation
Contributor
✅ Continuous Quality ReportTest & Coverage
Static Analysis
Generated automatically by the PR CI workflow. |
Collaborator
Android screenshot updatesCompared 36 screenshots: 35 matched, 1 updated.
Native Android coverage
Benchmark ResultsDetailed Performance Metrics
|
Contributor
✅ ByteCodeTranslator Quality ReportTest & Coverage
Benchmark Results
Static Analysis
Generated automatically by the PR CI workflow. |
Collaborator
|
Compared 36 screenshots: 36 matched. Benchmark Results
Detailed Performance Metrics
|
Contributor
|
Developer Guide build artifacts are available for download from this workflow run:
Developer Guide quality checks:
Unused image preview:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Motivation
Base64encoding/decoding routines to measure the effect of disabling those checks.Description
com.codename1.annotations.DisableDebugInfoandcom.codename1.annotations.DisableNullChecksAndArrayBoundsChecksto mark methods for reduced ParparVM emission.Parserto detect those annotations during method visit and set per-method flags onBytecodeMethodviasetDisableDebugInfoandsetDisableNullAndArrayBoundsChecks.LineNumberno longer emits__CN1_DEBUG_INFO(...)when debug info is disabled and array load/store code (andArrayLoadExpression) skipCHECK_ARRAY_ACCESS(...)/CHECK_ARRAY_ACCESS_WITH_ARGS(...)when null/array-bounds checks are disabled.Base64methods (decode(byte[],int,byte[]),decodeNoWhitespace(...),encodeNoNewline(...)) with the new annotations and add translator unit tests asserting suppression of debug and array-check emissions.Testing
BytecodeInstructionIntegrationTestwithmvn -pl tests -am -Dtest=BytecodeInstructionIntegrationTest -Dsurefire.failIfNoSpecifiedTests=false testand it passed: 31 tests, 0 failures.mvn -pl tests -Dtest=BytecodeInstructionIntegrationTest testwithout reactor build flags and also tried invoking Maven with a Java 8JAVA_HOME; those invocations initially failed due to environment-specific setup (missing JAVA_HOME path or missing module artifact), but the full translator test run above completed successfully.Codex Task