[pypy-svn] r66809 - in pypy/branch/pyjitpl5-guardovf/pypy/jit/backend/minimal: . test
arigo at codespeak.net
arigo at codespeak.net
Thu Aug 13 20:41:42 CEST 2009
Author: arigo
Date: Thu Aug 13 20:41:41 2009
New Revision: 66809
Modified:
pypy/branch/pyjitpl5-guardovf/pypy/jit/backend/minimal/runner.py
pypy/branch/pyjitpl5-guardovf/pypy/jit/backend/minimal/test/test_runner.py
Log:
Adapt the minimal backend.
Modified: pypy/branch/pyjitpl5-guardovf/pypy/jit/backend/minimal/runner.py
==============================================================================
--- pypy/branch/pyjitpl5-guardovf/pypy/jit/backend/minimal/runner.py (original)
+++ pypy/branch/pyjitpl5-guardovf/pypy/jit/backend/minimal/runner.py Thu Aug 13 20:41:41 2009
@@ -42,6 +42,7 @@
self._future_values = []
self._ovf_error_inst = self.setup_error(OverflowError)
self._zer_error_inst = self.setup_error(ZeroDivisionError)
+ self.clear_exception()
def setup_error(self, Class):
if self.rtyper is not None: # normal case
@@ -184,6 +185,15 @@
raise GuardFailed
elif opnum == rop.GUARD_EXCEPTION:
return self._execute_guard_exception(argboxes)
+ elif opnum == rop.GUARD_NO_OVERFLOW:
+ if self._overflow_flag:
+ self._overflow_flag = False
+ raise GuardFailed
+ elif opnum == rop.GUARD_OVERFLOW:
+ if self._overflow_flag:
+ self._overflow_flag = False
+ else:
+ raise GuardFailed
else:
ll_assert(False, "execute_guard: unknown guard op")
Modified: pypy/branch/pyjitpl5-guardovf/pypy/jit/backend/minimal/test/test_runner.py
==============================================================================
--- pypy/branch/pyjitpl5-guardovf/pypy/jit/backend/minimal/test/test_runner.py (original)
+++ pypy/branch/pyjitpl5-guardovf/pypy/jit/backend/minimal/test/test_runner.py Thu Aug 13 20:41:41 2009
@@ -23,7 +23,6 @@
test_passing_guard_class = _skip # GUARD_CLASS
test_failing_guards = _skip # GUARD_CLASS
test_failing_guard_class = _skip # GUARD_CLASS
- test_ovf_operations_reversed = _skip # exception
#class TestOOtype(OOJitMixin, MinimalTestMixin, OOtypeBackendTest):
# pass
More information about the Pypy-commit
mailing list