Author: Lars Wassermann <[email protected]>
Branch:
Changeset: r375:59ed4dafb700
Date: 2013-05-06 14:13 +0200
http://bitbucket.org/pypy/lang-smalltalk/changeset/59ed4dafb700/
Log: added method_str to contexts to have a really short printing method
diff --git a/spyvm/shadow.py b/spyvm/shadow.py
--- a/spyvm/shadow.py
+++ b/spyvm/shadow.py
@@ -967,7 +967,7 @@
if argcount == 0:
return '%s%s (rcvr: %s) [pc: %d]' % (
block,
- self.w_method().get_identifier_string(),
+ self.method_str(),
self.w_receiver().as_repr_string(),
self.pc() + 1
)
@@ -976,12 +976,15 @@
args += ': %s' % self.peek(i).as_repr_string()
return '%s%s (rcvr: %s) [pc: %d] (%s)' % (
block,
- self.w_method().get_identifier_string(),
+ self.method_str(),
self.w_receiver().as_repr_string(),
self.pc() + 1,
args
)
+ def method_str(self):
+ return self.w_method().get_identifier_string()
+
class CompiledMethodShadow(object):
_attr_ = ["_w_self", "bytecode",
"literals[*]", "bytecodeoffset",
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit