Author: Ronan Lamy <[email protected]>
Branch: annotator
Changeset: r68748:67d83f7a3bc7
Date: 2014-01-17 21:00 +0000
http://bitbucket.org/pypy/pypy/changeset/67d83f7a3bc7/
Log: add missing fallbacks for annotating binary operations
diff --git a/rpython/annotator/binaryop.py b/rpython/annotator/binaryop.py
--- a/rpython/annotator/binaryop.py
+++ b/rpython/annotator/binaryop.py
@@ -143,6 +143,14 @@
def coerce((obj1, obj2)):
return pair(obj1, obj2).union() # reasonable enough
+ def getitem((obj1, obj2)):
+ return s_ImpossibleValue
+ add = sub = mul = truediv = floordiv = div = mod = getitem
+ lshift = rshift = and_ = or_ = xor = delitem = getitem
+
+ def setitem((obj1, obj2), _):
+ return s_ImpossibleValue
+
# approximation of an annotation intersection, the result should be the
annotation obj or
# the intersection of obj and improvement
def improve((obj, improvement)):
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit