[pypy-svn] r25479 - in pypy/dist/pypy: rpython rpython/memory translator/c

cfbolz at codespeak.net cfbolz at codespeak.net
Fri Apr 7 11:04:56 CEST 2006


Author: cfbolz
Date: Fri Apr  7 11:04:52 2006
New Revision: 25479

Modified:
   pypy/dist/pypy/rpython/llinterp.py
   pypy/dist/pypy/rpython/memory/gctransform.py
   pypy/dist/pypy/translator/c/exceptiontransform.py
   pypy/dist/pypy/translator/c/funcgen.py
Log:
(pedronis, cfbolz):

don't protect the call to RPyExceptionOccured


Modified: pypy/dist/pypy/rpython/llinterp.py
==============================================================================
--- pypy/dist/pypy/rpython/llinterp.py	(original)
+++ pypy/dist/pypy/rpython/llinterp.py	Fri Apr  7 11:04:52 2006
@@ -421,6 +421,8 @@
         frame = self.__class__(graph, args, self.llinterpreter, self)
         return frame.eval()
 
+    op_safe_call = op_direct_call
+
     def op_indirect_call(self, f, *args):
         graphs = args[-1]
         args = args[:-1]

Modified: pypy/dist/pypy/rpython/memory/gctransform.py
==============================================================================
--- pypy/dist/pypy/rpython/memory/gctransform.py	(original)
+++ pypy/dist/pypy/rpython/memory/gctransform.py	Fri Apr  7 11:04:52 2006
@@ -208,6 +208,9 @@
         result.extend(self.pop_alive(oldval))
         return result
 
+    def replace_safe_call(self, op, livevars, block):
+        return [SpaceOperation("direct_call", op.args, op.result)]
+
     def annotate_helper(self, ll_helper, ll_args, ll_result):
         assert not self.finished
         args_s = map(annmodel.lltype_to_annotation, ll_args)

Modified: pypy/dist/pypy/translator/c/exceptiontransform.py
==============================================================================
--- pypy/dist/pypy/translator/c/exceptiontransform.py	(original)
+++ pypy/dist/pypy/translator/c/exceptiontransform.py	Fri Apr  7 11:04:52 2006
@@ -249,7 +249,7 @@
         var_exc_occured = Variable()
         var_exc_occured.concretetype = lltype.Bool
         
-        block.operations.append(SpaceOperation("direct_call", [self.rpyexc_occured_ptr], var_exc_occured))
+        block.operations.append(SpaceOperation("safe_call", [self.rpyexc_occured_ptr], var_exc_occured))
         block.exitswitch = var_exc_occured
         #exception occurred case
         l = Link([error_value(returnblock.inputargs[0].concretetype)], returnblock)

Modified: pypy/dist/pypy/translator/c/funcgen.py
==============================================================================
--- pypy/dist/pypy/translator/c/funcgen.py	(original)
+++ pypy/dist/pypy/translator/c/funcgen.py	Fri Apr  7 11:04:52 2006
@@ -354,6 +354,7 @@
     # the following works since the extra arguments that indirect_call has
     # is of type Void, which is removed by OP_DIRECT_CALL
     OP_INDIRECT_CALL = OP_DIRECT_CALL
+    OP_SAFE_CALL = OP_DIRECT_CALL  #XXX: add a trivial gc transformer
 
     def check_directcall_result(self, op):
         return None



More information about the Pypy-commit mailing list