[pypy-svn] r25618 - in pypy/dist/pypy/translator/stackless: . test

hpk at codespeak.net hpk at codespeak.net
Sun Apr 9 13:35:10 CEST 2006


Author: hpk
Date: Sun Apr  9 13:35:10 2006
New Revision: 25618

Modified:
   pypy/dist/pypy/translator/stackless/   (props changed)
   pypy/dist/pypy/translator/stackless/test/   (props changed)
   pypy/dist/pypy/translator/stackless/transform.py
Log:
progress ... (thanks armin) now we segfault at least 
+ fixeol


Modified: pypy/dist/pypy/translator/stackless/transform.py
==============================================================================
--- pypy/dist/pypy/translator/stackless/transform.py	(original)
+++ pypy/dist/pypy/translator/stackless/transform.py	Sun Apr  9 13:35:10 2006
@@ -293,12 +293,12 @@
                          model.Constant(len(self.resume_points)+1, lltype.Signed)],
                         varoftype(lltype.Void)))
         # XXX add returntypes 
-        FUNCTYPE = lltype.FuncType([], lltype.Signed)
-        funcptr = lltype.functionptr(FUNCTYPE, "", graph=self.curr_graph)
-        #saveops.append(model.SpaceOperation(
-        #    "setfield", [var_header, model.Constant("function", lltype.Void), 
-        #                 model.Constant(llmemory.fakeaddress(funcptr), llmemory.Address)],
-        #                varoftype(lltype.Void)))
+
+        funcptr = rtyper.type_system.getcallable(self.curr_graph)
+        saveops.append(model.SpaceOperation(
+            "setfield", [var_header, model.Constant("function", lltype.Void), 
+                         model.Constant(llmemory.fakeaddress(funcptr), llmemory.Address)],
+                        varoftype(lltype.Void)))
 
         type_repr = rclass.get_type_repr(rtyper)
         c_unwindexception = model.Constant(type_repr.convert_const(code.UnwindException), type_repr.lowleveltype)



More information about the Pypy-commit mailing list