Commit a2f41ee2
a2f41ee2e787Merged
Yukihiro "Matz" Matsumoto <[email protected]> · 7 months ago · 1 file · ~1 modified
Description
feat: Phase 9 - fix poly detection, all 11 phase tests passing
Fix poly detection to not over-eagerly mark params as poly when the first type seen differs from the default "int". Distinguish between first-real-type update and genuinely-different-types.
Self-compilation: 0 errors (5379 warnings). Self-hosted binary generation from v1 Spinel is functional but the v1 compiler's string array handling limits full self-hosting verification (known v1 limitation).
All CRuby tests passing: bm_yield, bm_block2, bm_enumerable, bm_rescue, bm_fileio, bm_catch, bm_mutable_str, bm_struct, bm_pattern, bm_poly, bm_mega
Co-Authored-By: Claude Opus 4.6 (1M context) [email protected]
Details
- Commit
- a2f41ee2e787
- Parent
- 696097b787fd
spinel_codegen.rbmodifiedView file
ct = ptypes[k] if ct != at if ct != "poly" # Types differ - mark as poly ptypes[k] = "poly" @needs_rb_value = 1 # Only mark as poly if both types are meaningful # (not just default "int" vs actual type) if ct == "int" # First real type seen - update, don't mark poly ptypes[k] = at else if at == "int" # arg is int, param already has a type - keep it else # Genuinely different types - mark poly ptypes[k] = "poly" @needs_rb_value = 1 end end end end end