From fdf002736ff77acf8fd6af34e7dd298527b42be0 Mon Sep 17 00:00:00 2001 From: Stefan Behnel Date: Thu, 15 Apr 2010 16:25:13 +0200 Subject: [PATCH] more type check removal during optimisations --- Cython/Compiler/Optimize.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Cython/Compiler/Optimize.py b/Cython/Compiler/Optimize.py index c9b24851..1a574f5f 100644 --- a/Cython/Compiler/Optimize.py +++ b/Cython/Compiler/Optimize.py @@ -1066,6 +1066,8 @@ class OptimizeBuiltinCalls(Visitor.EnvTransform): return arg else: return arg.coerce_to(node.type, self.current_env()) + if isinstance(arg, ExprNodes.PyTypeTestNode): + arg = arg.arg if isinstance(arg, ExprNodes.CoerceToPyTypeNode): if arg.type is PyrexTypes.py_object_type: if node.type.assignable_from(arg.arg.type): -- 2.26.2