summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Behnel <stefan_ml@behnel.de>2014-08-17 15:20:11 +0200
committerStefan Behnel <stefan_ml@behnel.de>2014-08-17 15:20:11 +0200
commit715b340a06ed73ba7e600a2f6669244017531b93 (patch)
tree3c140c8523656ae35b7ce209064e6c0fd8129c14
parent159f48a995d425cc891c3ac50f99b47edf39e9de (diff)
downloadcython-715b340a06ed73ba7e600a2f6669244017531b93.tar.gz
exclude types from method call optimisation again (thinko: we're dealing with the actual types here, not with their attributes)
-rw-r--r--Cython/Compiler/Optimize.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/Cython/Compiler/Optimize.py b/Cython/Compiler/Optimize.py
index be443ac13..14f10d131 100644
--- a/Cython/Compiler/Optimize.py
+++ b/Cython/Compiler/Optimize.py
@@ -3770,7 +3770,9 @@ class FinalOptimizePhase(Visitor.CythonTransform, Visitor.NodeRefCleanupMixin):
node.arg_tuple.mult_factor or (node.arg_tuple.is_literal and node.arg_tuple.args)):
# simple call, now exclude calls to objects that are definitely not methods
may_be_a_method = True
- if function.is_name:
+ if function.type is Builtin.type_type:
+ may_be_a_method = False
+ elif function.is_name:
if function.entry.is_builtin:
may_be_a_method = False
elif function.cf_state: