[svn:parrot] r41279 - in trunk: compilers/imcc config/gen/makefiles docs examples/embed include/parrot src src/interp src/runcore t/op
chromatic at svn.parrot.org
chromatic at svn.parrot.org
Tue Sep 15 19:18:05 UTC 2009
Author: chromatic
Date: Tue Sep 15 19:18:04 2009
New Revision: 41279
URL: https://trac.parrot.org/parrot/changeset/41279
Log:
[runcore] Removed JIT runcore. Disabled it in the Makefile, leaving testj and
the like as targets which fall back to the standard testing target. All tests
pass, but now we have a lot of test SKIPs and TODOs to excise.
Modified:
trunk/compilers/imcc/main.c
trunk/config/gen/makefiles/root.in
trunk/docs/embed.pod
trunk/examples/embed/cotorra.c
trunk/include/parrot/call.h
trunk/include/parrot/interpreter.h
trunk/include/parrot/runcore_api.h
trunk/src/embed.c
trunk/src/interp/inter_misc.c
trunk/src/runcore/cores.c
trunk/src/runcore/main.c
trunk/t/op/interp.t
Modified: trunk/compilers/imcc/main.c
==============================================================================
--- trunk/compilers/imcc/main.c Tue Sep 15 18:59:00 2009 (r41278)
+++ trunk/compilers/imcc/main.c Tue Sep 15 19:18:04 2009 (r41279)
@@ -220,8 +220,8 @@
" -L --library add path to library search\n"
" -X --dynext add path to dynamic extension search\n"
" <Run core options>\n"
- " -R --runcore slow|bounds|fast|jit|cgoto|cgp|cgp-jit\n"
- " -R --runcore switch|switch-jit|trace|profiling|gcdebug\n"
+ " -R --runcore slow|bounds|fast|cgoto|cgp\n"
+ " -R --runcore switch|trace|profiling|gcdebug\n"
" -t --trace [flags]\n"
" <VM options>\n"
" -D --parrot-debug[=HEXFLAGS]\n"
@@ -380,11 +380,11 @@
else if (STREQ(opt.opt_arg, "cgoto"))
core |= PARROT_CGOTO_CORE;
else if (STREQ(opt.opt_arg, "jit"))
- core |= PARROT_JIT_CORE;
+ core |= PARROT_FAST_CORE;
else if (STREQ(opt.opt_arg, "cgp-jit"))
- core |= PARROT_CGP_JIT_CORE;
+ core |= PARROT_CGP_CORE;
else if (STREQ(opt.opt_arg, "switch-jit"))
- core |= PARROT_SWITCH_JIT_CORE;
+ core |= PARROT_SWITCH_CORE;
else if (STREQ(opt.opt_arg, "exec"))
core |= PARROT_EXEC_CORE;
else if (STREQ(opt.opt_arg, "trace"))
@@ -489,9 +489,6 @@
IMCC_INFO(interp)->allocator = IMCC_GRAPH_ALLOCATOR;
/* currently not ok due to different register allocation */
- if (strchr(opt.opt_arg, 'j')) {
- core |= PARROT_JIT_CORE;
- }
if (strchr(opt.opt_arg, '1')) {
IMCC_INFO(interp)->optimizer_level |= OPT_PRE;
}
@@ -503,9 +500,6 @@
#ifdef HAVE_COMPUTED_GOTO
core |= PARROT_CGP_CORE;
#endif
-#if JIT_CAPABLE
- core |= PARROT_JIT_CORE;
-#endif
}
break;
Modified: trunk/config/gen/makefiles/root.in
==============================================================================
--- trunk/config/gen/makefiles/root.in Tue Sep 15 18:59:00 2009 (r41278)
+++ trunk/config/gen/makefiles/root.in Tue Sep 15 19:18:04 2009 (r41279)
@@ -1538,7 +1538,6 @@
#IF(cg_flag): testC \
testf \
#IF(cg_flag): testg \
-#IF(jitcapable): testj \
testr \
testS \
src_tests \
@@ -1566,9 +1565,9 @@
testg : test_prep
$(PERL) t/harness $(EXTRA_TEST_ARGS) -g $(RUNCORE_TEST_FILES)
-# JIT core
+# JIT core - target retained, but falls back to standard core
testj : test_prep
- $(PERL) t/harness $(EXTRA_TEST_ARGS) -j $(RUNCORE_TEST_FILES)
+ $(PERL) t/harness $(EXTRA_TEST_ARGS) $(RUNCORE_TEST_FILES)
# normal core, write and run Parrot Byte Code
testr : test_prep
@@ -1578,13 +1577,13 @@
testS : test_prep
$(PERL) t/harness $(EXTRA_TEST_ARGS) -S $(RUNCORE_TEST_FILES)
-# Computed goto jitted core
+# Computed goto jitted core - target retained, but falls back to standard core
testCj : test_prep
- $(PERL) t/harness $(EXTRA_TEST_ARGS) -Cj $(RUNCORE_TEST_FILES)
+ $(PERL) t/harness $(EXTRA_TEST_ARGS) $(RUNCORE_TEST_FILES)
-# switched jitted core
+# switched jitted core - target retained, but falls back to standard core
testSj : test_prep
- $(PERL) t/harness $(EXTRA_TEST_ARGS) -Sj $(RUNCORE_TEST_FILES)
+ $(PERL) t/harness $(EXTRA_TEST_ARGS) $(RUNCORE_TEST_FILES)
# test the EXEC stuff
testexec: test_prep
Modified: trunk/docs/embed.pod
==============================================================================
--- trunk/docs/embed.pod Tue Sep 15 18:59:00 2009 (r41278)
+++ trunk/docs/embed.pod Tue Sep 15 19:18:04 2009 (r41279)
@@ -1,4 +1,4 @@
-# Copyright (C) 2001-2008, Parrot Foundation.
+# Copyright (C) 2001-2009, Parrot Foundation.
# $Id$
=head1 NAME
@@ -165,12 +165,6 @@
=item PARROT_CGOTO_CORE
-=item PARROT_JIT_CORE
-
-=item PARROT_CGP_JIT_CORE
-
-=item PARROT_SWITCH_JIT_CORE
-
=item PARROT_EXEC_CORE
=item PARROT_GC_DEBUG_CORE
Modified: trunk/examples/embed/cotorra.c
==============================================================================
--- trunk/examples/embed/cotorra.c Tue Sep 15 18:59:00 2009 (r41278)
+++ trunk/examples/embed/cotorra.c Tue Sep 15 19:18:04 2009 (r41279)
@@ -110,7 +110,6 @@
{ PARROT_SLOW_CORE, "slow" },
{ PARROT_FAST_CORE, "fast" },
{ PARROT_CGOTO_CORE, "cgoto" },
- { PARROT_JIT_CORE, "jit" },
{ PARROT_GC_DEBUG_CORE, "gcdebug" },
{ PARROT_SWITCH_CORE, "switch" }
};
Modified: trunk/include/parrot/call.h
==============================================================================
--- trunk/include/parrot/call.h Tue Sep 15 18:59:00 2009 (r41278)
+++ trunk/include/parrot/call.h Tue Sep 15 19:18:04 2009 (r41279)
@@ -215,7 +215,7 @@
PARROT_WARN_UNUSED_RESULT
PARROT_CANNOT_RETURN_NULL
PMC* Parrot_pcc_build_sig_object_from_varargs(PARROT_INTERP,
- ARGIN_NULLOK(PMC* obj),
+ ARGIN_NULLOK(PMC *obj),
ARGIN(const char *sig),
va_list args)
__attribute__nonnull__(1)
Modified: trunk/include/parrot/interpreter.h
==============================================================================
--- trunk/include/parrot/interpreter.h Tue Sep 15 18:59:00 2009 (r41278)
+++ trunk/include/parrot/interpreter.h Tue Sep 15 19:18:04 2009 (r41279)
@@ -67,9 +67,6 @@
PARROT_SWITCH_CORE = 0x02, /* P = prederef */
PARROT_CGP_CORE = 0x06, /* CP */
PARROT_CGOTO_CORE = 0x04, /* C = cgoto */
- PARROT_JIT_CORE = 0x10, /* J = JIT */
- PARROT_CGP_JIT_CORE = 0x16, /* JCP */
- PARROT_SWITCH_JIT_CORE = 0x12, /* J P */
PARROT_EXEC_CORE = 0x20, /* TODO Parrot_exec_run variants */
PARROT_GC_DEBUG_CORE = 0x40, /* run GC before each op */
PARROT_DEBUGGER_CORE = 0x80, /* used by parrot debugger */
Modified: trunk/include/parrot/runcore_api.h
==============================================================================
--- trunk/include/parrot/runcore_api.h Tue Sep 15 18:59:00 2009 (r41278)
+++ trunk/include/parrot/runcore_api.h Tue Sep 15 19:18:04 2009 (r41279)
@@ -178,12 +178,6 @@
__attribute__nonnull__(1)
__attribute__nonnull__(2);
-PARROT_WARN_UNUSED_RESULT
-PARROT_CANNOT_RETURN_NULL
-void * init_jit_run(PARROT_INTERP, ARGIN(Parrot_runcore_t *runcore))
- __attribute__nonnull__(1)
- __attribute__nonnull__(2);
-
PARROT_CAN_RETURN_NULL
void * init_prederef(PARROT_INTERP, ARGIN(Parrot_runcore_t *runcore))
__attribute__nonnull__(1)
@@ -199,9 +193,6 @@
void Parrot_runcore_cgp_init(PARROT_INTERP)
__attribute__nonnull__(1);
-void Parrot_runcore_cgp_jit_init(PARROT_INTERP)
- __attribute__nonnull__(1);
-
void Parrot_runcore_debugger_init(PARROT_INTERP)
__attribute__nonnull__(1);
@@ -214,24 +205,15 @@
void Parrot_runcore_gc_debug_init(PARROT_INTERP)
__attribute__nonnull__(1);
-void Parrot_runcore_jit_init(PARROT_INTERP)
- __attribute__nonnull__(1);
-
void Parrot_runcore_slow_init(PARROT_INTERP)
__attribute__nonnull__(1);
void Parrot_runcore_switch_init(PARROT_INTERP)
__attribute__nonnull__(1);
-void Parrot_runcore_switch_jit_init(PARROT_INTERP)
- __attribute__nonnull__(1);
-
#define ASSERT_ARGS_get_core_op_lib_init __attribute__unused__ int _ASSERT_ARGS_CHECK = \
PARROT_ASSERT_ARG(interp) \
|| PARROT_ASSERT_ARG(runcore)
-#define ASSERT_ARGS_init_jit_run __attribute__unused__ int _ASSERT_ARGS_CHECK = \
- PARROT_ASSERT_ARG(interp) \
- || PARROT_ASSERT_ARG(runcore)
#define ASSERT_ARGS_init_prederef __attribute__unused__ int _ASSERT_ARGS_CHECK = \
PARROT_ASSERT_ARG(interp) \
|| PARROT_ASSERT_ARG(runcore)
@@ -242,8 +224,6 @@
PARROT_ASSERT_ARG(interp)
#define ASSERT_ARGS_Parrot_runcore_cgp_init __attribute__unused__ int _ASSERT_ARGS_CHECK = \
PARROT_ASSERT_ARG(interp)
-#define ASSERT_ARGS_Parrot_runcore_cgp_jit_init __attribute__unused__ int _ASSERT_ARGS_CHECK = \
- PARROT_ASSERT_ARG(interp)
#define ASSERT_ARGS_Parrot_runcore_debugger_init __attribute__unused__ int _ASSERT_ARGS_CHECK = \
PARROT_ASSERT_ARG(interp)
#define ASSERT_ARGS_Parrot_runcore_exec_init __attribute__unused__ int _ASSERT_ARGS_CHECK = \
@@ -252,15 +232,10 @@
PARROT_ASSERT_ARG(interp)
#define ASSERT_ARGS_Parrot_runcore_gc_debug_init __attribute__unused__ int _ASSERT_ARGS_CHECK = \
PARROT_ASSERT_ARG(interp)
-#define ASSERT_ARGS_Parrot_runcore_jit_init __attribute__unused__ int _ASSERT_ARGS_CHECK = \
- PARROT_ASSERT_ARG(interp)
#define ASSERT_ARGS_Parrot_runcore_slow_init __attribute__unused__ int _ASSERT_ARGS_CHECK = \
PARROT_ASSERT_ARG(interp)
#define ASSERT_ARGS_Parrot_runcore_switch_init __attribute__unused__ int _ASSERT_ARGS_CHECK = \
PARROT_ASSERT_ARG(interp)
-#define ASSERT_ARGS_Parrot_runcore_switch_jit_init \
- __attribute__unused__ int _ASSERT_ARGS_CHECK = \
- PARROT_ASSERT_ARG(interp)
/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
/* HEADERIZER END: src/runcore/cores.c */
Modified: trunk/src/embed.c
==============================================================================
--- trunk/src/embed.c Tue Sep 15 18:59:00 2009 (r41278)
+++ trunk/src/embed.c Tue Sep 15 19:18:04 2009 (r41279)
@@ -356,15 +356,6 @@
case PARROT_CGOTO_CORE:
Parrot_runcore_switch(interp, Parrot_str_new_constant(interp, "cgoto"));
break;
- case PARROT_JIT_CORE:
- Parrot_runcore_switch(interp, Parrot_str_new_constant(interp, "jit"));
- break;
- case PARROT_CGP_JIT_CORE:
- Parrot_runcore_switch(interp, Parrot_str_new_constant(interp, "cgp_jit"));
- break;
- case PARROT_SWITCH_JIT_CORE:
- Parrot_runcore_switch(interp, Parrot_str_new_constant(interp, "switch_jit"));
- break;
case PARROT_EXEC_CORE:
Parrot_runcore_switch(interp, Parrot_str_new_constant(interp, "exec"));
break;
Modified: trunk/src/interp/inter_misc.c
==============================================================================
--- trunk/src/interp/inter_misc.c Tue Sep 15 18:59:00 2009 (r41278)
+++ trunk/src/interp/inter_misc.c Tue Sep 15 19:18:04 2009 (r41279)
@@ -265,12 +265,6 @@
ret = PARROT_CGP_CORE;
else if (Parrot_str_equal(interp, name, CONST_STRING(interp, "cgoto")))
ret = PARROT_CGOTO_CORE;
- else if (Parrot_str_equal(interp, name, CONST_STRING(interp, "jit")))
- ret = PARROT_JIT_CORE;
- else if (Parrot_str_equal(interp, name, CONST_STRING(interp, "cgp_jit")))
- ret = PARROT_CGP_JIT_CORE;
- else if (Parrot_str_equal(interp, name, CONST_STRING(interp, "switch_jit")))
- ret = PARROT_SWITCH_JIT_CORE;
else if (Parrot_str_equal(interp, name, CONST_STRING(interp, "exec")))
ret = PARROT_EXEC_CORE;
else if (Parrot_str_equal(interp, name, CONST_STRING(interp, "gc_debug")))
Modified: trunk/src/runcore/cores.c
==============================================================================
--- trunk/src/runcore/cores.c Tue Sep 15 18:59:00 2009 (r41278)
+++ trunk/src/runcore/cores.c Tue Sep 15 19:18:04 2009 (r41279)
@@ -325,15 +325,6 @@
PARROT_WARN_UNUSED_RESULT
PARROT_CAN_RETURN_NULL
-static opcode_t * runops_jit_core(PARROT_INTERP,
- ARGIN(Parrot_runcore_t *runcore),
- ARGIN(opcode_t *pc))
- __attribute__nonnull__(1)
- __attribute__nonnull__(2)
- __attribute__nonnull__(3);
-
-PARROT_WARN_UNUSED_RESULT
-PARROT_CAN_RETURN_NULL
static opcode_t * runops_slow_core(PARROT_INTERP,
ARGIN(Parrot_runcore_t *runcore),
ARGIN(opcode_t *pc))
@@ -383,10 +374,6 @@
PARROT_ASSERT_ARG(interp) \
|| PARROT_ASSERT_ARG(runcore) \
|| PARROT_ASSERT_ARG(pc)
-#define ASSERT_ARGS_runops_jit_core __attribute__unused__ int _ASSERT_ARGS_CHECK = \
- PARROT_ASSERT_ARG(interp) \
- || PARROT_ASSERT_ARG(runcore) \
- || PARROT_ASSERT_ARG(pc)
#define ASSERT_ARGS_runops_slow_core __attribute__unused__ int _ASSERT_ARGS_CHECK = \
PARROT_ASSERT_ARG(interp) \
|| PARROT_ASSERT_ARG(runcore) \
@@ -495,67 +482,6 @@
/*
-=item C<void Parrot_runcore_jit_init(PARROT_INTERP)>
-
-Registers the jit runcore with Parrot.
-
-=cut
-
-*/
-
-void
-Parrot_runcore_jit_init(PARROT_INTERP)
-{
- ASSERT_ARGS(Parrot_runcore_jit_init)
-
- Parrot_runcore_t *coredata = mem_allocate_typed(Parrot_runcore_t);
- coredata->name = CONST_STRING(interp, "jit");
- coredata->id = PARROT_JIT_CORE;
- coredata->opinit = PARROT_CORE_OPLIB_INIT;
- coredata->prepare_run = init_jit_run;
- coredata->runops = runops_jit_core;
- coredata->destroy = NULL;
- coredata->flags = 0;
-
- PARROT_RUNCORE_JIT_OPS_SET(coredata);
-
- Parrot_runcore_register(interp, coredata);
-}
-
-
-/*
-
-=item C<void Parrot_runcore_switch_jit_init(PARROT_INTERP)>
-
-Registers the switch_jit runcore with Parrot.
-
-=cut
-
-*/
-
-void
-Parrot_runcore_switch_jit_init(PARROT_INTERP)
-{
- ASSERT_ARGS(Parrot_runcore_switch_jit_init)
-
- Parrot_runcore_t *coredata = mem_allocate_typed(Parrot_runcore_t);
- coredata->name = CONST_STRING(interp, "switch_jit");
- coredata->id = PARROT_SWITCH_JIT_CORE;
- coredata->opinit = PARROT_CORE_SWITCH_OPLIB_INIT;
- coredata->destroy = NULL;
- coredata->prepare_run = init_prederef;
- coredata->runops = runops_switch_core;
- coredata->flags = 0;
-
- PARROT_RUNCORE_PREDEREF_OPS_SET(coredata);
- PARROT_RUNCORE_JIT_OPS_SET(coredata);
-
- Parrot_runcore_register(interp, coredata);
-}
-
-
-/*
-
=item C<void Parrot_runcore_exec_init(PARROT_INTERP)>
Registers the exec runcore with Parrot.
@@ -708,39 +634,6 @@
}
-/*
-
-=item C<void Parrot_runcore_cgp_jit_init(PARROT_INTERP)>
-
-Registers the CGP/JIT runcore with Parrot.
-
-=cut
-
-*/
-
-
-void
-Parrot_runcore_cgp_jit_init(PARROT_INTERP)
-{
- ASSERT_ARGS(Parrot_runcore_cgp_jit_init)
-
- Parrot_runcore_t *coredata = mem_allocate_typed(Parrot_runcore_t);
- coredata->name = CONST_STRING(interp, "cgp_jit");
- coredata->id = PARROT_CGP_JIT_CORE;
- coredata->opinit = PARROT_CORE_CGP_OPLIB_INIT;
- coredata->prepare_run = init_prederef;
- coredata->runops = runops_cgp_core;
- coredata->destroy = NULL;
- coredata->flags = 0;
-
- PARROT_RUNCORE_JIT_OPS_SET(coredata);
- PARROT_RUNCORE_CGOTO_OPS_SET(coredata);
- PARROT_RUNCORE_EVENT_CHECK_SET(coredata);
- PARROT_RUNCORE_PREDEREF_OPS_SET(coredata);
-
- Parrot_runcore_register(interp, coredata);
-}
-
#endif /* #ifdef HAVE_COMPUTED_GOTO */
@@ -1210,73 +1103,6 @@
/*
-=item C<void * init_jit_run(PARROT_INTERP, Parrot_runcore_t *runcore)>
-
-Initializes JIT function for the specified opcode and runs it.
-
-=cut
-
-*/
-
-PARROT_WARN_UNUSED_RESULT
-PARROT_CANNOT_RETURN_NULL
-void *
-init_jit_run(PARROT_INTERP, ARGIN(Parrot_runcore_t *runcore))
-{
- ASSERT_ARGS(init_jit_run)
- return init_jit(interp, interp->code->base.data);
-}
-
-
-#ifdef PARROT_EXEC_OS_AIX
-extern void* aix_get_toc();
-#endif
-
-/*
-
-=item C<static opcode_t * runops_jit_core(PARROT_INTERP, Parrot_runcore_t
-*runcore, opcode_t *pc)>
-
-Runs the JIT code for the specified opcode.
-
-=cut
-
-*/
-
-PARROT_WARN_UNUSED_RESULT
-PARROT_CAN_RETURN_NULL
-static opcode_t *
-runops_jit_core(PARROT_INTERP, ARGIN(Parrot_runcore_t *runcore), ARGIN(opcode_t *pc))
-{
- ASSERT_ARGS(runops_jit_core)
-#if JIT_CAPABLE
-# ifdef PARROT_EXEC_OS_AIX
- /* AIX calling convention requires that function-call-by-ptr be made
- through the following struct: */
- struct ptrgl_t { jit_f functPtr; void *toc; void *env; } ptrgl_t;
-
- ptrgl_t.functPtr = (jit_f) D2FPTR(init_jit(interp, pc));
- ptrgl_t.env = NULL;
-
- /* r2 (TOC) needs to point back here so we can return from non-JIT
- functions */
- ptrgl_t.toc = aix_get_toc();
-
- ((jit_f) D2FPTR(&ptrgl_t)) (interp, pc);
-# else
- jit_f jit_code = (jit_f)(init_jit(interp, pc));
- (jit_code) (interp, pc);
-# endif
-#else
- UNUSED(interp);
- UNUSED(pc);
-#endif
- return NULL;
-}
-
-
-/*
-
=item C<static opcode_t * runops_exec_core(PARROT_INTERP, Parrot_runcore_t
*runcore, opcode_t *pc)>
@@ -1310,18 +1136,7 @@
# endif
# endif
# endif
- if (Parrot_exec_run == 2) {
- void *ignored;
- Parrot_exec_run = 0;
-
- Parrot_runcore_switch(interp, CONST_STRING(interp, "jit"));
-
- ignored = runops_jit_core(interp, runcore, pc);
- UNUSED(ignored);
-
- Parrot_runcore_switch(interp, CONST_STRING(interp, "exec"));
- }
- else if (Parrot_exec_run == 1)
+ if (Parrot_exec_run == 1)
Parrot_exec(interp, pc, code_start, code_end);
else
run_native(interp, pc, code_start);
Modified: trunk/src/runcore/main.c
==============================================================================
--- trunk/src/runcore/main.c Tue Sep 15 18:59:00 2009 (r41278)
+++ trunk/src/runcore/main.c Tue Sep 15 19:18:04 2009 (r41279)
@@ -141,8 +141,6 @@
Parrot_runcore_fast_init(interp);
Parrot_runcore_switch_init(interp);
- Parrot_runcore_jit_init(interp);
- Parrot_runcore_switch_jit_init(interp);
Parrot_runcore_exec_init(interp);
Parrot_runcore_gc_debug_init(interp);
Parrot_runcore_debugger_init(interp);
@@ -155,7 +153,6 @@
#ifdef HAVE_COMPUTED_GOTO
Parrot_runcore_cgp_init(interp);
Parrot_runcore_cgoto_init(interp);
- Parrot_runcore_cgp_jit_init(interp);
#endif
}
Modified: trunk/t/op/interp.t
==============================================================================
--- trunk/t/op/interp.t Tue Sep 15 18:59:00 2009 (r41278)
+++ trunk/t/op/interp.t Tue Sep 15 19:18:04 2009 (r41279)
@@ -162,9 +162,6 @@
if $I0 == .PARROT_SWITCH_CORE goto ok1
if $I0 == .PARROT_CGOTO_CORE goto ok1
if $I0 == .PARROT_CGP_CORE goto ok1
- if $I0 == .PARROT_JIT_CORE goto ok1
- if $I0 == .PARROT_SWITCH_JIT_CORE goto ok1
- if $I0 == .PARROT_CGP_JIT_CORE goto ok1
if $I0 == .PARROT_EXEC_CORE goto ok1
if $I0 == .PARROT_GC_DEBUG_CORE goto ok1
print 'not '
More information about the parrot-commits
mailing list