diff --git a/App/lib/Phase/Phase2/__init__.vp b/App/lib/Phase/Phase2/__init__.vp index 2134031..b17bec2 100644 --- a/App/lib/Phase/Phase2/__init__.vp +++ b/App/lib/Phase/Phase2/__init__.vp @@ -840,6 +840,8 @@ def RunMultiFileProject(mb: memhub.MemBuddy*, source_dir: str, temp_dir: str, ou done_flags[i] = 1 completed_this_pass += 1 continue + # [TEMP dbg] 阶段日志:定位 Phase A 崩溃点(定位后移除) + VLogger.info(f"PhaseA translating: {ent.Path}", "PhaseA") # Compute the package name (the directory part relative to source_dir) src_dir_len_pa: sizet = string.strlen(source_dir) pkg_pa: str = None diff --git a/App/lib/Stub/StubGen/Converter.vp b/App/lib/Stub/StubGen/Converter.vp index 79962c7..d56bf24 100644 --- a/App/lib/Stub/StubGen/Converter.vp +++ b/App/lib/Stub/StubGen/Converter.vp @@ -659,8 +659,10 @@ def _PyiClass(buf: bytes, buf_size: sizet, pos: sizet, cls: ast.ClassDef*, inden # _GeneratePyiFromAst - walk the AST Module and emit .vpi stub content into buf. # Returns bytes written (0 on failure); rel_path should be absolute for error attribution. -def _GeneratePyiFromAst(mb: memhub.MemBuddy*, tree: ast.AST*, rel_path: str, buf: bytes, buf_size: sizet) -> sizet: - """Generate .vpi stub content from an AST into buf""" +def _GeneratePyiFromAst(mb: memhub.MemBuddy*, tree: ast.AST*, rel_path: str, buf: bytes, buf_size: sizet) -> sizet: + """Generate .vpi stub content from an AST into buf""" + # [TEMP dbg] 阶段日志:进入 vpi 生成(定位崩溃点,定位后移除) + VLogger.info(f"vpi.gen: {rel_path}", "StubGen") if tree is None or buf is None or buf_size == 0: return 0 # Error attribution: point "current file" at the file being stubbed. Callers must pass diff --git a/App/lib/core/Gen/Translator.vp b/App/lib/core/Gen/Translator.vp index 673a146..6349d3a 100644 --- a/App/lib/core/Gen/Translator.vp +++ b/App/lib/core/Gen/Translator.vp @@ -381,6 +381,8 @@ novirtual class Translator: """Translate the AST into LLVM IR.""" if tree is None: return 1 if _mbuddy is None: return 1 + # [TEMP dbg] 阶段日志:定位崩溃点(定位后移除) + VLogger.info(f"TR.enter sha1={self.ModuleSha1}", "TR") pool: memhub.MemBuddy* = _mbuddy @@ -453,6 +455,8 @@ novirtual class Translator: # (现场:Test/NewLifetimeTest 未 import stdlib,拿不到 stdlib vpi 的 declare)。 free_func: mlirlite.Function* = mlirlite.create_declare(decl_pool, mod, "free", void_ty_decl) if free_func is not None: mlirlite.add_param(decl_pool, free_func, i8_ptr_ty, "p") + # [TEMP dbg] 阶段日志:模块前言完成(定位崩溃点,定位后移除) + VLogger.info("TR.prelude.done", "TR") # Check whether the user defined a main function has_user_main: int = 0