Commit 07f39336
07f393361b34Merged
Yukihiro "Matz" Matsumoto <[email protected]> · 6 months ago · 1 file · ~1 modified
Description
fix(codegen): ARGV[i] unboxes bigint index
ARGV[i] lowered to ((idx < sp_argv.len) ? sp_argv.data[(int)idx] : NULL) with idx = compile_arg0(...). A promote-widened bigint
i flowed in as sp_Bigint *, tripping the <-with-pointer
warning.
Use compile_arg0_as_int.
Promote-mode test count: 536 pass / 53 fail / 29 error -> 537 pass / 53 fail / 28 error. Default raise mode 618 / 0 / 0.
Co-Authored-By: Claude Opus 4.7 [email protected]
Details
- Commit
- 07f393361b34
- Parent
- ae80180a3f90
spinel_codegen.rbmodifiedView file
@@ -19621,7 +19621,7 @@
1962119621
end1962219622
if mname == "[]"1962319623
@needs_argv = 119624-
idx_expr = compile_arg0(nid)19624+
idx_expr = compile_arg0_as_int(nid)1962519625
return "((" + idx_expr + " < sp_argv.len) ? sp_argv.data[(int)" + idx_expr + "] : NULL)"1962619626
end1962719627
end