From: Stefan Behnel Date: Thu, 15 Apr 2010 14:25:13 +0000 (+0200) Subject: more type check removal during optimisations X-Git-Tag: 0.13.beta0~197 X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=fdf002736ff77acf8fd6af34e7dd298527b42be0;p=cython.git more type check removal during optimisations --- 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):