Author: Ronan Lamy <[email protected]>
Branch: annotator
Changeset: r68738:b23ad5ee76a0
Date: 2014-01-06 21:35 +0100
http://bitbucket.org/pypy/pypy/changeset/b23ad5ee76a0/
Log: kill FlowObjSpace.newbool()
diff --git a/rpython/flowspace/flowcontext.py b/rpython/flowspace/flowcontext.py
--- a/rpython/flowspace/flowcontext.py
+++ b/rpython/flowspace/flowcontext.py
@@ -620,7 +620,7 @@
return self.not_(op.is_(w_1, w_2).eval(self))
def cmp_exc_match(self, w_1, w_2):
- return self.space.newbool(self.space.exception_match(w_1, w_2))
+ return const(self.space.exception_match(w_1, w_2))
def COMPARE_OP(self, testnum):
w_2 = self.popvalue()
diff --git a/rpython/flowspace/objspace.py b/rpython/flowspace/objspace.py
--- a/rpython/flowspace/objspace.py
+++ b/rpython/flowspace/objspace.py
@@ -59,12 +59,6 @@
def build_flow(self, func):
return build_flow(func, self)
- def newbool(self, b):
- if b:
- return self.w_True
- else:
- return self.w_False
-
def newfunction(self, w_code, w_globals, defaults_w):
if not all(isinstance(value, Constant) for value in defaults_w):
raise FlowingError("Dynamically created function must"
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit