diff --git a/App/lib/Stub/StubGen/VpiReader.vp b/App/lib/Stub/StubGen/VpiReader.vp index 92e7d75..546101c 100644 --- a/App/lib/Stub/StubGen/VpiReader.vp +++ b/App/lib/Stub/StubGen/VpiReader.vp @@ -1741,6 +1741,7 @@ def _lookup_vpi_ret_annot(src_sha1: str, cls_name: str, method_name: str) -> str """Look up a method's cached return-annotation string; None if not found.""" if _g_vpi_ret_keys is None or _g_vpi_ret_count == 0: return None if src_sha1 is None or method_name is None: return None + sha1_len: sizet = string.strlen(src_sha1) key_buf: bytes = _vpi_method_key(src_sha1, cls_name, method_name) if key_buf is None: return None i: int diff --git a/App/lib/core/Gen/Expr/ExprGenOps.vp b/App/lib/core/Gen/Expr/ExprGenOps.vp index 011e2ad..0ea2d69 100644 --- a/App/lib/core/Gen/Expr/ExprGenOps.vp +++ b/App/lib/core/Gen/Expr/ExprGenOps.vp @@ -400,7 +400,7 @@ novirtual class ExprGenOps(ExprGenBase.ExprGenBase): mod_path = om_buf_mg # package submodules (`intr.idt`) count as known when the package is imported if self.Gen.ImportsGen.is_module_imported_or_known(trans._imported_modules, mod_path) == 0: return None - gv: mlirlite.GlobalVariable* = self.Gen.ExprGenAttr.find_global_in_module(trans.Module, self.Gen.FuncGenBase._mangle_name_with_sha1(self.Gen.ExprGenAttr._lookup_module_sha1(mod_path), at.attr)) + gv: mlirlite.GlobalVariable* = self.Gen.ExprGenAttr.find_global_in_module(trans.Module, self.Gen.FuncGenBase._mangle_name_with_sha1(self.Gen.CallGenBase._lookup_module_sha1(mod_path), at.attr)) if gv is None: gv = self.Gen.ExprGenAttr.find_global_in_module(trans.Module, at.attr) if gv is None or gv.Ty is None: return None # a global is usually `Element*` / `Element**` or an array `[N]Element`: descend to the leaf type