diff --git a/lib/core/Handles/HandlesFunctions.py b/lib/core/Handles/HandlesFunctions.py index 7d070a1..761fb07 100644 --- a/lib/core/Handles/HandlesFunctions.py +++ b/lib/core/Handles/HandlesFunctions.py @@ -1398,7 +1398,10 @@ class FunctionHandle(BaseHandle): # 任何 @name 或 @name(args) 只要不是内置装饰器,都视为自定义行为装饰器 behavior_decorators = [] # 内置装饰器名称,这些由编译器特殊处理,不作为行为装饰器 - _BUILTIN_DECORATORS = {'staticmethod', 'property', 'classmethod'} + # 另含**编译期生命期标注**(P2):@life(willFree(...)) 与 @willFree(...) 是纯标注, + # 没有运行时装饰器函数;不排除会生成 wrapper 去调用不存在的 @life/@willFree, + # 并把被装饰的 extern def(如 stdlib.free)变成本模块 internal 声明(llc 报 linkage 错)。 + _BUILTIN_DECORATORS = {'staticmethod', 'property', 'classmethod', 'life', 'willFree'} _symtab: object = self.Trans.SymbolTable if Node.decorator_list: for decorator in Node.decorator_list: