Commit 854e2cb8

854e2cb8fa12Merged

Yukihiro "Matz" Matsumoto <[email protected]> · 5 months ago · 3 files · +2 added · ~1 modified

Description

Register the empty symbol literal :"" so it has a table entry

:"" is a real SymbolNode whose content is the empty string, but collect_sym_names routes every symbol through collect_sym_name_into, which skips "" to guard the param-name callers that can pass a blank. With no table entry, compile_symbol_literal fell through to the sp_sym_intern fallback -- a helper emitted only when the intern path is otherwise needed -- so a bare :"" failed to link with undefined reference to sp_sym_intern.

Register the empty content directly in the SymbolNode arm (a SymbolNode with "" content is unambiguously :""), so it gets a sym-table slot and lowers to ((sp_sym)N) like any other non-identifier symbol.

Fixes #1321

Co-Authored-By: Claude Opus 4.8 [email protected]

Details

Commit
854e2cb8fa12
Parent
0408f5ac26d4

spinel_analyze.rbmodifiedView file

@@ -28035,7 +28035,17 @@
2803528035 t = @nd_type[i]
2803628036 if t == "SymbolNode"
2803728037 sname = @nd_content[i]
28038- collect_sym_name_into(local, sname)
28038+ # The empty symbol `:""` is a real SymbolNode whose content is "".
28039+ # collect_sym_name_into skips "" (it guards param-name callers that
28040+ # can pass a blank), so register it directly here; without an entry
28041+ # compile_symbol_literal falls back to the unemitted sp_sym_intern.
28042+ if sname == ""
28043+ if not_in("", local) == 1
28044+ local.push("")
28045+ end
28046+ else
28047+ collect_sym_name_into(local, sname)
28048+ end
2803928049 end
2804028050 if t == "BlockNode"
2804128051 collect_proc_param_sym_names(local, i, 0)