Skip to content

Fix virtual method dispatch resolution - #201

Merged
dlunch merged 2 commits into
mainfrom
agent/invoke-virtual-dispatch
Aug 16, 2026
Merged

Fix virtual method dispatch resolution#201
dlunch merged 2 commits into
mainfrom
agent/invoke-virtual-dispatch

Conversation

@dlunch

@dlunch dlunch commented Aug 16, 2026

Copy link
Copy Markdown
Owner

Summary

  • require the symbolic owner in Jvm::invoke_virtual and resolve methods before receiver selection
  • preserve defining class loaders for runtime-package-aware public, protected, and package-private override checks
  • pass constant-pool owners from invokevirtual, migrate host call sites, and correct affected runtime prototype access flags
  • add a source-reproducible Java 8 dispatch fixture without adding marker tests under java_runtime/tests

Verification

  • cargo test --workspace (546 passed, 1 ignored)
  • cargo clippy --workspace --all-targets -- -D warnings
  • cargo fmt --all -- --check
  • git diff --check

Known limitations

  • the name-only class registry still limits direct multi-loader identity fixtures
  • linkage-error branches are implemented but do not use non-reproducible stale-binary fixtures

Copilot AI lite review requested due to automatic review settings August 16, 2026 11:32

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot wasn't able to review this pull request because it exceeds the maximum number of lines (20,000). Try reducing the number of changed lines and requesting a review from Copilot again.

@codecov

codecov Bot commented Aug 16, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 92.42922% with 369 lines in your changes missing coverage. Please review.
✅ Project coverage is 86.93%. Comparing base (95ebc5c) to head (47634dc).

Files with missing lines Patch % Lines
...e/src/classes/java/lang/abstract_string_builder.rs 23.33% 92 Missing ⚠️
...va_runtime/src/classes/java/text/decimal_format.rs 67.08% 26 Missing ⚠️
...me/src/classes/java/util/abstract_list_sub_list.rs 67.10% 25 Missing ⚠️
...va_runtime/src/classes/java/util/logging/logger.rs 71.76% 24 Missing ⚠️
java_runtime/src/classes/java/io/print_writer.rs 62.00% 19 Missing ⚠️
java_runtime/src/classes/java/util/abstract_map.rs 89.13% 15 Missing ⚠️
...classes/java/util/collections_unmodifiable_list.rs 50.00% 13 Missing ⚠️
...s/java/util/collections_unmodifiable_collection.rs 72.09% 12 Missing ⚠️
...ava_runtime/src/classes/java/lang/string_buffer.rs 92.80% 10 Missing ⚠️
...va_runtime/src/classes/java/util/hash_map_entry.rs 50.00% 10 Missing ⚠️
... and 42 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #201      +/-   ##
==========================================
+ Coverage   86.61%   86.93%   +0.32%     
==========================================
  Files         308      308              
  Lines       41539    44468    +2929     
==========================================
+ Hits        35979    38659    +2680     
- Misses       5560     5809     +249     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@dlunch
dlunch merged commit ba5797b into main Aug 16, 2026
15 checks passed
@dlunch
dlunch deleted the agent/invoke-virtual-dispatch branch August 16, 2026 12:01
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