[pypy-svn] r64530 - in pypy/branch/pyjitpl5-simplify/pypy/jit/metainterp: . test
antocuni at codespeak.net
antocuni at codespeak.net
Tue Apr 21 17:51:11 CEST 2009
Author: antocuni
Date: Tue Apr 21 17:51:10 2009
New Revision: 64530
Modified:
pypy/branch/pyjitpl5-simplify/pypy/jit/metainterp/pyjitpl.py
pypy/branch/pyjitpl5-simplify/pypy/jit/metainterp/test/test_basic.py
Log:
(in-progress) check this in so that we can switch computer
Modified: pypy/branch/pyjitpl5-simplify/pypy/jit/metainterp/pyjitpl.py
==============================================================================
--- pypy/branch/pyjitpl5-simplify/pypy/jit/metainterp/pyjitpl.py (original)
+++ pypy/branch/pyjitpl5-simplify/pypy/jit/metainterp/pyjitpl.py Tue Apr 21 17:51:10 2009
@@ -400,6 +400,10 @@
def opimpl_ptr_iszero(self, box):
self.execute(rop.OOISNULL, [box])
+ @arguments("box")
+ def opimpl_oononnull(self, box):
+ self.execute(rop.OONONNULL, [box])
+
@arguments("box", "box")
def opimpl_ptr_eq(self, box1, box2):
self.execute(rop.OOIS, [box1, box2])
Modified: pypy/branch/pyjitpl5-simplify/pypy/jit/metainterp/test/test_basic.py
==============================================================================
--- pypy/branch/pyjitpl5-simplify/pypy/jit/metainterp/test/test_basic.py (original)
+++ pypy/branch/pyjitpl5-simplify/pypy/jit/metainterp/test/test_basic.py Tue Apr 21 17:51:10 2009
@@ -483,21 +483,6 @@
expected = lltype.cast_opaque_ptr(llmemory.GCREF, x)
assert self.interp_operations(f, [x]) == expected
- def test_oops_on_nongc(self):
- from pypy.rpython.lltypesystem import lltype
-
- TP = lltype.Struct('x')
- def f(p1, p2):
- a = p1 is p2
- b = p1 is not p2
- c = bool(p1)
- d = not bool(p2)
- return a + b + c + d
- x = lltype.malloc(TP, flavor='raw')
- expected = f(x, x)
- assert self.interp_operations(f, [x, x]) == expected
- lltype.free(x, flavor='raw')
-
def test_instantiate_classes(self):
class Base: pass
class A(Base): foo = 72
@@ -518,9 +503,7 @@
def skip(self):
py.test.skip('in-progress')
- test_oops_on_nongc = skip
-
- test_print = skip
+ #test_print = skip
test_bridge_from_interpreter_2 = skip
test_bridge_from_interpreter_3 = skip
test_bridge_from_interpreter_4 = skip
@@ -528,4 +511,18 @@
class TestLLtype(BasicTests, LLJitMixin):
- pass
+
+ def test_oops_on_nongc(self):
+ from pypy.rpython.lltypesystem import lltype
+
+ TP = lltype.Struct('x')
+ def f(p1, p2):
+ a = p1 is p2
+ b = p1 is not p2
+ c = bool(p1)
+ d = not bool(p2)
+ return a + b + c + d
+ x = lltype.malloc(TP, flavor='raw')
+ expected = f(x, x)
+ assert self.interp_operations(f, [x, x]) == expected
+ lltype.free(x, flavor='raw')
More information about the Pypy-commit
mailing list