develooper Front page | perl.perl6.internals | Postings from June 2001

Re: Should the op dispatch loop decode?

Thread Previous | Thread Next
From:
Benjamin Stuhl
Date:
June 14, 2001 11:05
Subject:
Re: Should the op dispatch loop decode?
Message ID:
20010614180531.97664.qmail@web14501.mail.yahoo.com
--- Nick Ing-Simmons <nick@ing-simmons.net> wrote:
> Benjamin Stuhl <tiriath@yahoo.com> writes:
> >I don't see where shadow functions are really necessary
> -
> >after all, no one has ever complained that you can't do 
> >
> >pp_chomp(sv); /* or pp_add(sv1, sv2), for that matter */
> >
> >in Perl 5. 
> 
> Yes we did. And note the doop.c file which is part answer
> to the shadows.

True. I had forgotten about those. But what would be the
point of shadowing most of the pp_hot.c functions? Who
would ever _want_ to write 'sv = pp_gvsv(aTHX_ gv);'?

> Given the inner functions we could presumable generate
> the decode
> functions (c.f. xsubpp)

That would probably be the best. Mark whether the body
needs a wrapper or not, and run it through a generator so
pp_chomp or pp_concat are wrapped, but pp_rv2sv isn't. (op
names stolen from Perl 5; who knows what they'll be called
in Parrot). The other issue is list context. It'd probably
be best to simply return a list ref (especially since that
makes returnling lazy lists much easier).

-- BKS

__________________________________________________
Do You Yahoo!?
Spot the hottest trends in music, movies, and more.
http://buzz.yahoo.com/

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