Files
ViperC/App
TermiNexus 0acbefafd8 feat(ffilib): runtime CDLL 生成 thunk(绝对路径 LoadLibraryA + 间接调用)
_emit_runtime_ffi_thunk 生成 define <name>(%p0..): Load(path) -> Sym(h,name) -> bitcast 成 <ret>(<params>)* -> call_indirect -> ret;符号名与普通 extern 一致(裸名),调用点零改动。路径与符号名用 ExprGenConst.create_global_string 落成常量操作数(GEP 由该助手处理)。约束:仅标量参数/返回值,结构体按值与变参 fail-fast;declare-only 阶段仍走普通 declare,避免同模块 define/declare 同名并存。
2026-10-24 22:20:55 +08:00
..