[pypy-svn] r64050 - in pypy/branch/pyjitpl5-simplify/pypy/jit/metainterp: . test
antocuni at codespeak.net
antocuni at codespeak.net
Tue Apr 14 11:52:20 CEST 2009
Author: antocuni
Date: Tue Apr 14 11:52:19 2009
New Revision: 64050
Modified:
pypy/branch/pyjitpl5-simplify/pypy/jit/metainterp/executor.py
pypy/branch/pyjitpl5-simplify/pypy/jit/metainterp/history.py
pypy/branch/pyjitpl5-simplify/pypy/jit/metainterp/test/test_basic.py
Log:
make test_string pass again
Modified: pypy/branch/pyjitpl5-simplify/pypy/jit/metainterp/executor.py
==============================================================================
--- pypy/branch/pyjitpl5-simplify/pypy/jit/metainterp/executor.py (original)
+++ pypy/branch/pyjitpl5-simplify/pypy/jit/metainterp/executor.py Tue Apr 14 11:52:19 2009
@@ -241,15 +241,15 @@
# XXX: these ops should probably be delegated to the backend
def do_str_stritem_nonneg(cpu, args, descr=None):
- obj = args[0].getptr_base()
+ obj = args[0].getobj()
str = ootype.cast_from_object(ootype.String, obj)
index = args[1].getint()
res = str.ll_stritem_nonneg(index)
return ConstInt(ord(res))
def do_str_strconcat(cpu, args, descr=None):
- obj1 = args[0].getptr_base()
- obj2 = args[1].getptr_base()
+ obj1 = args[0].getobj()
+ obj2 = args[1].getobj()
str1 = ootype.cast_from_object(ootype.String, obj1)
str2 = ootype.cast_from_object(ootype.String, obj2)
res = str1.ll_strconcat(str2)
@@ -257,7 +257,7 @@
return ConstObj(objres)
def do_str_strlen(cpu, args, descr=None):
- obj = args[0].getptr_base()
+ obj = args[0].getobj()
str = ootype.cast_from_object(ootype.String, obj)
res = str.ll_strlen()
return ConstInt(res)
Modified: pypy/branch/pyjitpl5-simplify/pypy/jit/metainterp/history.py
==============================================================================
--- pypy/branch/pyjitpl5-simplify/pypy/jit/metainterp/history.py (original)
+++ pypy/branch/pyjitpl5-simplify/pypy/jit/metainterp/history.py Tue Apr 14 11:52:19 2009
@@ -71,6 +71,9 @@
return lltype.cast_opaque_ptr(PTR, self.getptr_base())
getptr._annspecialcase_ = 'specialize:arg(1)'
+ def getobj(self):
+ raise NotImplementedError
+
def get_(self):
raise NotImplementedError
@@ -272,8 +275,8 @@
nonconstbox = clonebox
- #def getptr_base(self):
- # return self.value
+ def getobj(self):
+ return self.value
def get_(self):
return ootype.ooidentityhash(self.value) # XXX: check me
@@ -397,8 +400,8 @@
def constbox(self):
return ConstObj(self.value)
- #def getptr_base(self):
- # return self.value
+ def getobj(self):
+ return self.value
def get_(self):
return ootype.ooidentityhash(self.value) # XXX: check me
Modified: pypy/branch/pyjitpl5-simplify/pypy/jit/metainterp/test/test_basic.py
==============================================================================
--- pypy/branch/pyjitpl5-simplify/pypy/jit/metainterp/test/test_basic.py (original)
+++ pypy/branch/pyjitpl5-simplify/pypy/jit/metainterp/test/test_basic.py Tue Apr 14 11:52:19 2009
@@ -515,7 +515,6 @@
py.test.skip('in-progress')
test_chr2str = skip
- test_string = skip
test_unicode = skip
test_residual_call = skip
test_format = skip
More information about the Pypy-commit
mailing list