From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 23001 invoked from network); 2 Oct 2022 18:10:24 -0000 Received: from 9front.inri.net (168.235.81.73) by inbox.vuxu.org with ESMTPUTF8; 2 Oct 2022 18:10:24 -0000 Received: from mimir.eigenstate.org ([206.124.132.107]) by 9front; Sun Oct 2 14:08:53 -0400 2022 Received: from stockyard ( [172.102.12.5]) by mimir.eigenstate.org (OpenSMTPD) with ESMTPSA id 49158d1b (TLSv1.2:ECDHE-RSA-AES256-SHA:256:NO) for <9front@9front.org>; Sun, 2 Oct 2022 11:08:51 -0700 (PDT) Message-ID: <4EBB293605FE50837A85CFB227F07E7A@eigenstate.org> To: 9front@9front.org Date: Sun, 02 Oct 2022 14:08:49 -0400 From: ori@eigenstate.org In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit List-ID: <9front.9front.org> List-Help: X-Glyph: ➈ X-Bullshit: progressive extension event general-purpose injection frontend Subject: Re: [9front] [PATCH] cc: take our pickle out of the peephole Reply-To: 9front@9front.org Precedence: bulk Quoth Anthony Martin : > > 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. > > --- > diff 7bf177b3e058925265863979ee50e8dc1822d17a b44281c5cf3db0ca60a22df94bbe99e8bcf9c9e3 > --- a/sys/src/cmd/cc/pickle.c Tue Aug 23 04:38:49 2022 > +++ b/sys/src/cmd/cc/pickle.c Sat Oct 1 15:48:00 2022 > @@ -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++; looks good, done.