Commit 37d3a83c
37d3a83c1dfaMerged
Yukihiro "Matz" Matsumoto <[email protected]> · 8 months ago · 6 files · ~6 modified
Description
Support Module::Class.new, nested classes in modules, module origin_parser
- Module::Class.new(args) now resolves class from last path component in both type inference (type.c) and codegen (expr.c)
- Nested PM_CLASS_NODE and PM_MODULE_NODE inside module bodies are now detected and analyzed (enables lrama's deeply nested classes)
- module_info_t gains origin_parser field for correct constant pool access when emitting module code from required files
- Class deduplication prevents overflow from reopened classes
- Makefile: add codegen.h dependency to rebuild all on header change
- MAX_CLASSES raised to 160
lrama main.rb (71 files) now generates 2320 lines of C with all class/module/method structures resolved.
Co-Authored-By: Claude Opus 4.6 (1M context) [email protected]
Details
- Commit
- 37d3a83c1dfa
- Parent
- 1b83af115121
MakefilemodifiedView file
@@ -27,7 +27,7 @@
2727
spinel: $(OBJS) $(PRISM_LIB)2828
$(CC) $(OBJS) $(PRISM_LIB) -o $@2929
30-
src/%.o: src/%.c $(PRISM_LIB)30+
src/%.o: src/%.c src/codegen.h $(PRISM_LIB)3131
$(CC) $(CFLAGS) $(PRISM_CFLAGS) -c $< -o $@3232
3333
# Dependenciessrc/codegen.cmodifiedView file
Loading diff…
src/codegen.hmodifiedView file
Loading diff…
src/emit.cmodifiedView file
Loading diff…
src/expr.cmodifiedView file
Loading diff…
src/type.cmodifiedView file
Loading diff…