[pypy-svn] r49882 - in pypy/dist/pypy/jit/hintannotator: . test
antocuni at codespeak.net
antocuni at codespeak.net
Tue Dec 18 10:35:09 CET 2007
Author: antocuni
Date: Tue Dec 18 10:35:08 2007
New Revision: 49882
Modified:
pypy/dist/pypy/jit/hintannotator/model.py
pypy/dist/pypy/jit/hintannotator/test/test_annotator.py
Log:
a new test and the corresponding fix
Modified: pypy/dist/pypy/jit/hintannotator/model.py
==============================================================================
--- pypy/dist/pypy/jit/hintannotator/model.py (original)
+++ pypy/dist/pypy/jit/hintannotator/model.py Tue Dec 18 10:35:08 2007
@@ -429,7 +429,10 @@
def oosend(hs_v1, hs_name, *args_hs):
RESTYPE = getbookkeeper().current_op_concretetype()
- return SomeLLAbstractVariable(RESTYPE)
+ if RESTYPE is not ootype.Void:
+ return SomeLLAbstractVariable(RESTYPE)
+ else:
+ return # XXX: is it right?
class __extend__(SomeLLAbstractConstant):
Modified: pypy/dist/pypy/jit/hintannotator/test/test_annotator.py
==============================================================================
--- pypy/dist/pypy/jit/hintannotator/test/test_annotator.py (original)
+++ pypy/dist/pypy/jit/hintannotator/test/test_annotator.py Tue Dec 18 10:35:08 2007
@@ -1019,3 +1019,13 @@
test_deepfreeze_variables = skip_policy
test_cast_pointer_keeps_deepfreeze = skip_policy
test_concrete_fnptr_for_green_call = skip_policy
+
+ def test_void_oosend(self):
+ class Foo:
+ def bar(self):
+ pass
+
+ def fn():
+ f = Foo()
+ f.bar()
+ hs = self.hannotate(fn, [], policy=P_OOPSPEC_NOVIRTUAL)
More information about the pypy-svn
mailing list