[pypy-svn] r13587 - pypy/dist/pypy/translator/c

arigo at codespeak.net arigo at codespeak.net
Sat Jun 18 21:07:32 CEST 2005


Author: arigo
Date: Sat Jun 18 21:07:29 2005
New Revision: 13587

Modified:
   pypy/dist/pypy/translator/c/database.py
   pypy/dist/pypy/translator/c/float_include.h
   pypy/dist/pypy/translator/c/node.py
Log:
Progress!  targetrpystone2 appears to run.  More inspection is needed to be
sure that it really does what it's supposed to.


Modified: pypy/dist/pypy/translator/c/database.py
==============================================================================
--- pypy/dist/pypy/translator/c/database.py	(original)
+++ pypy/dist/pypy/translator/c/database.py	Sat Jun 18 21:07:29 2005
@@ -112,6 +112,8 @@
 
     def cincrefstmt(self, expr, T):
         if isinstance(T, Ptr) and T._needsgc():
+            if expr == 'NULL':    # hum
+                return ''
             if T.TO == PyObject:
                 return 'Py_XINCREF(%s);' % expr
             else:

Modified: pypy/dist/pypy/translator/c/float_include.h
==============================================================================
--- pypy/dist/pypy/translator/c/float_include.h	(original)
+++ pypy/dist/pypy/translator/c/float_include.h	Sat Jun 18 21:07:29 2005
@@ -28,7 +28,7 @@
 #define OP_FLOAT_ADD(x,y,r,err)     r = x + y;
 #define OP_FLOAT_SUB(x,y,r,err)     r = x - y;
 #define OP_FLOAT_MUL(x,y,r,err)     r = x * y;
-
+#define OP_FLOAT_DIV(x,y,r,err)     r = x / y;
 
 /*** conversions ***/
 

Modified: pypy/dist/pypy/translator/c/node.py
==============================================================================
--- pypy/dist/pypy/translator/c/node.py	(original)
+++ pypy/dist/pypy/translator/c/node.py	Sat Jun 18 21:07:29 2005
@@ -109,6 +109,8 @@
                     line = '/* %s */' % line
                 yield '\t' + line
             yield '};'
+            if self.deallocator:
+                yield 'void %s(struct %s *);' % (self.deallocator, self.name)
 
         elif phase == 2:
             if self.static_deallocator:



More information about the Pypy-commit mailing list