poke-devel
[Top][All Lists]
Advanced

[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!



reply via email to

[Prev in Thread] Current Thread [Next in Thread]