基本稳定
This commit is contained in:
1 parent
0a10b20dde
commit
a39b5da0f8
27 files changed
+392
-962
No files matched your search
@@ -631,8 +631,12 @@ class ClassHandle(BaseHandle):
|
||||
child_method: str = f"{ClassName}.{method_name}"
|
||||
new_methods.append(child_method)
|
||||
Gen.register_method(ClassName, child_method)
|
||||
covered_names.add(method_name)
|
||||
# 添加子类新增方法(不在父类中的)
|
||||
for m in Gen.class_methods[ClassName]:
|
||||
# 用快照遍历:register_method 会原地修改 class_methods,
|
||||
# 若遍历活列表会把父类独有方法(已由 register_method 追加)再次追加,
|
||||
# 导致 vtable 槽数与跨模块调用方推断不一致(如 MemBuddy 36 槽 vs 28 槽)。
|
||||
for m in list(Gen.class_methods[ClassName]):
|
||||
method_name: str = m.split('.')[-1] if '.' in m else m
|
||||
if method_name not in covered_names:
|
||||
new_methods.append(m)
|
||||
|
||||
Reference in new issue
Block a user