Author: Lars Wassermann <[email protected]>
Branch:
Changeset: r236:c47050335e18
Date: 2013-03-25 18:26 +0100
http://bitbucket.org/pypy/lang-smalltalk/changeset/c47050335e18/
Log: added some tracing code for compiling, they need to be commented out
because there are still some typing issues. That is the reason I
commit them commented out.
diff --git a/spyvm/interpreter.py b/spyvm/interpreter.py
--- a/spyvm/interpreter.py
+++ b/spyvm/interpreter.py
@@ -43,6 +43,7 @@
self._loop = False
self.next_wakeup_tick = 0
self.interrupt_check_counter = constants.INTERRUPT_COUNTER_SIZE
+ # self.trace = False
def interpret_with_w_frame(self, w_frame):
try:
@@ -77,8 +78,9 @@
s_new_context = p.s_new_context
def c_loop(self, s_context):
- # padding = ' ' * (self.max_stack_depth - self.remaining_stack_depth)
- # print padding + s_context.short_str()
+ # if self.trace:
+ # padding = ' ' * (self.max_stack_depth -
self.remaining_stack_depth)
+ # print padding + s_context.short_str()
old_pc = 0
if not jit.we_are_jitted():
self.quick_check_for_interrupt(s_context)
@@ -338,10 +340,15 @@
if interp.should_trace():
print "%sActually calling primitive %d" %
(interp._last_indent, code,)
func = primitives.prim_holder.prim_table[code]
+ # if interp.trace:
+ # print "%s calling primitive %d \t(%s)" % (' ' *
(interp.max_stack_depth - interp.remaining_stack_depth),
+ # code, func.func_name)
try:
# note: argcount does not include rcvr
return func(interp, self, argcount)
except primitives.PrimitiveFailedError:
+ # if interp.trace:
+ # import pdb; pdb.set_trace()
if interp.should_trace(True):
print "PRIMITIVE FAILED: %d %s" % (s_method.primitive,
w_selector.as_string(),)
pass # ignore this error and fall back to the Smalltalk version
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit