[pypy-svn] r51022 - in pypy/dist/pypy/jit/hintannotator: . test
fijal at codespeak.net
fijal at codespeak.net
Fri Jan 25 12:46:09 CET 2008
Author: fijal
Date: Fri Jan 25 12:46:08 2008
New Revision: 51022
Modified:
pypy/dist/pypy/jit/hintannotator/model.py
pypy/dist/pypy/jit/hintannotator/test/test_annotator.py
Log:
Support to pass float_add through hintannotator
Modified: pypy/dist/pypy/jit/hintannotator/model.py
==============================================================================
--- pypy/dist/pypy/jit/hintannotator/model.py (original)
+++ pypy/dist/pypy/jit/hintannotator/model.py Fri Jan 25 12:46:08 2008
@@ -44,7 +44,7 @@
uint_gt uint_lt uint_le uint_ge uint_eq uint_ne
getarrayitem setarrayitem
getarraysubstruct
- ptr_eq ptr_ne""".split()
+ ptr_eq ptr_ne float_add""".split()
class HintError(Exception):
pass
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 Fri Jan 25 12:46:08 2008
@@ -99,6 +99,14 @@
assert len(hs.origins) == 3
assert hs.concretetype == lltype.Signed
+ def test_simple_float(self):
+ def ll_function(x, y):
+ return x + y
+ hs = self.hannotate(ll_function, [float, float])
+ assert isinstance(hs, SomeLLAbstractConstant)
+ assert len(hs.origins) == 3
+ assert hs.concretetype == lltype.Float
+
def test_join(self):
def ll_function(cond, x,y):
if cond:
More information about the Pypy-commit
mailing list