[pypy-svn] r65297 - in pypy/branch/pyjitpl5/pypy/jit/backend/cli: . test

antocuni at codespeak.net antocuni at codespeak.net
Mon May 18 17:33:31 CEST 2009


Author: antocuni
Date: Mon May 18 17:33:30 2009
New Revision: 65297

Modified:
   pypy/branch/pyjitpl5/pypy/jit/backend/cli/method.py
   pypy/branch/pyjitpl5/pypy/jit/backend/cli/test/test_zrpy_exception.py
Log:
actually store the result of guard_exception; more tests pass


Modified: pypy/branch/pyjitpl5/pypy/jit/backend/cli/method.py
==============================================================================
--- pypy/branch/pyjitpl5/pypy/jit/backend/cli/method.py	(original)
+++ pypy/branch/pyjitpl5/pypy/jit/backend/cli/method.py	Mon May 18 17:33:30 2009
@@ -87,6 +87,7 @@
 class Method(object):
 
     operations = [] # overwritten at the end of the module
+    debug = False
 
     def __init__(self, cpu, name, loop):
         self.cpu = cpu
@@ -204,6 +205,8 @@
 
     def emit_operations(self, operations):
         for op in operations:
+            if self.debug:
+                self.il.EmitWriteLine(op.repr())
             func = self.operations[op.opnum]
             assert func is not None
             func(self, op)
@@ -324,6 +327,10 @@
         self.il.Emit(OpCodes.Ldfld, self.exc_value_field)
         self.il.Emit(OpCodes.Isinst, clitype)
         self.il.Emit(OpCodes.Brfalse, il_label)
+        # the guard succeeded, store the result
+        self.av_inputargs.load(self)
+        self.il.Emit(OpCodes.Ldfld, self.exc_value_field)
+        self.store_result(op)
 
     def emit_op_jump(self, op):
         target = op.jump_target

Modified: pypy/branch/pyjitpl5/pypy/jit/backend/cli/test/test_zrpy_exception.py
==============================================================================
--- pypy/branch/pyjitpl5/pypy/jit/backend/cli/test/test_zrpy_exception.py	(original)
+++ pypy/branch/pyjitpl5/pypy/jit/backend/cli/test/test_zrpy_exception.py	Mon May 18 17:33:30 2009
@@ -15,8 +15,6 @@
 
     test_bridge_from_guard_exception = skip_loop
     
-    test_bridge_from_guard_no_exception = skip
-    test_exception_from_outside = skip
     test_exception_from_outside_2 = skip
     test_exception_two_cases = skip
     test_exception_two_cases_2 = skip



More information about the Pypy-commit mailing list