[pypy-commit] lang-js default: get rid of segfaulting printable_location for now

stepahn noreply at buildbot.pypy.org
Tue Jun 14 20:09:27 CEST 2011


Author: Stephan <stephan at stzal.com>
Branch: 
Changeset: r99:8c35f258c191
Date: 2011-06-14 19:47 +0200
http://bitbucket.org/pypy/lang-js/changeset/8c35f258c191/

Log:	get rid of segfaulting printable_location for now

diff --git a/js/jscode.py b/js/jscode.py
--- a/js/jscode.py
+++ b/js/jscode.py
@@ -7,7 +7,10 @@
 from js.jsobj import W_Root, W_String
 
 def get_printable_location(pc, jsfunction):
-    return str(jsfunction.opcodes[pc])
+    try:
+        return str(jsfunction.opcodes[pc])
+    except IndexError:
+        return "???"
 
 jitdriver = JitDriver(greens=['pc', 'self'], reds=['to_pop', 'stack', 'ctx'], get_printable_location = get_printable_location, virtualizables=['stack'])
 


More information about the pypy-commit mailing list