[pypy-svn] r51859 - pypy/branch/jit-refactoring/pypy/jit/rainbow
arigo at codespeak.net
arigo at codespeak.net
Mon Feb 25 20:36:34 CET 2008
Author: arigo
Date: Mon Feb 25 20:36:29 2008
New Revision: 51859
Modified:
pypy/branch/jit-refactoring/pypy/jit/rainbow/codewriter.py
pypy/branch/jit-refactoring/pypy/jit/rainbow/dump.py
Log:
* Don't crash if the called_bytecode is uninitialized yet.
* Show where to put a call to dump() for nice results.
Modified: pypy/branch/jit-refactoring/pypy/jit/rainbow/codewriter.py
==============================================================================
--- pypy/branch/jit-refactoring/pypy/jit/rainbow/codewriter.py (original)
+++ pypy/branch/jit-refactoring/pypy/jit/rainbow/codewriter.py Mon Feb 25 20:36:29 2008
@@ -156,6 +156,7 @@
bytecode._source = self.assembler
bytecode._interpreter = self.interpreter
bytecode._labelpos = labelpos
+ #bytecode.dump()
if is_portal:
self.finish_all_graphs()
self.interpreter.set_num_global_mergepoints(
Modified: pypy/branch/jit-refactoring/pypy/jit/rainbow/dump.py
==============================================================================
--- pypy/branch/jit-refactoring/pypy/jit/rainbow/dump.py (original)
+++ pypy/branch/jit-refactoring/pypy/jit/rainbow/dump.py Mon Feb 25 20:36:29 2008
@@ -124,7 +124,7 @@
elif argspec == "bytecode":
bytecodenum = src.load_2byte()
called_bytecode = jitcode.called_bytecodes[bytecodenum]
- args.append(called_bytecode.name)
+ args.append(getattr(called_bytecode, 'name', '?'))
elif argspec == "calldesc":
index = src.load_2byte()
function = jitcode.calldescs[index]
More information about the Pypy-commit
mailing list