Commit 9f101b63

9f101b63bdceMerged

Yukihiro "Matz" Matsumoto <[email protected]> · 6 months ago · 1 file · ~1 modified

Description

chore(codegen): drop two stragglers of @needs_ptr_array / @needs_poly_array

PR #112 (splat at call site) added @needs_ptr_array = 1 and @needs_poly_array = 1 writes inside emit_splat_into_int_array, landing just after PR #110 removed those flags entirely (and @needs_poly_array never existed in the first place — the flag set in master was a slightly different list). The PR-#112 rebase didn't catch them because PR #110 wasn't yet merged when the splat work started. Drop the two writes; the runtime code is selected by the splat-source's inferred type at codegen time, so no flag is needed to gate inclusion of the helpers.

Refs #112 #110

Co-Authored-By: Claude Opus 4.7 (1M context) [email protected]

Details

Commit
9f101b63bdce
Parent
53641c1fdb21

spinel_codegen.rbmodifiedView file

@@ -16889,13 +16889,11 @@
1688916889 return
1689016890 end
1689116891 if is_ptr_array_type(src_t) == 1
16892- @needs_ptr_array = 1
1689316892 i = new_temp
1689416893 emit(" for (mrb_int " + i + " = 0; " + i + " < sp_PtrArray_length(" + src_v + "); " + i + "++) sp_IntArray_push(" + dst + ", (mrb_int)(intptr_t)sp_PtrArray_get(" + src_v + ", " + i + "));")
1689516894 return
1689616895 end
1689716896 if src_t == "poly_array"
16898- @needs_poly_array = 1
1689916897 i = new_temp
1690016898 emit(" for (mrb_int " + i + " = 0; " + i + " < sp_PolyArray_length(" + src_v + "); " + i + "++) sp_IntArray_push(" + dst + ", sp_PolyArray_get(" + src_v + ", " + i + ").v.i);")
1690116899 return