diff --git a/App/lib/core/Gen/ExprGenName.vp b/App/lib/core/Gen/ExprGenName.vp index cdb03bc..0aadd15 100644 --- a/App/lib/core/Gen/ExprGenName.vp +++ b/App/lib/core/Gen/ExprGenName.vp @@ -980,7 +980,7 @@ class ExprGenName(ExprGenBase.ExprGenBase): si_lookup_gen: str = pool.alloc(128) if si_lookup_gen is not None: viperlib.snprintf(si_lookup_gen, 128, "%s.__setitem__", cls_nm_gen) - if find_func_in_module(mod, si_lookup_gen) is not None: + if ExprCallBase.find_func_in_module(mod, si_lookup_gen) is not None: return None # 指针类型: 单索引 GEP (getelementptr ty, ptr, idx) return llvmlite.build_gep(builder, elem_ty2, ptr_val, idx_val) diff --git a/App/lib/core/Handles/HandlesExprCall.vp b/App/lib/core/Handles/HandlesExprCall.vp index 3e37b39..80bd7e2 100644 --- a/App/lib/core/Handles/HandlesExprCall.vp +++ b/App/lib/core/Handles/HandlesExprCall.vp @@ -20,6 +20,7 @@ import lib.core.Handles.HandlesStruct as HandlesStruct import lib.core.Handles.HandlesImports as HandlesImports import lib.core.Handles.HandlesClassDef as HandlesClassDef import lib.core.StubMerger as StubMerger +import lib.core.Handles.ExprCallCall as ExprCallCall # ============================================================ @@ -217,7 +218,7 @@ class ExprCallHandle(HandlesBase.Mixin): # ============================================================ def HandleCall(self, node: ast.AST | t.CPtr) -> llvmlite.Value | t.CPtr: """翻译函数调用,从 self.Trans 获取共享状态""" - return translate_call( + return ExprCallCall.translate_call( self.Trans.Pool, self.Trans._cur_builder, self.Trans.Module, node, self.Trans._funcs, self.Trans._func_count, self.Trans) @@ -227,7 +228,7 @@ class ExprCallHandle(HandlesBase.Mixin): # ============================================================ def HandlePrintfCall(self, cl: ast.Call | t.CPtr): """翻译 printf 调用,从 self.Trans 获取共享状态""" - translate_printf_call( + ExprCallCall.translate_printf_call( self.Trans.Pool, self.Trans._cur_builder, self.Trans.Module, cl, self.Trans) @@ -236,6 +237,6 @@ class ExprCallHandle(HandlesBase.Mixin): # ============================================================ def HandlePrintCall(self, cl: ast.Call | t.CPtr): """翻译 print 调用(类型感知格式化 + 默认换行)""" - translate_print_call( + ExprCallCall.translate_print_call( self.Trans.Pool, self.Trans._cur_builder, self.Trans.Module, cl, self.Trans)