Repository navigation
Reduce bootstrap object-store dispatch to five indy bindings - #181
Merged
Merged
Conversation
mcculls
marked this pull request as ready for review
December 4, 2026 12:31
mcculls
force-pushed
the
mcculls/prune-dispatch-bindings
branch
3 times, most recently
from
December 4, 2026 13:01
cff0bf9 to
2c4461f
Compare
Share get/put fallbacks through weakGet/weakPut, remove cleanup from generated dispatch, and prelink the five remaining sites. Generate local and bootstrap glue with shared emitters and explicit call strategies. Apply name remapping last, removing bytecode readback and visitor rewrites. Compute frames at build time while preserving existing frames and stack limits in runtime transformers. Align generator structure with DefineClass conventions, name dispatch argument slots, and separate initialization from bootstrap method emission. Expand benchmarks across storage paths and test ObjectStore redirection through local and bootstrap dispatch.
mcculls
force-pushed
the
mcculls/prune-dispatch-bindings
branch
from
December 4, 2026 13:30
2c4461f to
9d8fa9b
Compare
1 task done
mhlidd
approved these changes
Dec 4, 2026
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.
What Does This Do
Reduce bootstrap object-store dispatch from eight to five
invokedynamicfallback sites.getandputshare the sites inweakGetandweakPut, and static cleanup stays on the original global store.Keys implementing
KeyWithValueuse injected accessors. Other keys take the operation's fallback. An accessor also falls back when it has no field for the requestedstoreId.The five remaining sites route to the original
GlobalObjectStore:Each
indyarrow is one call site.getandputreach their shared sites through static calls toweakGetandweakPut. The weak methods skip the accessor check, preventing recursion.For injected keys, compound operations use double-checked locking around accessor reads and writes, including any weak fallbacks. For other keys, each compound operation calls its own site directly. Static cleanup calls the original global store directly.
initializereceives a lookup scoped to the originalGlobalObjectStoreand prelinks all five sites asConstantCallSites. This binds bootstrap glue to the original store even though its class is not visible to the bootstrap loader; subsequent calls use those bound targets.Generate local and bootstrap glue through shared emitters with explicit call strategies and final name remapping, replacing bytecode readback and visitor rewrites. Stack frames are computed during generation.
Motivation
Avoid duplicate fallback bindings and simplify glue generation while preserving injected field access and fallback to the original global store.
Additional Notes
indySharedvariant. Direct-baseline cleanup explicitly sweeps its relocated store.Validation:
./gradlew :field-inject:check :field-inject:jmhJar --no-configuration-cachepassed, including SpotBugs and formatting checks.getHitbenchmark smoke tests passed for all 12 dispatch/storage combinations with two threads. These runs validate setup and execution, not performance.Contributor Checklist
main.Jira ticket: Not provided.