[pypy-svn] r66822 - pypy/branch/pyjitpl5-floats/pypy/jit/metainterp
fijal at codespeak.net
fijal at codespeak.net
Fri Aug 14 14:34:12 CEST 2009
Author: fijal
Date: Fri Aug 14 14:34:11 2009
New Revision: 66822
Modified:
pypy/branch/pyjitpl5-floats/pypy/jit/metainterp/optimizeopt.py
pypy/branch/pyjitpl5-floats/pypy/jit/metainterp/specnode.py
Log:
Avoid rpython warnings
Modified: pypy/branch/pyjitpl5-floats/pypy/jit/metainterp/optimizeopt.py
==============================================================================
--- pypy/branch/pyjitpl5-floats/pypy/jit/metainterp/optimizeopt.py (original)
+++ pypy/branch/pyjitpl5-floats/pypy/jit/metainterp/optimizeopt.py Fri Aug 14 14:34:11 2009
@@ -580,6 +580,7 @@
def optimize_GETFIELD_GC(self, op):
value = self.getvalue(op.args[0])
+ assert isinstance(value, AbstractVirtualStructValue)
if value.is_virtual():
# optimizefindnode should ensure that fieldvalue is found
fieldvalue = value.getfield(op.descr, None)
@@ -621,6 +622,7 @@
def optimize_ARRAYLEN_GC(self, op):
value = self.getvalue(op.args[0])
if value.is_virtual():
+ assert isinstance(value, VArrayValue)
assert op.result.getint() == value.getlength()
self.make_constant(op.result)
else:
@@ -632,6 +634,7 @@
indexbox = op.args[1]
if value.is_virtual() and self.is_constant(indexbox):
# optimizefindnode should ensure that itemvalue is found
+ assert isinstance(value, VArrayValue)
itemvalue = value.getitem(indexbox.getint(), None)
assert itemvalue is not None
self.make_equal_to(op.result, itemvalue)
@@ -647,6 +650,7 @@
value = self.getvalue(op.args[0])
indexbox = op.args[1]
if value.is_virtual() and self.is_constant(indexbox):
+ assert isinstance(value, VArrayValue)
value.setitem(indexbox.getint(), self.getvalue(op.args[2]))
else:
value.make_nonnull()
Modified: pypy/branch/pyjitpl5-floats/pypy/jit/metainterp/specnode.py
==============================================================================
--- pypy/branch/pyjitpl5-floats/pypy/jit/metainterp/specnode.py (original)
+++ pypy/branch/pyjitpl5-floats/pypy/jit/metainterp/specnode.py Fri Aug 14 14:34:11 2009
@@ -1,10 +1,17 @@
from pypy.tool.pairtype import extendabletype
+class PurelyAbstractBaseClass(NotImplementedError):
+ pass
class SpecNode(object):
__metaclass__ = extendabletype # extended in optimizefindnode.py
__slots__ = ()
+ def equals(self, other):
+ raise PurelyAbstractBaseClass()
+
+ def extract_runtime_data(self, cpu, valuebox, resultlist):
+ raise PurelyAbstractBaseClass()
class NotSpecNode(SpecNode):
__slots__ = ()
More information about the Pypy-commit
mailing list