chiark
/
gitweb
/
~mdw
/
catacomb
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
80be023
)
mpreduce: Debug decomposition corrupts initial state for code generator.
author
Mark Wooding
<mdw@distorted.org.uk>
Tue, 4 Apr 2006 16:17:30 +0000
(17:17 +0100)
committer
Mark Wooding
<mdw@distorted.org.uk>
Tue, 4 Apr 2006 16:17:30 +0000
(17:17 +0100)
The code generation pass uses whatever final state the debugging run
left behind. Have the debug pass force the final state back to Z when
it finishes.
Also, produce correct output from the debugging pass.
mpreduce.c
patch
|
blob
|
blame
|
history
diff --git
a/mpreduce.c
b/mpreduce.c
index 0f20ed801c862cc1ceec268ac3f3dee6f0e8263f..52e86a1f9b4c6ae7ed06639f7750fefcb7445e16 100644
(file)
--- a/
mpreduce.c
+++ b/
mpreduce.c
@@
-101,7
+101,8
@@
int mpreduce_create(mpreduce *r, mp *p)
case X0 | 0: st = Z; printf("+ %lu\n", i - 1); break;
}
}
- if (st >= X) printf("+ %lu\n", i);
+ if (st >= X) printf("+ %lu\n", i - 1);
+ st = Z;
#endif
for (i = 0, mp_scan(&sc, p); i < d - 1 && mp_step(&sc); i++) {