[pypy-svn] r55246 - in pypy/branch/oo-jit/pypy: annotation jit/codegen/cli
antocuni at codespeak.net
antocuni at codespeak.net
Mon May 26 14:34:41 CEST 2008
Author: antocuni
Date: Mon May 26 14:34:39 2008
New Revision: 55246
Modified:
pypy/branch/oo-jit/pypy/annotation/builtin.py
pypy/branch/oo-jit/pypy/jit/codegen/cli/rgenop.py
Log:
hack until I can run translate.py -b cli --jit targettlr.py
Modified: pypy/branch/oo-jit/pypy/annotation/builtin.py
==============================================================================
--- pypy/branch/oo-jit/pypy/annotation/builtin.py (original)
+++ pypy/branch/oo-jit/pypy/annotation/builtin.py Mon May 26 14:34:39 2008
@@ -9,7 +9,7 @@
from pypy.annotation.model import SomeFloat, unionof, SomeUnicodeString
from pypy.annotation.model import SomePBC, SomeInstance, SomeDict, SomeList
from pypy.annotation.model import SomeWeakRef
-from pypy.annotation.model import SomeOOObject
+from pypy.annotation.model import SomeOOObject, SomeOOStaticMeth
from pypy.annotation.model import annotation_to_lltype, lltype_to_annotation, ll_to_annotation
from pypy.annotation.model import add_knowntypedata
from pypy.annotation.model import s_ImpossibleValue
@@ -576,12 +576,12 @@
TYPE = T.const
if TYPE is ootype.Object:
return SomeOOObject()
- elif isinstance(TYPE, ootype.Instance):
- return SomeOOInstance(TYPE)
- elif isinstance(TYPE, ootype.Record):
- return SomeOOInstance(TYPE) # XXX: SomeOORecord?
+ elif TYPE is ootype.Class:
+ return SomeOOClass(T)
elif isinstance(TYPE, ootype.StaticMethod):
return SomeOOStaticMeth(TYPE)
+ elif isinstance(TYPE, ootype.OOType):
+ return SomeOOInstance(TYPE)
else:
raise AnnotatorError, 'Cannot cast Object to %s' % TYPE
Modified: pypy/branch/oo-jit/pypy/jit/codegen/cli/rgenop.py
==============================================================================
--- pypy/branch/oo-jit/pypy/jit/codegen/cli/rgenop.py (original)
+++ pypy/branch/oo-jit/pypy/jit/codegen/cli/rgenop.py Mon May 26 14:34:39 2008
@@ -99,6 +99,8 @@
def revealconst(self, T):
if T is ootype.Object:
return ootype.NULL # XXX?
+ elif isinstance(T, ootype.OOType):
+ return ootype.null(T) # XXX
return lltype.cast_primitive(T, self.value)
def getCliType(self):
@@ -389,6 +391,15 @@
def genop_oosetfield(self, fieldtoken, gv_obj, gv_value):
return self.branches[0].genop_oosetfield(fieldtoken, gv_obj, gv_value)
+ def genop_oonewarray(self, alloctoken, gv_length):
+ raise NotImplementedError
+
+ def genop_oononnull(self, gv_obj):
+ raise NotImplementedError
+
+ def genop_ooisnull(self, gv_obj):
+ raise NotImplementedError
+
def end(self):
# render all the pending branches
for branchbuilder in self.branches:
More information about the Pypy-commit
mailing list