ref: c0916e34f0fed3c0f622dadd2c3a7e1bb13004d3
parent: 6ccc763b64dd31fa13fb17c6d0fde71ffe697bfb
author: Anthony Martin <ality@pbrane.org>
date: Sat Oct 1 19:19:08 EDT 2022
cc: take our pickle out of the peephole The -P flag is used to debug the peephole optimizer. The -Z flag is used to output pickling code for various types. Don't confuse the two. The pickling code was added in the third edition. It mistakenly reused the -P flag which was later partially corrected to use the -Z flag in 2004. That change updated lex.c but missed the code in pickle.c.
--- a/sys/src/cmd/cc/pickle.c
+++ b/sys/src/cmd/cc/pickle.c
@@ -172,9 +172,9 @@
int n;
char *an;
- if(!debug['P'])
+ if(!debug['Z'])
return;
- if(debug['P'] > 1) {
+ if(debug['Z'] > 1) {
n = 0;
for(i=iostack; i; i=i->link)
n++;
@@ -221,9 +221,9 @@
Type *t;
Sym *s1, *s2;
- if(!debug['P'] || debug['s'])
+ if(!debug['Z'] || debug['s'])
return;
- if(debug['P'] > 1) {
+ if(debug['Z'] > 1) {
n = 0;
for(i=iostack; i; i=i->link)
n++;
--
⑨