Daniel Grunblatt.
Index: Configure.pl
===================================================================
RCS file: /home/perlcvs/parrot/Configure.pl,v
retrieving revision 1.47
diff -u -r1.47 Configure.pl
--- Configure.pl 31 Dec 2001 03:05:59 -0000 1.47
+++ Configure.pl 31 Dec 2001 04:15:15 -0000
@@ -159,6 +159,10 @@
jitosname => $jitosname,
jitarchname => $jitarchname,
jitcapable => $jitcapable,
+ cc_hasjit => '',
+ jit_h => '',
+ jit_struct_h => '',
+ jit_o => '',
cp => 'cp',
slash => '/',
@@ -183,7 +187,13 @@
$c{cc_warn} .= " -ansi -pedantic" if $opt_pedantic;
}
-
+# Add the -DHAS_JIT if we're jitcapapable
+if ($jitcapable) {
+ $c{cc_hasjit} = " -DHAS_JIT";
+ $c{jit_h} = "\$(INC)/jit.h";
+ $c{jit_struct_h} = "\$(INC)/jit_struct.h";
+ $c{jit_o} = "jit\$(O)";
+}
#
# Copy the things from --define foo=bar
Index: Makefile.in
===================================================================
RCS file: /home/perlcvs/parrot/Makefile.in,v
retrieving revision 1.93
diff -u -r1.93 Makefile.in
--- Makefile.in 31 Dec 2001 03:05:59 -0000 1.93
+++ Makefile.in 31 Dec 2001 04:15:16 -0000
@@ -63,7 +63,7 @@
$(INC)/global_setup.h $(INC)/vtable.h $(INC)/oplib/core_ops.h
$(INC)/oplib/core_ops_prederef.h \
$(INC)/runops_cores.h $(INC)/trace.h \
$(INC)/pmc.h $(INC)/key.h $(INC)/resources.h $(INC)/platform.h \
-$(INC)/interp_guts.h $(INC)/jit.h $(INC)/jit_struct.h
+$(INC)/interp_guts.h ${jit_h} ${jit_struct_h}
CLASS_O_FILES = classes/default$(O) classes/perlint$(O) classes/perlstring$(O) \
classes/perlnum$(O) classes/perlarray$(O) classes/perlundef$(O)
@@ -76,7 +76,7 @@
INTERP_O_FILES = global_setup$(O) interpreter$(O) parrot$(O) register$(O) \
core_ops$(O) core_ops_prederef$(O) memory$(O) packfile$(O) stacks$(O) \
string$(O) encoding$(O) chartype$(O) runops_cores$(O) trace$(O) pmc$(O) key$(O) \
-platform$(O) jit$(O) resources$(O)
+platform$(O) ${jit_o} resources$(O)
O_FILES = $(INTERP_O_FILES) $(CLASS_O_FILES) $(ENCODING_O_FILES) $(CHARTYPE_O_FILES)
@@ -91,7 +91,7 @@
#
###############################################################################
-CFLAGS = ${ccflags} ${cc_warn} ${cc_debug} ${cc_inc}
+CFLAGS = ${ccflags} ${cc_warn} ${cc_debug} ${cc_inc} ${cc_hasjit}
C_LIBS = ${libs}
Index: interpreter.c
===================================================================
RCS file: /home/perlcvs/parrot/interpreter.c,v
retrieving revision 1.44
diff -u -r1.44 interpreter.c
--- interpreter.c 30 Dec 2001 17:26:55 -0000 1.44
+++ interpreter.c 31 Dec 2001 04:15:17 -0000
@@ -15,7 +15,9 @@
#include "parrot/oplib/core_ops.h"
#include "parrot/oplib/core_ops_prederef.h"
#include "parrot/runops_cores.h"
+#ifdef HAS_JIT
#include "parrot/jit.h"
+#endif
/*=for api interpreter check_fingerprint
@@ -280,8 +282,10 @@
code_size = interpreter->code->byte_code_size;
code_end = (opcode_t *)(interpreter->code->byte_code + code_size);
+#ifdef HAS_JIT
jit_code = build_asm(interpreter, pc, code_start, code_end);
((*(void (*)())jit_code)());
+#endif
}