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 ) {


On Sat, 3 Nov 2001, Michael Fischer wrote:

> Ok, attached dispatch.diff is the smallest changes
> I could think of to get a Configure.pl time choice
> for func/switch/goto implementations of DO_OP.
>
> Diff made against a 9:45 PM EST copy from cvs.
>
> ISSUES:
>
> 1) goto is gcc-specific.
>
> 2) replaces interp_guts.h with do_op.h

No, it doesn't, it's still using DO_OP from interp_guts.h

>
> 3) the goto is done as a funciton definintion and
>    a #define of DO_OP as said function. The whole
>    business is written into do_op.h. Not the way to
>    do it from best C practice, but it works without
>    jiggering dependencies.

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.

>
> 4) the MOPS _don't_ improve....
>    Which means I'm probably missing something terribly
>    important.

True, as I said before, and if I'm no missing something terribly
important :) , goto_op_dispatch never gets called, and the same actual
'func' dispatch method is always used no matter what you choused.

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

> 6) A few warnings about type mismatch when building with 'goto'
>    Yet make, make test and mops.pbc run fine. Hmm.
>
> Share and enjoy.
>
> Michael
> --
> Michael Fischer                         7.5 million years to run
> [EMAIL PROTECTED]                        printf "%d", 0x2a;
>                                                 -- deep thought
>

Daniel Grunblatt.

Reply via email to