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

antocuni at codespeak.net antocuni at codespeak.net
Tue May 5 10:21:44 CEST 2009


Author: antocuni
Date: Tue May  5 10:21:43 2009
New Revision: 65048

Modified:
   pypy/branch/pyjitpl5/pypy/jit/backend/cli/runner.py
   pypy/branch/pyjitpl5/pypy/jit/backend/cli/test/test_basic.py
Log:
implement some of the exception handling logic. test_mod_ovf passes


Modified: pypy/branch/pyjitpl5/pypy/jit/backend/cli/runner.py
==============================================================================
--- pypy/branch/pyjitpl5/pypy/jit/backend/cli/runner.py	(original)
+++ pypy/branch/pyjitpl5/pypy/jit/backend/cli/runner.py	Tue May  5 10:21:43 2009
@@ -66,6 +66,27 @@
     def get_latest_value_obj(self, index):
         return self.inputargs.objs[index]
 
+    def get_exception(self):
+        exc_value = self.inputargs.exc_value
+        if exc_value:
+            assert False, 'TODO'
+        return ootype.cast_to_object(ootype.nullruntimeclass)
+
+    def get_exc_value(self):
+        if self.inputargs.exc_value:
+            assert False, 'TODO'
+        else:
+            return ootype.NULL
+
+    def clear_exception(self):
+        self.inputargs.exc_value = None
+
+    def set_overflow_error(self):
+        raise NotImplementedError
+
+    def set_zero_division_error(self):
+        raise NotImplementedError
+
     # ----------------------
 
     def do_new_with_vtable(self, args, typedescr):

Modified: pypy/branch/pyjitpl5/pypy/jit/backend/cli/test/test_basic.py
==============================================================================
--- pypy/branch/pyjitpl5/pypy/jit/backend/cli/test/test_basic.py	(original)
+++ pypy/branch/pyjitpl5/pypy/jit/backend/cli/test/test_basic.py	Tue May  5 10:21:43 2009
@@ -25,7 +25,6 @@
     test_getfield_immutable = skip
     
     test_stopatxpolicy = _skip
-    test_mod_ovf = _skip
     test_print = _skip
     test_bridge_from_interpreter = _skip
     test_bridge_from_interpreter_2 = _skip



More information about the Pypy-commit mailing list