develooper Front page | perl.perl6.internals.api.parser | Postings from November 2000

Re: The external interface for the parser piece

Thread Previous | Thread Next
From:
Dan Sugalski
Date:
November 30, 2000 09:00
Subject:
Re: The external interface for the parser piece
Message ID:
5.0.1.4.0.20001130115726.024596d0@24.8.96.48
At 10:54 AM 11/30/00 -0600, Jarkko Hietaniemi wrote:
>On Thu, Nov 30, 2000 at 11:23:11AM -0500, Dan Sugalski wrote:
> > At 10:20 AM 11/30/00 -0600, Jarkko Hietaniemi wrote:
> > >On Thu, Nov 30, 2000 at 10:03:06AM -0600, Jarkko Hietaniemi wrote:
> > > > On a related note: a wrapper not completely unlike
> > > >
> > > > union sv_any_aligned_s {
> > > >       IV iv;
> > > >       NV iv;
> > > >       PV pv;
> > > >       void *vp;
> > > >       int (*dummy)(void) *fp;
> > > >       /* any others? */
> > > > };
> > > >
> > > > should be used around SVs to ascertain that everything fits everywhere.
> > >
> > >Uhhh.  "around the actual data like the actual IV, NV, PV, etc inside 
> SVs".
> >
> > Huh? You're not talking about using this union around, say, the IV slot in
> > a scalar, I hope...
>
>You hope in vain :-) If we still want to in perl6 to do (disgusting)
>things like (we do in perl5)
>
>         - "intercast" pointers and integers
>         - "intercast" integers and doubles
>
>something like the above is needed (or, at least, is beneficial in
>getting it right).  How else can you guarantee that (a) the size
>(b) the alignment are right?
>
>All this assuming, of course, that the (basic implementation of)
>perl6 SVs is somewhat similar to the perl5 SVs.  If not, never mind
>my rambling.

Generally not, I think. The vtable stuff and special-purpose scalars take 
care of most of that nonsense, luckily.

					Dan

--------------------------------------"it's like this"-------------------
Dan Sugalski                          even samurai
dan@sidhe.org                         have teddy bears and even
                                      teddy bears get drunk


Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About