12.8 切片 1:寄存器码骨架(MOVE/LOADK/RET)。

- Codegen.h/cpp:帧寄存器(0 起声明序)、常量表、函数表、小端映像拼装
- 切片 1 范围:PROGRAM 标量 + 字面量 LOADK + 变量 MOVE + RET;其余构造报 codegen error
- codegen_test:23 断言(用例 01 空 MAIN 出 RET、02 LOADK r0/r1 + 常量表),ctest 9/9
This commit is contained in:
2026-08-21 11:32:31 +08:00
parent d296a9215e
commit 66359a0a26
5 changed files with 486 additions and 1 deletions
+2 -1
View File
@@ -12,7 +12,8 @@ add_library(compiler STATIC
./src/Project.cpp
./src/Parser.cpp
./src/Linker.cpp
./src/Typecheck.cpp)
./src/Typecheck.cpp
./src/Codegen.cpp)
target_include_directories(compiler PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/include)
target_include_directories(compiler PRIVATE ${CMAKE_SOURCE_DIR}/third_party/tomlplusplus/include)