将 EnumName/value/IsSigned 加入 FIELD_ROUTES,消除所有冗余 hasattr/getattr
This commit is contained in:
@@ -40,7 +40,7 @@ class DeleteHandle(BaseHandle):
|
||||
if ClassName:
|
||||
PropKey = f'{ClassName}.{AttrName}'
|
||||
PropInfo = self.Trans.SymbolTable.get(PropKey)
|
||||
if PropInfo and hasattr(PropInfo, 'MetaList') and FuncMeta.PROPERTY_DELETER in PropInfo.MetaList:
|
||||
if PropInfo and PropInfo.MetaList and FuncMeta.PROPERTY_DELETER in PropInfo.MetaList:
|
||||
SelfVar = Gen._get_var_ptr('self')
|
||||
if SelfVar:
|
||||
SelfPtr = Gen._load(SelfVar, name="self")
|
||||
@@ -54,7 +54,7 @@ class DeleteHandle(BaseHandle):
|
||||
if ClassName:
|
||||
PropKey = f'{ClassName}.{AttrName}'
|
||||
PropInfo = self.Trans.SymbolTable.get(PropKey)
|
||||
if PropInfo and hasattr(PropInfo, 'MetaList') and FuncMeta.PROPERTY_DELETER in PropInfo.MetaList:
|
||||
if PropInfo and PropInfo.MetaList and FuncMeta.PROPERTY_DELETER in PropInfo.MetaList:
|
||||
obj_val = self.Trans.ExprHandler.HandleExprLlvm(target.value)
|
||||
if obj_val:
|
||||
DeleterFunc = Gen._get_function(PropKey + '$del')
|
||||
|
||||
Reference in New Issue
Block a user