[pypy-svn] r30542 - pypy/dist/pypy/rpython/ootypesystem
antocuni at codespeak.net
antocuni at codespeak.net
Tue Jul 25 20:33:05 CEST 2006
Author: antocuni
Date: Tue Jul 25 20:32:56 2006
New Revision: 30542
Modified:
pypy/dist/pypy/rpython/ootypesystem/rpbc.py
Log:
Sanity check.
Modified: pypy/dist/pypy/rpython/ootypesystem/rpbc.py
==============================================================================
--- pypy/dist/pypy/rpython/ootypesystem/rpbc.py (original)
+++ pypy/dist/pypy/rpython/ootypesystem/rpbc.py Tue Jul 25 20:32:56 2006
@@ -126,6 +126,11 @@
derived_mangled = self._get_method_name(opname, s_pbc, args_s)
cname = hop.inputconst(ootype.Void, derived_mangled)
hop.exception_is_here()
+ # sanity check: make sure that INSTANCE has the method
+ self.r_im_self.setup()
+ INSTANCE, meth = self.r_im_self.lowleveltype._lookup(derived_mangled)
+ assert meth is not None, 'Missing method %s in class %s'\
+ % (derived_mangled, self.r_im_self.lowleveltype)
v = hop.genop("oosend", [cname]+vlist, resulttype=rresult)
return hop.llops.convertvar(v, rresult, hop.r_result)
More information about the Pypy-commit
mailing list