Skip to content

fix: complete map<string, number> unboxing and literal boxing#174

Merged
cs01 merged 1 commit intomainfrom
fix/next-improvement
Mar 10, 2026
Merged

fix: complete map<string, number> unboxing and literal boxing#174
cs01 merged 1 commit intomainfrom
fix/next-improvement

Conversation

@cs01
Copy link
Copy Markdown
Owner

@cs01 cs01 commented Mar 10, 2026

Summary

  • Extracts getParameterMapInfo and getThisFieldMapInfo helpers that return both key and value types (previously only key type was returned, value type was discarded)
  • Adds unboxStringMapGet helper to deduplicate ptrtoint→bitcast unbox logic across all 3 dispatch paths (local var, parameter, this-field)
  • Fixes literal numeric constants (e.g. 0.5) not being boxed in generateStringMapSet — the boxing code checked getVariableType() which returns null for constants
  • New test fixture: map-string-number-param.ts (multiple gets with float values)

Test plan

  • All 448 tests pass
  • Self-hosting passes (quick mode)
  • New test verifies float boxing (0.5) works correctly

🤖 Generated with Claude Code

… fix literal boxing

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@cs01 cs01 merged commit 02ea221 into main Mar 10, 2026
12 checks passed
@cs01 cs01 deleted the fix/next-improvement branch March 12, 2026 05:35
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