diff options
author | Anthony Martin <ality@pbrane.org> | 2022-10-01 23:19:08 +0000 |
---|---|---|
committer | Ori Bernstein <ori@eigenstate.org> | 2022-10-01 23:19:08 +0000 |
commit | 5eb0d57733fe7db870841fe1b81a2f3c106d4e57 (patch) | |
tree | c8c651a850979bcbccd704c003b37d57ecaa70d3 /sys/src/cmd/cc | |
parent | 325c81416b18817a4e45384077aead2d0266536a (diff) |
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.
Diffstat (limited to 'sys/src/cmd/cc')
-rw-r--r-- | sys/src/cmd/cc/pickle.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/src/cmd/cc/pickle.c b/sys/src/cmd/cc/pickle.c index 1946b4e6c..7cac68421 100644 --- a/sys/src/cmd/cc/pickle.c +++ b/sys/src/cmd/cc/pickle.c @@ -172,9 +172,9 @@ pickletype(Type *t) 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 @@ picklevar(Sym *s) 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++; |