Commit ea60b9ff
ea60b9ff42fbMerged
Yukihiro "Matz" Matsumoto <[email protected]> · 7 months ago · 1 file · ~1 modified
Description
fix: initialize lambda ivars, fix void return in generate_code
- Add @lambda_counter/funcs/params/captures/insert_pos to initialize (was causing 'no member lambda_insert_pos' in self-compile)
- Add explicit 0 return at end of generate_code (was 'void value not ignored' from implicit return of emit_main)
Self-compile: 0 errors. Self-hosted fib: 5702887. Tests: 58/59, Benchmarks: 38/39.
Co-Authored-By: Claude Opus 4.6 (1M context) [email protected]
Details
- Commit
- ea60b9ff42fb
- Parent
- fa3b078eb6f9
spinel_codegen.rbmodifiedView file
@@ -158,6 +158,11 @@
158158
@module_names = "".split(",")159159
@module_body_ids = []160160
@pending_method_ref = ""161+
@lambda_counter = 0162+
@lambda_funcs = ""163+
@lambda_params = "".split(",")164+
@lambda_captures = "".split(",")165+
@lambda_insert_pos = 0161166
end162167
163168
def join_sep(arr, sep)@@ -5340,6 +5345,7 @@
53405345
# Emit lambda functions before main (they are generated during compilation)53415346
# We emit them in emit_main after forward declarations53425347
emit_main5348+
053435349
end53445350
53455351
def emit_header