9front - general discussion about 9front
 help / color / mirror / Atom feed
* [9front] [PATCH] cc: take our pickle out of the peephole
@ 2022-10-01 23:19 Anthony Martin
  2022-10-01 23:24 ` unobe
  2022-10-02 18:08 ` ori
  0 siblings, 2 replies; 7+ messages in thread
From: Anthony Martin @ 2022-10-01 23:19 UTC (permalink / raw)
  To: 9front


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++;

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [9front] [PATCH] cc: take our pickle out of the peephole
  2022-10-01 23:19 [9front] [PATCH] cc: take our pickle out of the peephole Anthony Martin
@ 2022-10-01 23:24 ` unobe
  2022-10-13  0:34   ` Anthony Martin
  2022-10-02 18:08 ` ori
  1 sibling, 1 reply; 7+ messages in thread
From: unobe @ 2022-10-01 23:24 UTC (permalink / raw)
  To: 9front

Quoth Anthony Martin <ality@pbrane.org>:
> 
> 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.
> 
> ...

So this applies to 9legacy, too?  Would it be a nice gesture to
cross-post to 9fans?


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [9front] [PATCH] cc: take our pickle out of the peephole
  2022-10-01 23:19 [9front] [PATCH] cc: take our pickle out of the peephole Anthony Martin
  2022-10-01 23:24 ` unobe
@ 2022-10-02 18:08 ` ori
  1 sibling, 0 replies; 7+ messages in thread
From: ori @ 2022-10-02 18:08 UTC (permalink / raw)
  To: 9front

Quoth Anthony Martin <ality@pbrane.org>:
> 
> 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.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [9front] [PATCH] cc: take our pickle out of the peephole
  2022-10-01 23:24 ` unobe
@ 2022-10-13  0:34   ` Anthony Martin
  2022-10-13  3:08     ` Noam Preil
  0 siblings, 1 reply; 7+ messages in thread
From: Anthony Martin @ 2022-10-13  0:34 UTC (permalink / raw)
  To: 9front

unobe@cpan.org once said:
> So this applies to 9legacy, too?  Would it be a nice gesture to
> cross-post to 9fans?

Sure. I'll send a note. Though, I think anyone that actually uses
Plan 9 should be subscribed to both lists.

Cheers,
  Anthony

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [9front] [PATCH] cc: take our pickle out of the peephole
  2022-10-13  0:34   ` Anthony Martin
@ 2022-10-13  3:08     ` Noam Preil
  2022-10-13  8:02       ` Steve Simon
  0 siblings, 1 reply; 7+ messages in thread
From: Noam Preil @ 2022-10-13  3:08 UTC (permalink / raw)
  To: 9front

Meh.

I use 9front as my main system, and I unsubscribed from 9fans months
ago.

That place is a cesspool.

- Noam Preil

- Noam Preil


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [9front] [PATCH] cc: take our pickle out of the peephole
  2022-10-13  3:08     ` Noam Preil
@ 2022-10-13  8:02       ` Steve Simon
  2022-10-13  8:56         ` hiro
  0 siblings, 1 reply; 7+ messages in thread
From: Steve Simon @ 2022-10-13  8:02 UTC (permalink / raw)
  To: 9front



> On 13 Oct 2022, at 04:08, Noam Preil <noam@pixelhero.dev> wrote:
> 
> Meh.
> 
> I use 9front as my main system, and I unsubscribed from 9fans months
> ago.
> 
> That place is a cesspool.
> 
> - Noam Preil
> 
> - Noam Preil
> 

cesspool? what, one email a month?


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [9front] [PATCH] cc: take our pickle out of the peephole
  2022-10-13  8:02       ` Steve Simon
@ 2022-10-13  8:56         ` hiro
  0 siblings, 0 replies; 7+ messages in thread
From: hiro @ 2022-10-13  8:56 UTC (permalink / raw)
  To: 9front

cesspooling is not about quantity but about attitude

On 10/13/22, Steve Simon <steve@quintile.net> wrote:
>
>
>> On 13 Oct 2022, at 04:08, Noam Preil <noam@pixelhero.dev> wrote:
>>
>> Meh.
>>
>> I use 9front as my main system, and I unsubscribed from 9fans months
>> ago.
>>
>> That place is a cesspool.
>>
>> - Noam Preil
>>
>> - Noam Preil
>>
>
> cesspool? what, one email a month?
>
>

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2022-10-13  8:58 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-01 23:19 [9front] [PATCH] cc: take our pickle out of the peephole Anthony Martin
2022-10-01 23:24 ` unobe
2022-10-13  0:34   ` Anthony Martin
2022-10-13  3:08     ` Noam Preil
2022-10-13  8:02       ` Steve Simon
2022-10-13  8:56         ` hiro
2022-10-02 18:08 ` ori

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).