[pypy-svn] r18431 - pypy/branch/hl-backend/pypy/annotation
bert at codespeak.net
bert at codespeak.net
Tue Oct 11 20:02:44 CEST 2005
Author: bert
Date: Tue Oct 11 20:02:44 2005
New Revision: 18431
Modified:
pypy/branch/hl-backend/pypy/annotation/model.py
Log:
- create SomeRefs
Modified: pypy/branch/hl-backend/pypy/annotation/model.py
==============================================================================
--- pypy/branch/hl-backend/pypy/annotation/model.py (original)
+++ pypy/branch/hl-backend/pypy/annotation/model.py Tue Oct 11 20:02:44 2005
@@ -448,6 +448,8 @@
]
def annotation_to_lltype(s_val, info=None):
+ if isinstance(s_val, SomeRef):
+ return s_val.ll_ptrtype
if isinstance(s_val, SomePtr):
return s_val.ll_ptrtype
for witness, lltype in annotation_to_ll_map:
@@ -465,7 +467,10 @@
def lltype_to_annotation(T):
s = ll_to_annotation_map.get(T)
if s is None:
- return SomePtr(T)
+ if isinstance(T, ootype.Class):
+ return SomeRef(T)
+ else:
+ return SomePtr(T)
else:
return s
More information about the Pypy-commit
mailing list