Commit 8651295c authored by Xavier Thompson's avatar Xavier Thompson

Improve 'recover' implementation

parent 38323671
......@@ -11399,16 +11399,11 @@ class RecoverNode(ExprNode):
error(self.pos, "Can only recover cypclass (not '%s')" % operand_type)
self.type = PyrexTypes.error_type
return self
if operand_type.is_qualified_cyp_class:
self.generate_runtime_check = operand_type.qualifier not in ('iso', 'iso~')
self.check_refcount_only = operand_type.qualifier in ('active', 'lock', 'locked')
if operand_type.qualifier == 'iso~':
self.type = operand_type
else:
self.type = PyrexTypes.cyp_class_qualified_type(operand_type.qual_base_type, 'iso~')
self.generate_runtime_check = operand_type.qualifier not in ('iso', 'iso~')
self.check_refcount_only = operand_type.qualifier in ('active', 'lock', 'locked')
if operand_type.qualifier == 'iso~':
self.type = operand_type
else:
self.generate_runtime_check = True
self.check_refcount_only = False
self.type = PyrexTypes.cyp_class_qualified_type(operand_type, 'iso~')
solid_operand = self.operand
while isinstance(solid_operand, TypecastNode) and not solid_operand.is_temp:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment