[pypy-svn] r66625 - pypy/branch/pyjitpl5/pypy/jit/metainterp
arigo at codespeak.net
arigo at codespeak.net
Sat Jul 25 12:32:36 CEST 2009
Author: arigo
Date: Sat Jul 25 12:32:35 2009
New Revision: 66625
Modified:
pypy/branch/pyjitpl5/pypy/jit/metainterp/codewriter.py
Log:
Fix (shown by test_tl and test_virtual).
Modified: pypy/branch/pyjitpl5/pypy/jit/metainterp/codewriter.py
==============================================================================
--- pypy/branch/pyjitpl5/pypy/jit/metainterp/codewriter.py (original)
+++ pypy/branch/pyjitpl5/pypy/jit/metainterp/codewriter.py Sat Jul 25 12:32:35 2009
@@ -771,10 +771,14 @@
vtable = heaptracker.get_vtable_for_gcstruct(self.cpu, STRUCT)
if vtable:
# do we have a __del__?
- rtti = lltype.getRuntimeTypeInfo(STRUCT)
- if hasattr(rtti._obj, 'destructor_funcptr'):
- self.handle_builtin_call(op)
- return
+ try:
+ rtti = lltype.getRuntimeTypeInfo(STRUCT)
+ except ValueError:
+ pass
+ else:
+ if hasattr(rtti._obj, 'destructor_funcptr'):
+ self.handle_builtin_call(op)
+ return
# store the vtable as an address -- that's fine, because the
# GC doesn't need to follow them
self.emit('new_with_vtable',
More information about the Pypy-commit
mailing list