Simon Cozens:
# On Tue, Sep 18, 2001 at 02:32:32PM -0700, Brent Dax wrote:
# > If somebody codes up the alternate dispatch, I can easily modify
# > Configure.pl, config_h.in and the hints files to handle it.
#  Something
# > like this, perhaps:
#
# Something like that, but the Right Way would be to rewrite DO_OP in
# interp_guts.h

So, something more like this?

~~~~~~

--- ..\..\parrot-cvs\parrot\config_h.in Fri Sep 14 09:40:36 2001
+++ config_h.in Tue Sep 18 14:44:48 2001
@@ -24,7 +24,14 @@

 #define MASK_CHUNK_LOW_BITS 0xfffff000

+#define USE_DISPATCH_${dispatch}

+#ifdef USE_DISPATCH_SWITCH
+#      undef DO_OP
+#      define DO_OP <code here>
+#endif
+
+
 ${headers}
--- ..\..\parrot-cvs\parrot\build_interp_starter.pl     Tue Sep 18
10:54:52 2001
+++ build_interp_starter.pl     Tue Sep 18 14:48:26 2001
@@ -59,12 +59,13 @@
 #

 print INTERP <<EOI;
-
-#define DO_OP(w,x,y,z) do { \\
-    x = (void *)z->opcode_funcs; \\
-    (void *)y = x[*w]; \\
-    w = (y)(w,z); \\
- } while (0);
+#ifndef DO_OP
+#      define DO_OP(w,x,y,z) do { \\
+           x = (void *)z->opcode_funcs; \\
+           (void *)y = x[*w]; \\
+           w = (y)(w,z); \\
+        } while (0);
+#endif
 EOI

 # Spit out the OPCODE_FINGERPRINT macro

~~~~~~~

(With, of course, the correct code put in config_h.in, and various
changes and additions to the hints/ folder to automagically suggest the
right dispatch to use.)

--Brent Dax
[EMAIL PROTECTED]

They *will* pay for what they've done.

Reply via email to