Skip to content

Support string keys in FastKeyedMap - #1408

Merged
Frotty merged 2 commits into
masterfrom
codex/fast-keyed-map-string-poc
Oct 9, 2026
Merged

Frotty merged 2 commits into
masterfrom
codex/fast-keyed-map-string-poc

Conversation

@Frotty

@Frotty Frotty commented Oct 9, 2026 •

Copy link
Copy Markdown
Member

FastKeyedMap currently excludes string keys despite Lua supporting them directly. This change lets the same new-generic API use FastKeyedMap<string, int> and string keys with class-reference values.

Companion stdlib PR: wurstscript/WurstStdlib2#507.

String specializations select same-package, annotated Jass fallbacks with collision-safe storage. Generic has/remove lower alongside put/get, and the IM interpreter selects those fallbacks using resolved type arguments. Lua reads remain direct table indices with typed defaults; writes/removal use the existing minimal table-operation intrinsics. The legacy handle API remains compatible.

Validation: all 35 LuaKeyedMapTests passed, including Jass and Lua execution, interpreter execution, full-string hash collisions, stored zero, class values, destroy/reuse, and byte-identical repeated emission. The stdlib typecheck and all 525 tests passed with an isolated compiler build on Java 27.

Supported types: handle and string keys. The source parameter is K:; stronger source-level key constraints/earlier diagnostics and integer/class keys remain follow-ups. Jass values remain int/class references. The pinned stdlib commit belongs to the companion PR and must be coordinated before merge.

@Frotty
Frotty marked this pull request as ready for review October 9, 2026 13:23
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 9, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-09T13:41:10.345275Z a691fc3 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b5dcb1e859

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@Frotty

Frotty commented Oct 9, 2026

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Already looking forward to the next diff.

Reviewed commit: a691fc3b81

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@Frotty Frotty changed the title PoC: support native string keys in FastKeyedMap Support string keys in FastKeyedMap Oct 9, 2026
@Frotty
Frotty merged commit 6c28d9f into master Oct 9, 2026
3 checks passed
@Frotty
Frotty deleted the codex/fast-keyed-map-string-poc branch October 9, 2026 13:58
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.

1 participant