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

Re: Yet another switch/goto implementation

Thread Previous | Thread Next
From:
Daniel Grunblatt
Date:
November 4, 2001 10:43
Subject:
Re: Yet another switch/goto implementation
Message ID:
Pine.BSO.4.33.0111041239280.21216-100000@trinity.mali.com.ar


On Sun, 4 Nov 2001, Michael Fischer wrote:

> On Nov 04, Daniel Grunblatt <daniel@grunblatt.com.ar> took up a keyboard and banged out
> > First of all you miss typed:
> > -if ($c{do_opt_t} eq 'goto' and $c{cc} !~ /gcc/i ) {
> > +if ($c{do_op_t} eq 'goto' and $c{cc} !~ /cc/i ) {
>
> hmm. Thats not what my diff has. Point is, if you chose
> 'goto', $c{cc} /isn't/ gcc, there's a problem. $c{cc} is
> just whatever you compiled perl5 with, I believe.
>
> >
> >
> > On Sat, 3 Nov 2001, Michael Fischer wrote:
> > >
> > > 2) replaces interp_guts.h with do_op.h
> >
> > No, it doesn't, it's still using DO_OP from interp_guts.h
> >
>
> D'oh! good catch. I only hit interpreter.c, which of course
> didn't do much...really belongs in runops_cores.c.
>
> > I really suggest that you do a do_op.c and a do_op.h and that you call
> > goto_op_dispatch directly from runops_core.c (from runops_t0p0b0_core),
> > because if I'm not wrong you are breaking -t ,-p and -b options.
>
> Erm, I'm not sure how, as each of them does run in some form of
> while(pc). Please enlighten me here.

Yes, but everyone call DO_OP and expect it to run just one opcode, not
entering a loop, right?

>
> > >
> > > 5) Not the cleanest implementation perhaps, but largely
> > >    limited to ops2c.pl, and things should be fairly easy
> > >    to track down.
> > >
> >
> > I think your approuch is much better and cleaner than mine, my brain was
> > limited to unix :) so I never worried about anything besides gcc.
> > It would also be nice if you can decide which dispatch method use instead
> > of asking.
>
> Well, the point is to let developers have an /easy/ way to play around
> with it, and see what happens on different arches, compilers, optimization
> settings, etc.
>
> I'm going to post a revised patch in a few minutes, with a number of
> caveats... namely that now the goto branch is compiling fine, but
> blowing up badly when run. I assume yours does not :-)
>
> Why not have a look and see if you can't merge your goto system into
> mine for getting it to be workable from Configure?
>

Sure, yes, but let's firts decide if we really want my goto system because
I don't know if the speed ups are like I thought they were, can anyone try
it on Windows/other plataforms/operating systems?


> Win win.
>
> Cheers.
>
> Michael
> --
> Michael Fischer                         7.5 million years to run
> michael@visv.net                        printf "%d", 0x2a;
>                                                 -- deep thought
>


Daniel Grunblatt.


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