Author: Alex Gaynor <[email protected]>
Branch: numpy-exp
Changeset: r44167:93bea4761128
Date: 2011-05-14 11:59 -0500
http://bitbucket.org/pypy/pypy/changeset/93bea4761128/
Log: Clean up this design slightly.
diff --git a/pypy/module/micronumpy/interp_numarray.py
b/pypy/module/micronumpy/interp_numarray.py
--- a/pypy/module/micronumpy/interp_numarray.py
+++ b/pypy/module/micronumpy/interp_numarray.py
@@ -234,6 +234,7 @@
def compile(self):
if self.forced_result is not None:
return self.forced_result.compile()
+ return self._compile()
def force_if_needed(self):
if self.forced_result is None:
@@ -266,11 +267,7 @@
self.left = left
self.right = right
- def compile(self):
- result = VirtualArray.compile(self)
- if result is not None:
- return result
-
+ def _compile(self):
left_code = self.left.compile()
right_code = self.right.compile()
return left_code.merge(self.opcode, right_code)
@@ -281,10 +278,7 @@
self.function = function
self.values = values
- def compile(self):
- result = VirtualArray.compile(self)
- if result is not None:
- return result
+ def _compile(self):
return Code('', functions=[self.function]).merge('c',
self.values.compile())
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit