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

Re: Yet another switch/goto implementation

Thread Previous | Thread Next
From:
Michael Fischer
Date:
November 4, 2001 11:07
Subject:
Re: Yet another switch/goto implementation
Message ID:
20011104140820.A3916@sknight.earthlink.net
On Nov 04, Daniel Grunblatt <daniel@grunblatt.com.ar> took up a keyboard and banged out
> 
> 
> On Sun, 4 Nov 2001, Michael Fischer wrote:
> 
> > On Nov 04, Daniel Grunblatt <daniel@grunblatt.com.ar> took up a keyboard and banged out

> > > 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?

Um, that would be the case on the function and switch cases, where
the break's cause us to fall out of the switch. 

In the goto case, we spin. And perhaps I am broken there. End
really wants to return, not just set the pc, but I hadn't thought
of a clever way to do that corner case, and wanted to see what
the behavior would be without it. I suspect I need it.

Hmm, hand hacking that didn't help...

> > 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?

Indeed. Much experimenting to be done all around.


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

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