[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 5/5] pkl-rt.pk: _pkl_print_format_any: handle PVM types
From: |
Mohammad-Reza Nabipoor |
Subject: |
Re: [PATCH 5/5] pkl-rt.pk: _pkl_print_format_any: handle PVM types |
Date: |
Thu, 27 Oct 2022 08:35:28 +0200 |
Hello Jose.
On Mon, Oct 24, 2022 at 12:06:13AM +0200, Jose E. Marchesi wrote:
> > + else if (asm int<32>: ("tyisa; nip" : val))
> > + {
> > + _pkl_print_format_any (asm any: ("tyagett; nip" : val), ctx,
> > depth);
> > + ctx.emit ("[");
> > + if (!asm int<32>: ("tyagetb; nip; isn; nip" : val))
> > + _pkl_print_format_any (asm any: ("tyagetb; nip; call" : val),
> > ctx, depth);
> > + ctx.emit ("]");
> > + }
Pushed with the following change:
```
diff --git a/libpoke/pkl-rt.pk b/libpoke/pkl-rt.pk
index bcb4d54e..15fc07f9 100644
--- a/libpoke/pkl-rt.pk
+++ b/libpoke/pkl-rt.pk
@@ -834,10 +834,12 @@ immutable fun _pkl_print_format_any = (any val,
ctx.emit ("void");
else if (asm int<32>: ("tyisa; nip" : val))
{
+ var bound = asm any: ("tyagetb; nip; call" : val);
+
_pkl_print_format_any (asm any: ("tyagett; nip" : val), ctx, depth);
ctx.emit ("[");
- if (!asm int<32>: ("tyagetb; nip; isn; nip" : val))
- _pkl_print_format_any (asm any: ("tyagetb; nip; call" : val), ctx,
depth);
+ if (!asm int<32>: ("isn; nip" : bound))
+ _pkl_print_format_any (bound, ctx, depth);
ctx.emit ("]");
}
else if (asm int<32>: ("tyissct; nip" : val))
```
Thanks!
- [PATCH 1/5] pvm: remove PVM_TYPE_ANY, Mohammad-Reza Nabipoor, 2022/10/23
- [PATCH 3/5] pvm.jitter: fix `iolist' to have right type, Mohammad-Reza Nabipoor, 2022/10/23
- Re: [PATCH 3/5] pvm.jitter: fix `iolist' to have right type, Jose E. Marchesi, 2022/10/23
- [PATCH v2] pvm.jitter: fix `iolist' to have right type, Mohammad-Reza Nabipoor, 2022/10/24
- Re: [PATCH v2] pvm.jitter: fix `iolist' to have right type, Jose E. Marchesi, 2022/10/24
- [PATCH] pkl: split iolist instruction into two instructions, Mohammad-Reza Nabipoor, 2022/10/26
- Re: [PATCH] pkl: split iolist instruction into two instructions, Jose E. Marchesi, 2022/10/26
- Re: [PATCH] pkl: split iolist instruction into two instructions, Mohammad-Reza Nabipoor, 2022/10/27
[PATCH 5/5] pkl-rt.pk: _pkl_print_format_any: handle PVM types, Mohammad-Reza Nabipoor, 2022/10/23
[PATCH 2/5] pkl: rename instruction s/tysctn/tysctgetn/, Mohammad-Reza Nabipoor, 2022/10/23
[PATCH 4/5] pkl: improve PVM type introspection 2022-10-23 Mohammad-Reza Nabipoor <address@hidden>, Mohammad-Reza Nabipoor, 2022/10/23
Re: [PATCH 1/5] pvm: remove PVM_TYPE_ANY, Jose E. Marchesi, 2022/10/23