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=4.8 required=5.0 tests=RCVD_IN_BL_SPAMCOP_NET, RCVD_IN_SBL_CSS autolearn=no autolearn_force=no version=3.4.4 Received: (qmail 18651 invoked from network); 1 Oct 2022 23:20:56 -0000 Received: from 9front.inri.net (168.235.81.73) by inbox.vuxu.org with ESMTPUTF8; 1 Oct 2022 23:20:56 -0000 Received: from MTA-07-4.privateemail.com ([68.65.122.27]) by 9front; Sat Oct 1 19:19:24 -0400 2022 Received: from mta-07.privateemail.com (localhost [127.0.0.1]) by mta-07.privateemail.com (Postfix) with ESMTP id 148EE18000AD for <9front@9front.org>; Sat, 1 Oct 2022 19:19:23 -0400 (EDT) Received: from localhost (tor-exit-at-the.quesadilla.party [103.251.167.21]) by mta-07.privateemail.com (Postfix) with ESMTPA id 0948C18000AC for <9front@9front.org>; Sat, 1 Oct 2022 19:19:21 -0400 (EDT) Date: Sat, 1 Oct 2022 16:19:08 -0700 From: Anthony Martin To: 9front@9front.org Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Virus-Scanned: ClamAV using ClamSMTP List-ID: <9front.9front.org> List-Help: X-Glyph: ➈ X-Bullshit: table package hosting-aware rich-client storage Subject: [9front] [PATCH] cc: take our pickle out of the peephole Reply-To: 9front@9front.org Precedence: bulk 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++;