[pypy-svn] rev 2042 - pypy/trunk/src/pypy/translator
sanxiyn at codespeak.net
sanxiyn at codespeak.net
Fri Oct 24 20:07:53 CEST 2003
Author: sanxiyn
Date: Fri Oct 24 20:07:52 2003
New Revision: 2042
Modified:
pypy/trunk/src/pypy/translator/gencl.py
Log:
tweaks
Modified: pypy/trunk/src/pypy/translator/gencl.py
==============================================================================
--- pypy/trunk/src/pypy/translator/gencl.py (original)
+++ pypy/trunk/src/pypy/translator/gencl.py Fri Oct 24 20:07:52 2003
@@ -34,7 +34,7 @@
"lt": "<",
"le": "<=",
"eq": "=",
- "getitem": "aref",
+ "getitem": "elt",
}
def op_binary(self, op):
s = self.str
@@ -50,12 +50,12 @@
def op_alloc_and_set(self):
s = self.str
result, (size, init) = self.result, self.args
- print "(setq", s(result), "(make-array", s(size)
- print ":initial-element", s(init), "))"
+ print "(setq", s(result), "(make-array", s(size), "))"
+ print "(fill", s(result), s(init), ")"
def op_setitem(self):
s = self.str
(array, index, element) = self.args
- print "(setf (aref", s(array), s(index), ")", s(element), ")"
+ print "(setf (elt", s(array), s(index), ")", s(element), ")"
class GenCL:
def __init__(self, fun):
More information about the Pypy-commit
mailing list