Repository navigation
Conversation
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.
FastKeyedMap currently accepts only handle keys. This change extends the existing API to string keys, so
new FastKeyedMap<string, int>()works with the matching compiler change.Companion compiler PR: wurstscript/WurstScript#1408.
The generic put/get/has/remove operations lower to native Lua table operations. Jass uses StringHash buckets with full string equality checks, preserves stored zero versus absence, and frees collision entries on remove and destroy. Legacy handle functions remain compatible. Tests cover colliding case variants, empty keys, overwrite, independent maps, removal and reuse.
Validation: grill install succeeded; grill typecheck succeeded and all 525 stdlib tests passed using an isolated build of the matching compiler on Java 27. The installed release compiler does not support the new intrinsics yet.
Supported types: handle and string keys, with int/class-reference values on Jass. Integer/class keys, a stronger source-level key bound, and broader Jass value support are follow-ups. Jass collision entries use the normal class allocator and its capacity limit; Lua creates no collision entries. This PR requires the companion compiler change before merge.