-
Notifications
You must be signed in to change notification settings - Fork 433
Expand BytecodeInstructionIntegrationTest Coverage #4242
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Expand BytecodeInstructionIntegrationTest Coverage #4242
Conversation
…alVariable, BasicInstruction, and ArithmeticExpression. This change adds comprehensive unit tests and expands the integration test app to cover: - Synchronized methods (BasicInstruction.appendSynchronized) - Complex arithmetic expressions (ArithmeticExpression optimizations and binary operations) - LocalVariable matching and code generation - Array types and basic instructions It also upgrades ASM dependency to 9.7 to support Java 21 class files during testing.
|
👋 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 For security, I will only act on instructions from the user who triggered this task. New to Jules? Learn more at jules.google/docs. |
… Java 21 compatibility. Expanded `BytecodeInstructionIntegrationTest` to cover `BasicInstruction`, `LocalVariable`, and `ArithmeticExpression` more thoroughly by including unit tests for specific methods and expanding the integration test app (`BytecodeInstructionApp.java`) to use synchronized methods, complex arithmetic, and primitive arrays. Upgraded `asm` dependency to 9.7 in `vm/tests/pom.xml` and updated `Parser.java` to use `Opcodes.ASM9` to support parsing Java 21 class files. Fixed test compilation on Java 9+ environments by conditionally using `--patch-module` to override `java.base` classes with test stubs, while maintaining compatibility for older Java versions. Updated `CleanTargetIntegrationTest` to include necessary runtime stubs (`monitorEnterBlock`, `monitorExitBlock`, `fmod`, array classes) and link against the math library (`-lm`) in generated CMake projects, resolving linker errors during native compilation tests.
✅ ByteCodeTranslator Quality ReportTest & Coverage
Static Analysis
Generated automatically by the PR CI workflow. |
…alVariable, BasicInstruction, and ArithmeticExpression and ensure Java 21 compatibility. This change expands the integration tests to cover synchronized methods, arithmetic expressions, and primitive arrays. It updates `BytecodeInstructionIntegrationTest` to conditionally apply compiler flags for Java 9+ compatibility and ensures generated C code includes necessary runtime stubs (like `monitorEnterBlock` and `fmod`). Crucially, it updates `Parser.java` to dynamically detect the available ASM version (ASM9 or ASM5) to support both the Maven-based test environment (running on Java 21 with ASM 9.7) and the legacy Ant build system (using ASM 5.0.3). `vm/tests/pom.xml` is upgraded to use ASM 9.7 to enable parsing of Java 21 class files during tests.
✅ Continuous Quality ReportTest & Coverage
Static Analysis
Generated automatically by the PR CI workflow. |
…on, LocalVariable, and ArithmeticExpression Expanded BytecodeInstructionIntegrationTest to include unit tests and deeper integration tests covering: - LocalVariable: isRightVariable, getVarName, appendInstruction - BasicInstruction: getValue, isComplexInstruction, appendSynchronized, appendInstruction (AASTORE null check) - ArithmeticExpression: isOptimized, appendInstruction, addDependencies Updated BytecodeInstructionApp to exercise synchronized methods, arithmetic operations, and primitive arrays. Fixed native Segfault in generated code by refining array initialization logic and adding null checks to AASTORE in BasicInstruction. Configured integration tests to target Java 1.5 as requested (note: local verification skipped due to JDK 21 incompatibility with -source 1.5).
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |




























Expanded
BytecodeInstructionIntegrationTestto coverLocalVariable,BasicInstruction, andArithmeticExpressionclasses more thoroughly.Added unit tests within the integration test class to target specific methods like
isRightVariable,getVarName,appendInstruction.Updated
BytecodeInstructionAppsource code to include synchronized methods, complex arithmetic, and primitive array usage, ensuring these features are exercised during the integration test.Added assertions to verify generated C code contains expected patterns for these features.
Upgraded ASM to 9.7 and updated
Parser.javato useOpcodes.ASM9to allow testing with Java 21 environment.Fixed module system issues during test compilation by patching
java.base.PR created automatically by Jules for task 6981010519306132903 started by @shai-almog