[pypy-svn] r13871 - in pypy/dist/pypy/rpython: . test
hpk at codespeak.net
hpk at codespeak.net
Sat Jun 25 17:57:39 CEST 2005
Author: hpk
Date: Sat Jun 25 17:57:38 2005
New Revision: 13871
Modified:
pypy/dist/pypy/rpython/rpbc.py
pypy/dist/pypy/rpython/test/test_rpbc.py
Log:
not really a fix, not really a test, just want to get things onto
my machine.
Modified: pypy/dist/pypy/rpython/rpbc.py
==============================================================================
--- pypy/dist/pypy/rpython/rpbc.py (original)
+++ pypy/dist/pypy/rpython/rpbc.py Sat Jun 25 17:57:38 2005
@@ -217,6 +217,9 @@
hop2 = hop.copy()
hop2.args_s[0] = self.s_im_self # make the 1st arg stand for 'im_self'
hop2.args_r[0] = self.r_im_self # (same lowleveltype as 'self')
+ if isinstance(hop2.args_v[0], Constant):
+ hop2.args_v[0] = hop2.llops.genop('same_as', [hop2.args_v[0]],
+ resulttype=hop.args_r[0])
c = Constant(self.function)
hop2.v_s_insertfirstarg(c, s_function) # insert 'function'
# now hop2 looks like simple_call(function, self, args...)
Modified: pypy/dist/pypy/rpython/test/test_rpbc.py
==============================================================================
--- pypy/dist/pypy/rpython/test/test_rpbc.py (original)
+++ pypy/dist/pypy/rpython/test/test_rpbc.py Sat Jun 25 17:57:38 2005
@@ -213,3 +213,13 @@
assert res == 3
res = ev_f1(1)
assert res == 7
+
+def dont_test_rpbc_bound_method_static_call():
+ class R:
+ def meth(self):
+ return 0
+ r = R()
+ def fn():
+ return r.meth()
+ res = interpret(fn, [])
+ assert res == 0
More information about the Pypy-commit
mailing list