summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cli/cli_pickle.cpp7
-rwxr-xr-xscripts/tracediff.py10
-rwxr-xr-xscripts/unpickle.py2
3 files changed, 14 insertions, 5 deletions
diff --git a/cli/cli_pickle.cpp b/cli/cli_pickle.cpp
index 8ea507be..e7f51ff9 100644
--- a/cli/cli_pickle.cpp
+++ b/cli/cli_pickle.cpp
@@ -172,11 +172,18 @@ public:
writer.beginList();
for (unsigned i = 0; i < call->args.size(); ++i) {
+ writer.beginTuple(2);
+ if (i < call->sig->num_args) {
+ writer.writeString(call->sig->arg_names[i]);
+ } else {
+ writer.writeNone();
+ }
if (call->args[i].value) {
_visit(call->args[i].value);
} else {
writer.writeNone();
}
+ writer.endTuple(2);
}
writer.endList();
diff --git a/scripts/tracediff.py b/scripts/tracediff.py
index 22a26265..ed61e39d 100755
--- a/scripts/tracediff.py
+++ b/scripts/tracediff.py
@@ -341,14 +341,16 @@ class PythonDiffer(Differ):
for j in xrange(numArgs):
self.highlighter.write(sep)
try:
- a_arg = a_call.args[j]
+ a_argName, a_argVal = a_call.args[j]
except IndexError:
pass
try:
- b_arg = b_call.args[j]
+ b_argName, b_argVal = b_call.args[j]
except IndexError:
pass
- self.replace_value(a_arg, b_arg)
+ self.replace_value(a_argName, b_argName)
+ self.highlighter.write(' = ')
+ self.replace_value(a_argVal, b_argVal)
sep = ', '
self.highlighter.write(')')
if a_call.ret is not None or b_call.ret is not None:
@@ -449,7 +451,7 @@ class PythonDiffer(Differ):
self.highlighter.bold(True)
self.highlighter.write(call.functionName)
self.highlighter.bold(False)
- self.highlighter.write('(' + ', '.join(itertools.imap(self.dumper.visit, call.args)) + ')')
+ self.highlighter.write('(' + self.dumper.visitItems(call.args) + ')')
if call.ret is not None:
self.highlighter.write(' = ' + self.dumper.visit(call.ret))
self.highlighter.normal()
diff --git a/scripts/unpickle.py b/scripts/unpickle.py
index 1932497e..b6c76d10 100755
--- a/scripts/unpickle.py
+++ b/scripts/unpickle.py
@@ -208,7 +208,7 @@ class Call:
if self.no is not None:
s = str(self.no) + ' ' + s
dumper = Dumper()
- s += '(' + ', '.join(itertools.imap(dumper.visit, self.args)) + ')'
+ s += '(' + dumper.visitItems(self.args) + ')'
if self.ret is not None:
s += ' = '
s += dumper.visit(self.ret)