Index: runtime/parrot/library/distutils.pir =================================================================== --- runtime/parrot/library/distutils.pir (.../trunk) (revision 45837) +++ runtime/parrot/library/distutils.pir (.../branches/runcore_purge) (revision 45883) @@ -1276,9 +1276,6 @@ .sub 'get_cores' $P0 = new 'Hash' $P0['C'] = '' -# $P0['CGP'] = '_cgp' -# $P0['CGoto'] = '_cg' - $P0['CSwitch'] = '_switch' .return ($P0) .end @@ -4284,9 +4281,6 @@ flags .= " " $S0 = $P0['cc_hasjit'] flags .= $S0 - flags .= " " - $S0 = $P0['cg_flag'] - flags .= $S0 .return (flags) .end Index: src/embed.c =================================================================== --- src/embed.c (.../trunk) (revision 45837) +++ src/embed.c (.../branches/runcore_purge) (revision 45883) @@ -336,15 +336,6 @@ case PARROT_FAST_CORE: Parrot_runcore_switch(interp, Parrot_str_new_constant(interp, "fast")); break; - case PARROT_SWITCH_CORE: - Parrot_runcore_switch(interp, Parrot_str_new_constant(interp, "switch")); - break; - case PARROT_CGP_CORE: - Parrot_runcore_switch(interp, Parrot_str_new_constant(interp, "cgp")); - break; - case PARROT_CGOTO_CORE: - Parrot_runcore_switch(interp, Parrot_str_new_constant(interp, "cgoto")); - break; case PARROT_EXEC_CORE: Parrot_runcore_switch(interp, Parrot_str_new_constant(interp, "exec")); break; Index: src/dynoplibs/Rules.in =================================================================== --- src/dynoplibs/Rules.in (.../trunk) (revision 45837) +++ src/dynoplibs/Rules.in (.../branches/runcore_purge) (revision 45883) @@ -14,42 +14,6 @@ src/dynoplibs/obscure_ops.c: src/dynoplibs/obscure.ops $(BUILD_TOOLS_DIR)/ops2c.pl $(PERL) $(BUILD_TOOLS_DIR)/ops2c.pl C --dynamic src/dynoplibs/obscure.ops -$(DYNEXT_DIR)/obscure_ops_switch$(LOAD_EXT): src/dynoplibs/obscure_ops_switch$(O) $(LIBPARROT) - $(LD) @ld_out@$@ src/dynoplibs/obscure_ops_switch$(O) $(LINKARGS) -#IF(win32): if exist $@.manifest mt.exe -nologo -manifest $@.manifest -outputresource:$@;2 -#IF(cygwin or hpux): $(CHMOD) 0775 $@ - -src/dynoplibs/obscure_ops_switch$(O): include/pmc/pmc_parrotlibrary.h include/pmc/pmc_callcontext.h src/dynoplibs/obscure_ops_switch.c $(PARROT_H_HEADERS) - -src/dynoplibs/obscure_ops_switch.h: src/dynoplibs/obscure_ops_switch.c - -src/dynoplibs/obscure_ops_switch.c: src/dynoplibs/obscure.ops $(BUILD_TOOLS_DIR)/ops2c.pl - $(PERL) $(BUILD_TOOLS_DIR)/ops2c.pl CSwitch --dynamic src/dynoplibs/obscure.ops - -$(DYNEXT_DIR)/obscure_ops_cg$(LOAD_EXT): src/dynoplibs/obscure_ops_cg$(O) $(LIBPARROT) - $(LD) @ld_out@$@ src/dynoplibs/obscure_ops_cg$(O) $(LINKARGS) -#IF(win32): if exist $@.manifest mt.exe -nologo -manifest $@.manifest -outputresource:$@;2 -#IF(cygwin or hpux): $(CHMOD) 0775 $@ - -src/dynoplibs/obscure_ops_cg$(O): include/pmc/pmc_parrotlibrary.h include/pmc/pmc_callcontext.h src/dynoplibs/obscure_ops_cg.c $(PARROT_H_HEADERS) - -src/dynoplibs/obscure_ops_cg.h: src/dynoplibs/obscure_ops_cg.c - -src/dynoplibs/obscure_ops_cg.c: src/dynoplibs/obscure.ops $(BUILD_TOOLS_DIR)/ops2c.pl - $(PERL) $(BUILD_TOOLS_DIR)/ops2c.pl CGoto --dynamic src/dynoplibs/obscure.ops - -$(DYNEXT_DIR)/obscure_ops_cgp$(LOAD_EXT): src/dynoplibs/obscure_ops_cgp$(O) $(LIBPARROT) - $(LD) @ld_out@$@ src/dynoplibs/obscure_ops_cgp$(O) $(LINKARGS) -#IF(win32): if exist $@.manifest mt.exe -nologo -manifest $@.manifest -outputresource:$@;2 -#IF(cygwin or hpux): $(CHMOD) 0775 $@ - -src/dynoplibs/obscure_ops_cgp$(O): include/pmc/pmc_parrotlibrary.h include/pmc/pmc_callcontext.h src/dynoplibs/obscure_ops_cgp.c $(PARROT_H_HEADERS) - -src/dynoplibs/obscure_ops_cgp.h: src/dynoplibs/obscure_ops_cgp.c - -src/dynoplibs/obscure_ops_cgp.c: src/dynoplibs/obscure.ops $(BUILD_TOOLS_DIR)/ops2c.pl - $(PERL) $(BUILD_TOOLS_DIR)/ops2c.pl CGP --dynamic src/dynoplibs/obscure.ops - $(DYNEXT_DIR)/math_ops$(LOAD_EXT): src/dynoplibs/math_ops$(O) $(LIBPARROT) $(LD) @ld_out@$@ src/dynoplibs/math_ops$(O) $(LINKARGS) #IF(win32): if exist $@.manifest mt.exe -nologo -manifest $@.manifest -outputresource:$@;2 @@ -62,38 +26,3 @@ src/dynoplibs/math_ops.h: src/dynoplibs/math_ops.c -$(DYNEXT_DIR)/math_ops_switch$(LOAD_EXT): src/dynoplibs/math_ops_switch$(O) $(LIBPARROT) - $(LD) @ld_out@$@ src/dynoplibs/math_ops_switch$(O) $(LINKARGS) -#IF(win32): if exist $@.manifest mt.exe -nologo -manifest $@.manifest -outputresource:$@;2 -#IF(cygwin or hpux): $(CHMOD) 0775 $@ - -src/dynoplibs/math_ops_switch$(O): include/pmc/pmc_parrotlibrary.h include/pmc/pmc_callcontext.h src/dynoplibs/math_ops_switch.c $(PARROT_H_HEADERS) - -src/dynoplibs/math_ops_switch.h: src/dynoplibs/math_ops_switch.c - -src/dynoplibs/math_ops_switch.c: src/dynoplibs/math.ops $(BUILD_TOOLS_DIR)/ops2c.pl - $(PERL) $(BUILD_TOOLS_DIR)/ops2c.pl CSwitch --dynamic src/dynoplibs/math.ops - -$(DYNEXT_DIR)/math_ops_cg$(LOAD_EXT): src/dynoplibs/math_ops_cg$(O) $(LIBPARROT) - $(LD) @ld_out@$@ src/dynoplibs/math_ops_cg$(O) $(LINKARGS) -#IF(win32): if exist $@.manifest mt.exe -nologo -manifest $@.manifest -outputresource:$@;2 -#IF(cygwin or hpux): $(CHMOD) 0775 $@ - -src/dynoplibs/math_ops_cg$(O): include/pmc/pmc_parrotlibrary.h include/pmc/pmc_callcontext.h src/dynoplibs/math_ops_cg.c $(PARROT_H_HEADERS) - -src/dynoplibs/math_ops_cg.h: src/dynoplibs/math_ops_cg.c - -src/dynoplibs/math_ops_cg.c: src/dynoplibs/math.ops $(BUILD_TOOLS_DIR)/ops2c.pl - $(PERL) $(BUILD_TOOLS_DIR)/ops2c.pl CGoto --dynamic src/dynoplibs/math.ops - -$(DYNEXT_DIR)/math_ops_cgp$(LOAD_EXT): src/dynoplibs/math_ops_cgp$(O) $(LIBPARROT) - $(LD) @ld_out@$@ src/dynoplibs/math_ops_cgp$(O) $(LINKARGS) -#IF(win32): if exist $@.manifest mt.exe -nologo -manifest $@.manifest -outputresource:$@;2 -#IF(cygwin or hpux): $(CHMOD) 0775 $@ - -src/dynoplibs/math_ops_cgp$(O): include/pmc/pmc_parrotlibrary.h include/pmc/pmc_callcontext.h src/dynoplibs/math_ops_cgp.c $(PARROT_H_HEADERS) - -src/dynoplibs/math_ops_cgp.h: src/dynoplibs/math_ops_cgp.c - -src/dynoplibs/math_ops_cgp.c: src/dynoplibs/math.ops $(BUILD_TOOLS_DIR)/ops2c.pl - $(PERL) $(BUILD_TOOLS_DIR)/ops2c.pl CGP --dynamic src/dynoplibs/math.ops Index: src/dynoplibs/Defines.in =================================================================== --- src/dynoplibs/Defines.in (.../trunk) (revision 45837) +++ src/dynoplibs/Defines.in (.../branches/runcore_purge) (revision 45883) @@ -1,12 +1,6 @@ DYNOPLIBS_TARGETS = \ -#IF(cg_flag): $(DYNEXT_DIR)/obscure_ops_cg$(LOAD_EXT) \ -#IF(cg_flag): $(DYNEXT_DIR)/obscure_ops_cgp$(LOAD_EXT) \ $(DYNEXT_DIR)/obscure_ops$(LOAD_EXT) \ - $(DYNEXT_DIR)/obscure_ops_switch$(LOAD_EXT) \ -#IF(cg_flag): $(DYNEXT_DIR)/math_ops_cg$(LOAD_EXT) \ -#IF(cg_flag): $(DYNEXT_DIR)/math_ops_cgp$(LOAD_EXT) \ $(DYNEXT_DIR)/math_ops$(LOAD_EXT) \ - $(DYNEXT_DIR)/math_ops_switch$(LOAD_EXT) DYNOPLIBS_CLEANUPS = \ src/dynoplibs/*.c \ Index: src/pmc/callcontext.pmc =================================================================== --- src/pmc/callcontext.pmc (.../trunk) (revision 45837) +++ src/pmc/callcontext.pmc (.../branches/runcore_purge) (revision 45883) @@ -434,10 +434,6 @@ ATTR UINTVAL trace_flags; ATTR UINTVAL recursion_depth; /* Sub call recursion depth */ - /* code->prederefed.code - code->base.data in opcodes - * to simplify conversion between code ptrs in e.g. invoke */ - ATTR size_t pred_offset; - /* Storage for arguments */ ATTR struct Pcc_cell *positionals; /* array of positionals */ ATTR INTVAL num_positionals; /* count of used positionals */ Index: src/packfile.c =================================================================== --- src/packfile.c (.../trunk) (revision 45837) +++ src/packfile.c (.../branches/runcore_purge) (revision 45883) @@ -684,12 +684,6 @@ Parrot_runcore_t *old_core = interp->run_core; PMC *retval = PMCNULL; - /* turn off JIT and prederef - both would act on the whole - * PackFile which probably isn't worth the effort */ - if (PARROT_RUNCORE_JIT_OPS_TEST(interp->run_core) - || PARROT_RUNCORE_PREDEREF_OPS_TEST(interp->run_core)) - Parrot_runcore_switch(interp, CONST_STRING(interp, "fast")); - Parrot_pcc_set_constants(interp, CURRENT_CONTEXT(interp), interp->code->const_table->constants); @@ -2581,16 +2575,6 @@ ASSERT_ARGS(byte_code_destroy) PackFile_ByteCode * const byte_code = (PackFile_ByteCode *)self; - if (byte_code->prederef.code) { - Parrot_free_memalign(byte_code->prederef.code); - byte_code->prederef.code = NULL; - - if (byte_code->prederef.branches) { - mem_gc_free(interp, byte_code->prederef.branches); - byte_code->prederef.branches = NULL; - } - } - byte_code->fixups = NULL; byte_code->const_table = NULL; byte_code->debugs = NULL; @@ -3099,10 +3083,6 @@ ? find_constants(interp, new_cs->const_table) : new_cs->const_table->constants); - /* new_cs->const_table->constants; */ - Parrot_pcc_set_pred_offset(interp, CURRENT_CONTEXT(interp), - new_cs->base.data - (opcode_t*) new_cs->prederef.code); - if (really) prepare_for_run(interp); Index: src/interp/inter_misc.c =================================================================== --- src/interp/inter_misc.c (.../trunk) (revision 45837) +++ src/interp/inter_misc.c (.../branches/runcore_purge) (revision 45883) @@ -237,12 +237,6 @@ else if (Parrot_str_equal(interp, name, CONST_STRING(interp, "fast"))) return PARROT_FAST_CORE; else if (Parrot_str_equal(interp, name, CONST_STRING(interp, "switch"))) - return PARROT_SWITCH_CORE; - else if (Parrot_str_equal(interp, name, CONST_STRING(interp, "cgp"))) - return PARROT_CGP_CORE; - else if (Parrot_str_equal(interp, name, CONST_STRING(interp, "cgoto"))) - return PARROT_CGOTO_CORE; - else if (Parrot_str_equal(interp, name, CONST_STRING(interp, "exec"))) return PARROT_EXEC_CORE; else if (Parrot_str_equal(interp, name, CONST_STRING(interp, "gc_debug"))) return PARROT_GC_DEBUG_CORE; Index: src/main.c =================================================================== --- src/main.c (.../trunk) (revision 45837) +++ src/main.c (.../branches/runcore_purge) (revision 45883) @@ -301,8 +301,8 @@ " --hash-seed F00F specify hex value to use as hash seed\n" " -X --dynext add path to dynamic extension search\n" " \n" - " -R --runcore slow|bounds|fast|cgoto|cgp\n" - " -R --runcore switch|trace|profiling|gcdebug\n" + " -R --runcore slow|bounds|fast\n" + " -R --runcore trace|profiling|gcdebug\n" " -t --trace [flags]\n" " \n" " -D --parrot-debug[=HEXFLAGS]\n" @@ -461,18 +461,8 @@ *core = PARROT_SLOW_CORE; else if (STREQ(opt.opt_arg, "fast") || STREQ(opt.opt_arg, "function")) *core = PARROT_FAST_CORE; - else if (STREQ(opt.opt_arg, "switch")) - *core = PARROT_SWITCH_CORE; - else if (STREQ(opt.opt_arg, "cgp")) - *core = PARROT_CGP_CORE; - else if (STREQ(opt.opt_arg, "cgoto")) - *core = PARROT_CGOTO_CORE; else if (STREQ(opt.opt_arg, "jit")) *core = PARROT_FAST_CORE; - else if (STREQ(opt.opt_arg, "cgp-jit")) - *core = PARROT_CGP_CORE; - else if (STREQ(opt.opt_arg, "switch-jit")) - *core = PARROT_SWITCH_CORE; else if (STREQ(opt.opt_arg, "exec")) *core = PARROT_EXEC_CORE; else if (STREQ(opt.opt_arg, "trace")) Index: src/call/context.c =================================================================== --- src/call/context.c (.../trunk) (revision 45837) +++ src/call/context.c (.../branches/runcore_purge) (revision 45883) @@ -321,7 +321,6 @@ ctx->current_object = NULL; ctx->handlers = PMCNULL; ctx->caller_ctx = NULL; - ctx->pred_offset = 0; ctx->current_sig = PMCNULL; ctx->current_sub = PMCNULL; @@ -331,7 +330,6 @@ ctx->warns = old->warns; ctx->errors = old->errors; ctx->trace_flags = old->trace_flags; - ctx->pred_offset = old->pred_offset; ctx->current_HLL = old->current_HLL; ctx->current_namespace = old->current_namespace; /* end COW */ @@ -343,7 +341,6 @@ ctx->warns = 0; ctx->errors = 0; ctx->trace_flags = 0; - ctx->pred_offset = 0; ctx->current_HLL = 0; ctx->current_namespace = PMCNULL; ctx->recursion_depth = 0; Index: src/call/pcc.c =================================================================== --- src/call/pcc.c (.../trunk) (revision 45837) +++ src/call/pcc.c (.../branches/runcore_purge) (revision 45883) @@ -356,9 +356,6 @@ Parrot_runcore_t *old_core = interp->run_core; const opcode_t offset = dest - interp->code->base.data; - if (PARROT_RUNCORE_PREDEREF_OPS_TEST(interp->run_core)) - Parrot_runcore_switch(interp, CONST_STRING(interp, "slow")); - runops(interp, offset); Interp_core_SET(interp, old_core); } Index: src/call/context_accessors.c =================================================================== --- src/call/context_accessors.c (.../trunk) (revision 45837) +++ src/call/context_accessors.c (.../branches/runcore_purge) (revision 45883) @@ -471,38 +471,6 @@ /* -=item C - -=item C - -Get/set pred_offset - -=cut - -*/ - -PARROT_EXPORT -size_t -Parrot_pcc_get_pred_offset_func(PARROT_INTERP, ARGIN(PMC *ctx)) -{ - ASSERT_ARGS(Parrot_pcc_get_pred_offset_func) - Parrot_Context const *c = get_context_struct_fast(interp, ctx); - return c->pred_offset; -} - -PARROT_EXPORT -void -Parrot_pcc_set_pred_offset_func(PARROT_INTERP, ARGIN(PMC *ctx), size_t pred_offset) -{ - ASSERT_ARGS(Parrot_pcc_set_pred_offset_func) - Parrot_Context *c = get_context_struct_fast(interp, ctx); - c->pred_offset = pred_offset; -} - - -/* - =item C Index: src/runcore/main.c =================================================================== --- src/runcore/main.c (.../trunk) (revision 45837) +++ src/runcore/main.c (.../branches/runcore_purge) (revision 45883) @@ -22,14 +22,9 @@ #include "parrot/runcore_api.h" #include "parrot/runcore_profiling.h" #include "parrot/oplib/core_ops.h" -#include "parrot/oplib/core_ops_switch.h" #include "parrot/oplib/ops.h" #include "main.str" -#ifdef HAVE_COMPUTED_GOTO -# include "parrot/oplib/core_ops_cg.h" -# include "parrot/oplib/core_ops_cgp.h" -#endif #include "parrot/dynext.h" #include "pmc/pmc_parrotlibrary.h" #include "pmc/pmc_callcontext.h" @@ -44,12 +39,6 @@ static void dynop_register_switch(PARROT_INTERP, size_t n_old, size_t n_new) __attribute__nonnull__(1); -static void dynop_register_xx(PARROT_INTERP, - size_t n_old, - size_t n_new, - oplib_init_f init_func) - __attribute__nonnull__(1); - PARROT_WARN_UNUSED_RESULT PARROT_CANNOT_RETURN_NULL static oplib_init_f get_dynamic_op_lib_init(SHIM_INTERP, @@ -62,25 +51,13 @@ __attribute__nonnull__(1) __attribute__nonnull__(2); -static void stop_prederef(PARROT_INTERP) - __attribute__nonnull__(1); - -static void turn_ev_check(PARROT_INTERP, int on) - __attribute__nonnull__(1); - #define ASSERT_ARGS_dynop_register_switch __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ PARROT_ASSERT_ARG(interp)) -#define ASSERT_ARGS_dynop_register_xx __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ - PARROT_ASSERT_ARG(interp)) #define ASSERT_ARGS_get_dynamic_op_lib_init __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ PARROT_ASSERT_ARG(lib)) #define ASSERT_ARGS_notify_func_table __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ PARROT_ASSERT_ARG(interp) \ , PARROT_ASSERT_ARG(table)) -#define ASSERT_ARGS_stop_prederef __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ - PARROT_ASSERT_ARG(interp)) -#define ASSERT_ARGS_turn_ev_check __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: static */ @@ -105,7 +82,6 @@ Parrot_runcore_slow_init(interp); Parrot_runcore_fast_init(interp); - Parrot_runcore_switch_init(interp); Parrot_runcore_exec_init(interp); Parrot_runcore_gc_debug_init(interp); @@ -115,11 +91,6 @@ /* set the default runcore */ Parrot_runcore_switch(interp, default_core); - -#ifdef HAVE_COMPUTED_GOTO - Parrot_runcore_cgp_init(interp); - Parrot_runcore_cgoto_init(interp); -#endif } @@ -187,44 +158,6 @@ /* -=item C - -Turn on or off event checking for prederefed cores. - -Fills in the C opcode, or restores original ops in all -branch locations of the opcode stream. - -Note that when C is true, this is being called from the event -handler thread. - -=cut - -*/ - -static void -turn_ev_check(PARROT_INTERP, int on) -{ - ASSERT_ARGS(turn_ev_check) - const Prederef * const pi = &interp->code->prederef; - size_t i; - - if (!pi->branches) - return; - - for (i = 0; i < pi->n_branches; ++i) { - const size_t offs = pi->branches[i].offs; - if (on) - interp->code->prederef.code[offs] = - ((void **)interp->op_lib->op_func_table) - [CORE_OPS_check_events__]; - else - interp->code->prederef.code[offs] = pi->branches[i].op; - } -} - - -/* - =item C @@ -249,33 +182,6 @@ /* -=item C - -Restore the interpreter's op function tables to their initial state. -Also recreate the event function pointers. This is only necessary -for run-core changes, but we don't know the old run core. - -=cut - -*/ - -static void -stop_prederef(PARROT_INTERP) -{ - ASSERT_ARGS(stop_prederef) - interp->op_func_table = PARROT_CORE_OPLIB_INIT(interp, 1)->op_func_table; - - if (interp->evc_func_table) { - mem_gc_free(interp, interp->evc_func_table); - interp->evc_func_table = NULL; - } - - Parrot_setup_event_func_ptrs(interp); -} - - -/* - =item C Prepares to run the interpreter's run core. @@ -337,7 +243,6 @@ if ((int)interp->resume_offset < 0) Parrot_ex_throw_from_c_args(interp, NULL, 1, "branch_cs: illegal resume offset"); - stop_prederef(interp); } } } @@ -397,9 +302,6 @@ Parrot_runcore_destroy(PARROT_INTERP) { ASSERT_ARGS(Parrot_runcore_destroy) -#ifdef HAVE_COMPUTED_GOTO - op_lib_t *cg_lib; -#endif size_t num_cores = interp->num_cores; size_t i; @@ -423,19 +325,6 @@ if (interp->n_libs <= 0) return; -#ifdef HAVE_COMPUTED_GOTO - cg_lib = PARROT_CORE_CGP_OPLIB_INIT(interp, 1); - - if (cg_lib->op_func_table) - mem_gc_free(interp, cg_lib->op_func_table); - cg_lib->op_func_table = NULL; - - cg_lib = PARROT_CORE_CG_OPLIB_INIT(interp, 1); - if (cg_lib->op_func_table) - mem_gc_free(interp, cg_lib->op_func_table); - cg_lib->op_func_table = NULL; -#endif - mem_gc_free(interp, interp->op_info_table); mem_gc_free(interp, interp->op_func_table); interp->op_info_table = NULL; @@ -560,131 +449,12 @@ core->flags = OP_FUNC_IS_ALLOCATED | OP_INFO_IS_ALLOCATED; /* done for plain core */ -#ifdef HAVE_COMPUTED_GOTO - dynop_register_xx(interp, n_old, n_new, PARROT_CORE_CGP_OPLIB_INIT); - dynop_register_xx(interp, n_old, n_new, PARROT_CORE_CG_OPLIB_INIT); -#endif - dynop_register_switch(interp, n_old, n_new); } -/* -=item C -Register C with other cores. - -=cut - -*/ - -#ifdef HAVE_COMPUTED_GOTO - -static void -dynop_register_xx(PARROT_INTERP, - size_t n_old, size_t n_new, oplib_init_f init_func) -{ - ASSERT_ARGS(dynop_register_xx) - const size_t n_tot = n_old + n_new; - op_func_t *ops_addr = NULL; - op_lib_t *cg_lib = init_func(interp, 1); - -# if 0 - /* related to CG and CGP ops issue below */ - op_lib_t *new_lib; - STRING *op_variant; - oplib_init_f new_init_func; - PMC *lib_variant; -# endif - - if (cg_lib->flags & OP_FUNC_IS_ALLOCATED) { - ops_addr = mem_gc_realloc_n_typed_zeroed(interp, - cg_lib->op_func_table, n_tot, n_old, op_func_t); - } - else { - size_t i; - - ops_addr = mem_gc_allocate_n_zeroed_typed(interp, n_tot, op_func_t); - cg_lib->flags = OP_FUNC_IS_ALLOCATED; - - for (i = 0; i < n_old; ++i) - ops_addr[i] = cg_lib->op_func_table[i]; - } - - /* - * XXX running CG and CGP ops currently works only via the wrapper - * - * the problem is: - * The actual runcores cg_core and cgp_core are very big functions. - * The C compiler usually addresses "spilled" registers in the C stack. - * The loaded opcode lib is another possibly big function, but with - * a likely different stack layout. Directly jumping around between - * code locations in these two opcode functions works, but access - * to stack-ed (or spilled) variables fails badly. - * - * We would need to prepare the assembly source of the opcode - * lib so that all variable access on the stack has the same - * layout and compile the prepared assembly to ops_cgp?.o - * - * The switched core is different anyway, as we can't extend the - * compiled big switch statement with the new cases. We have - * always to use the wrapper__ opcode called from the default case. - */ -# if 0 - /* check if the lib_pmc exists with a _xx flavor */ - new_init_func = get_op_lib_init(0, 0, lib_pmc); - new_lib = new_init_func(1); - op_variant = Parrot_sprintf_c(interp, "%s_ops%s", - new_lib->name, cg_lib->suffix); - lib_variant = Parrot_load_lib(interp, op_variant, NULL); - - /* XXX running CG and CGP ops currently works only via the wrapper */ - if (0 /*lib_variant */) { - size_t i; - - new_init_func = get_dynamic_op_lib_init(interp, lib_variant); - new_lib = new_init_func(1); - - for (i = n_old; i < n_tot; ++i) - ops_addr[i] = (new_lib->op_func_table)[i - n_old]; - - new_lib->op_func_table = ops_addr; - new_lib->op_count = n_tot; - - new_init_func((long) ops_addr); - } - else -# endif - { - size_t i; - - /* if not install wrappers */ - /* fill new entries with the wrapper op */ - for (i = n_old; i < n_tot; ++i) - ops_addr[i] = ops_addr[CORE_OPS_wrapper__]; - } - - /* if we are running this core, update event check ops */ - if (interp->run_core->id == cg_lib->core_type) { - size_t i; - - for (i = n_old; i < n_tot; ++i) - interp->evc_func_table[i] = - (op_func_t)ops_addr[CORE_OPS_check_events__]; - interp->save_func_table = ops_addr; - } - - /* tell the cg_core about the new jump table */ - cg_lib->op_func_table = ops_addr; - cg_lib->op_count = n_tot; - init_func(interp, (long) ops_addr); -} - -#endif - - /* =item Cop_count = n_old + n_new; } @@ -729,9 +499,6 @@ PARROT_ASSERT(table); interp->op_func_table = table; } - - if (PARROT_RUNCORE_EVENT_CHECK_TEST(interp->run_core)) - turn_ev_check(interp, on); } Index: src/runcore/cores.c =================================================================== --- src/runcore/cores.c (.../trunk) (revision 45837) +++ src/runcore/cores.c (.../branches/runcore_purge) (revision 45883) @@ -249,17 +249,11 @@ #include "parrot/oplib/ops.h" #include "parrot/oplib/core_ops.h" -#include "parrot/oplib/core_ops_switch.h" #include "parrot/dynext.h" #include "pmc/pmc_sub.h" #include "pmc/pmc_callcontext.h" -#ifdef HAVE_COMPUTED_GOTO -# include "parrot/oplib/core_ops_cg.h" -# include "parrot/oplib/core_ops_cgp.h" -#endif - #ifdef WIN32 # define getpid _getpid #endif @@ -271,23 +265,6 @@ PARROT_WARN_UNUSED_RESULT PARROT_CAN_RETURN_NULL -static opcode_t * runops_cgoto_core(PARROT_INTERP, - SHIM(Parrot_runcore_t *runcore), - ARGIN(opcode_t *pc)) - __attribute__nonnull__(1) - __attribute__nonnull__(3); - -PARROT_WARN_UNUSED_RESULT -PARROT_CANNOT_RETURN_NULL -static opcode_t * runops_cgp_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_debugger_core(PARROT_INTERP, SHIM(Parrot_runcore_t *runcore), ARGIN(opcode_t *pc)) @@ -328,27 +305,11 @@ __attribute__nonnull__(3); PARROT_WARN_UNUSED_RESULT -PARROT_CANNOT_RETURN_NULL -static opcode_t * runops_switch_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_trace_core(PARROT_INTERP, ARGIN(opcode_t *pc)) __attribute__nonnull__(1) __attribute__nonnull__(2); -#define ASSERT_ARGS_runops_cgoto_core __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ - PARROT_ASSERT_ARG(interp) \ - , PARROT_ASSERT_ARG(pc)) -#define ASSERT_ARGS_runops_cgp_core __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ - PARROT_ASSERT_ARG(interp) \ - , PARROT_ASSERT_ARG(runcore) \ - , PARROT_ASSERT_ARG(pc)) #define ASSERT_ARGS_runops_debugger_core __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ PARROT_ASSERT_ARG(interp) \ , PARROT_ASSERT_ARG(pc)) @@ -365,10 +326,6 @@ #define ASSERT_ARGS_runops_slow_core __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ PARROT_ASSERT_ARG(interp) \ , PARROT_ASSERT_ARG(pc)) -#define ASSERT_ARGS_runops_switch_core __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ - PARROT_ASSERT_ARG(interp) \ - , PARROT_ASSERT_ARG(runcore) \ - , PARROT_ASSERT_ARG(pc)) #define ASSERT_ARGS_runops_trace_core __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ PARROT_ASSERT_ARG(interp) \ , PARROT_ASSERT_ARG(pc)) @@ -438,36 +395,6 @@ /* -=item C - -Registers the switch runcore with Parrot. - -=cut - -*/ - -void -Parrot_runcore_switch_init(PARROT_INTERP) -{ - ASSERT_ARGS(Parrot_runcore_switch_init) - - Parrot_runcore_t * const coredata = mem_gc_allocate_zeroed_typed(interp, Parrot_runcore_t); - coredata->name = CONST_STRING(interp, "switch"); - coredata->id = PARROT_SWITCH_CORE; - coredata->opinit = PARROT_CORE_SWITCH_OPLIB_INIT; - coredata->runops = runops_switch_core; - coredata->prepare_run = init_prederef; - coredata->destroy = NULL; - coredata->flags = 0; - - PARROT_RUNCORE_PREDEREF_OPS_SET(coredata); - - Parrot_runcore_register(interp, coredata); -} - - -/* - =item C Registers the exec runcore with Parrot. @@ -543,7 +470,7 @@ coredata->name = CONST_STRING(interp, "debugger"); coredata->id = PARROT_DEBUGGER_CORE; coredata->opinit = PARROT_CORE_OPLIB_INIT; - coredata->prepare_run = init_prederef; + coredata->prepare_run = NULL; coredata->runops = runops_debugger_core; coredata->destroy = NULL; coredata->flags = 0; @@ -556,75 +483,6 @@ /* -=item C - -Registers the CGP runcore with Parrot. - -=cut - -*/ - -#ifdef HAVE_COMPUTED_GOTO - -void -Parrot_runcore_cgp_init(PARROT_INTERP) -{ - ASSERT_ARGS(Parrot_runcore_cgp_init) - - Parrot_runcore_t * const coredata = mem_gc_allocate_zeroed_typed(interp, Parrot_runcore_t); - coredata->name = CONST_STRING(interp, "cgp"); - coredata->id = PARROT_CGP_CORE; - coredata->opinit = PARROT_CORE_CGP_OPLIB_INIT; - coredata->prepare_run = init_prederef; - coredata->runops = runops_cgp_core; - coredata->flags = 0; - - coredata->destroy = NULL; - - PARROT_RUNCORE_CGOTO_OPS_SET(coredata); - PARROT_RUNCORE_EVENT_CHECK_SET(coredata); - PARROT_RUNCORE_PREDEREF_OPS_SET(coredata); - - Parrot_runcore_register(interp, coredata); -} - - -/* - -=item C - -Registers the cgoto runcore with Parrot. - -=cut - -*/ - -void -Parrot_runcore_cgoto_init(PARROT_INTERP) -{ - ASSERT_ARGS(Parrot_runcore_cgoto_init) - - Parrot_runcore_t * const coredata = mem_gc_allocate_zeroed_typed(interp, Parrot_runcore_t); - coredata->name = CONST_STRING(interp, "cgoto"); - coredata->id = PARROT_CGOTO_CORE; - coredata->opinit = PARROT_CORE_CG_OPLIB_INIT; - coredata->runops = runops_cgoto_core; - coredata->destroy = NULL; - coredata->prepare_run = NULL; - coredata->flags = 0; - - PARROT_RUNCORE_FUNC_TABLE_SET(coredata); - PARROT_RUNCORE_CGOTO_OPS_SET(coredata); - - Parrot_runcore_register(interp, coredata); -} - - -#endif /* #ifdef HAVE_COMPUTED_GOTO */ - - -/* - =item C @@ -660,42 +518,6 @@ } -/* - -=item C - -Runs the Parrot operations starting at C until there are no more -operations, using the computed C core, performing no bounds checking, -profiling, or tracing. - -If computed C is not available then Parrot exits with exit code 1. - -=cut - -*/ - -PARROT_WARN_UNUSED_RESULT -PARROT_CAN_RETURN_NULL -static opcode_t * -runops_cgoto_core(PARROT_INTERP, SHIM(Parrot_runcore_t *runcore), ARGIN(opcode_t *pc)) -{ - ASSERT_ARGS(runops_cgoto_core) - - /* disable pc */ - Parrot_pcc_set_pc(interp, CURRENT_CONTEXT(interp), NULL); - -#ifdef HAVE_COMPUTED_GOTO - pc = cg_core(pc, interp); - return pc; -#else - UNUSED(pc); - Parrot_io_eprintf(interp, - "Computed goto unavailable in this configuration.\n"); - Parrot_exit(interp, 1); -#endif -} - #ifdef code_start # undef code_start #endif @@ -935,123 +757,9 @@ } -/* -=item C - -Runs the C core. - -=cut - -*/ - -PARROT_WARN_UNUSED_RESULT -PARROT_CANNOT_RETURN_NULL -static opcode_t * -runops_switch_core(PARROT_INTERP, ARGIN(Parrot_runcore_t *runcore), ARGIN(opcode_t *pc)) -{ - ASSERT_ARGS(runops_switch_core) - opcode_t * const code_start = (opcode_t *)interp->code->base.data; - opcode_t *pc_prederef; - - init_prederef(interp, runcore); - pc_prederef = (opcode_t*)interp->code->prederef.code + (pc - code_start); - - return switch_core(pc_prederef, interp); -} - - /* -=item C - -Initialize: load prederef C, file prederef.code. - -=cut - -*/ - -PARROT_CAN_RETURN_NULL -void * -init_prederef(PARROT_INTERP, ARGIN(Parrot_runcore_t *runcore)) -{ - ASSERT_ARGS(init_prederef) - load_prederef(interp, runcore); - - if (!interp->code->prederef.code) { - void *pred_func; - opcode_t *pc = interp->code->base.data; - const size_t N = interp->code->base.size; - size_t i; - - void ** const temp = - (void **)Parrot_memalign_if_possible(256, N * sizeof (void *)); - /* calc and remember pred_offset */ - CONTEXT(interp)->pred_offset = pc - (opcode_t *)temp; - - /* fill with the prederef__ opcode function */ - if (PARROT_RUNCORE_PREDEREF_OPS_TEST(runcore) - && !PARROT_RUNCORE_CGOTO_OPS_TEST(runcore)) - pred_func = (void *)CORE_OPS_prederef__; - else { - PARROT_ASSERT(interp->op_lib->op_func_table); - pred_func = ((void **) - interp->op_lib->op_func_table)[CORE_OPS_prederef__]; - } - - for (i = 0; i < N;) { - const op_info_t * const opinfo = &interp->op_info_table[*pc]; - size_t n = opinfo->op_count; - - temp[i] = pred_func; - - ADD_OP_VAR_PART(interp, interp->code, pc, n); - - pc += n; - i += n; - } - - interp->code->prederef.code = temp; - } - - return NULL; -} - - -/* - -=item C - -C<< interp->op_lib >> = prederefed oplib. - -=cut - -*/ - -void -load_prederef(PARROT_INTERP, ARGIN(Parrot_runcore_t *runcore)) -{ - ASSERT_ARGS(load_prederef) - const oplib_init_f init_func = get_core_op_lib_init(interp, runcore); - - int (*get_op)(PARROT_INTERP, const char * name, int full); - - get_op = interp->op_lib->op_code; - interp->op_lib = init_func(interp, 1); - - /* preserve the get_op function */ - interp->op_lib->op_code = get_op; - - if (interp->op_lib->op_count != interp->op_count) - Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_PREDEREF_LOAD_ERROR, - "Illegal op count (%d) in prederef oplib\n", - (int)interp->op_lib->op_count); -} - - -/* - =item C @@ -1099,41 +807,6 @@ /* -=item C - -Runs the computed goto and predereferenced core. - -=cut - -*/ - -PARROT_WARN_UNUSED_RESULT -PARROT_CANNOT_RETURN_NULL -static opcode_t * -runops_cgp_core(PARROT_INTERP, ARGIN(Parrot_runcore_t *runcore), ARGIN(opcode_t *pc)) -{ - ASSERT_ARGS(runops_cgp_core) -#ifdef HAVE_COMPUTED_GOTO - opcode_t * const code_start = (opcode_t *)interp->code->base.data; - opcode_t *pc_prederef; - - init_prederef(interp, runcore); - - pc_prederef = (opcode_t *)interp->code->prederef.code + (pc - code_start); - return cgp_core(pc_prederef, interp); - -#else - UNUSED(pc); - Parrot_io_eprintf(interp, - "Computed goto unavailable in this configuration.\n"); - Parrot_exit(interp, 1); -#endif - -} - -/* - =back */ Index: docs/book/draft/appc_command_line_options.pod =================================================================== --- docs/book/draft/appc_command_line_options.pod (.../trunk) (revision 45837) +++ docs/book/draft/appc_command_line_options.pod (.../branches/runcore_purge) (revision 45883) @@ -260,18 +260,6 @@ Run with the I. -=item -R cgoto - -Run the I (CGoto). - -=item -R cgp - -Run with the I core. - -=item -R switch - -Run with the I. - =item -R gcdebug Performs a full GC run before every op dispatch Index: docs/porting_intro.pod =================================================================== --- docs/porting_intro.pod (.../trunk) (revision 45837) +++ docs/porting_intro.pod (.../branches/runcore_purge) (revision 45883) @@ -13,39 +13,6 @@ internals. For each feature, a brief description of its purpose, hints on helping to port it, and pointers to more information are included. -=head1 CGoto or CGP (CGoto Predereferenced) - -=head2 What it is - -"Computed goto" is a non-standard C feature that allows taking a pointer to an -statement label (e.g. "LOOP:" ) using the unary && operator. Certain Parrot -runcores make use of this feature as an optimization. - -=head2 How to help - -If cgoto is not supported in Parrot by default on your platform, try to compile -config/auto/cgoto/test_c.in with your C compiler and determine why it fails. If -the compiler does not support the computed goto concept at all, this feature -cannot be made to work (don't worry, there are other runcores). However, if -the compiler supports it but the test is inadequate, please submit a bug report -describing how the implementation of this feature differs from what Parrot -expects. - -Note that gcc supports this feature out of the box, though it sometimes -struggles with it in low-memory situations. Failures during compilation of -core_ops_cg.c are frequently caused by insufficient resources rather than bugs -in gcc or Parrot. - -=head2 References - -=over 4 - -=item * F - -=item * I - -=back - =head1 Threads =head2 What it is Index: docs/configuration.pod =================================================================== --- docs/configuration.pod (.../trunk) (revision 45837) +++ docs/configuration.pod (.../branches/runcore_purge) (revision 45883) @@ -123,10 +123,6 @@ =over 4 -=item F - - Does your compiler support computed goto... - =item F Generate C headers... @@ -136,7 +132,7 @@ Note that on non-interactive steps, the text I will be printed after the description when the step finishes executing; for example, the user will see: - Does your compiler support computed goto..............done. + Determine flags for building shared libraries.....-fPIC =item C Index: docs/running.pod =================================================================== --- docs/running.pod (.../trunk) (revision 45837) +++ docs/running.pod (.../branches/runcore_purge) (revision 45883) @@ -135,12 +135,8 @@ may be available on your system: slow, bounds bounds checking core (default) - cgoto computed goto core - cgp computed goto-predereferenced core - fast fast core (no bounds checking, profiling, or tracing) gcdebug performs a full GC run before every op dispatch (good for debugging GC problems) - switch switch core trace bounds checking core w/ trace info (see 'parrot --help-debug') profiling see F @@ -249,28 +245,6 @@ The trace and profile cores are also based on the "slow" core, doing full bounds checking, and also printing runtime information to stderr. -The switched core eschews these tiny op functions in favor of cases in a large -switch statement: - - switch_runcore( op ): - while ( op ): - switch *op: - case NOP: - ... - case STORE: - ... - ... - -Depending on the C compiler implementation, this may be faster than function -calling. On older systems, it may fail to compile altogether. - -The computed-goto ("cgoto") runcore avoids the overhead of function -calls by jumping directly to the address where each opcode's function -starts. The computed-goto-prederef ("CGP") core takes this one step -further by replacing opcode numbers in the bytecode with those opfunc -addresses. See "Predereferencing" in F for a -fuller explanation. - =head1 Operation table Command Line Action Output Index: tools/build/ops2c.pl =================================================================== --- tools/build/ops2c.pl (.../trunk) (revision 45837) +++ tools/build/ops2c.pl (.../branches/runcore_purge) (revision 45883) @@ -47,7 +47,7 @@ % perl tools/build/ops2c.pl trans [--help] [--no-lines] [--dynamic] [--core | input.ops [input2.ops ...]] - trans := C | CGoto | CGP | CSwitch | CPrederef + trans := C For example: @@ -75,22 +75,6 @@ Create the function-based (slow or fast core) run loop. -=item C - -Create the C run loop. - -=item C - -Create the C and predereferenced run loop. - -=item C - -Create the Ced and predereferenced run loop. - -=item C - -Create the predereferenced run loop. - =back =head2 Options @@ -153,14 +137,6 @@ =item C -=item C - -=item C - -=item C - -=item C - =item C =item C Index: tools/dev/parrot-fuzzer =================================================================== --- tools/dev/parrot-fuzzer (.../trunk) (revision 45837) +++ tools/dev/parrot-fuzzer (.../branches/runcore_purge) (revision 45883) @@ -62,7 +62,7 @@ Specify which runcore to use when running Parrot. The default is the C core. This option corresponds directly to Parrot's C<--runcore> option. Other -runcores include C, C, C, C, C, and C. +runcores include C. See Parrot's help for more details. =item C<--ignore_blacklist> Index: lib/Parrot/Configure/Options/Conf.pm =================================================================== --- lib/Parrot/Configure/Options/Conf.pm (.../trunk) (revision 45837) +++ lib/Parrot/Configure/Options/Conf.pm (.../branches/runcore_purge) (revision 45883) @@ -91,7 +91,6 @@ --opcode=(type) Use the given type for opcodes --ops=(files) Use the given ops files - --cgoto=0 Don't build cgoto core - recommended when short of mem --jitcapable Use JIT --execcapable Use JIT to emit a native executable --without-threads Build parrot without thread support Index: lib/Parrot/Configure/Options/Conf/Shared.pm =================================================================== --- lib/Parrot/Configure/Options/Conf/Shared.pm (.../trunk) (revision 45837) +++ lib/Parrot/Configure/Options/Conf/Shared.pm (.../branches/runcore_purge) (revision 45883) @@ -15,7 +15,6 @@ cc ccflags ccwarn - cgoto configure_trace cxx darwin_no_fink Index: lib/Parrot/Configure/Step/List.pm =================================================================== --- lib/Parrot/Configure/Step/List.pm (.../trunk) (revision 45837) +++ lib/Parrot/Configure/Step/List.pm (.../branches/runcore_purge) (revision 45883) @@ -41,7 +41,6 @@ auto::isreg auto::jit auto::frames - auto::cgoto auto::inline auto::gc auto::memalign Index: lib/Parrot/Ops2c/Auxiliary.pm =================================================================== --- lib/Parrot/Ops2c/Auxiliary.pm (.../trunk) (revision 45837) +++ lib/Parrot/Ops2c/Auxiliary.pm (.../branches/runcore_purge) (revision 45883) @@ -12,7 +12,7 @@ my $usage_msg = < 1 } qw(C CGoto CGP CSwitch CPrederef); + my %is_allowed = map { $_ => 1 } qw( C ); unless ( $is_allowed{$class_name} ) { print STDERR - "Parrot::Ops2c::Utils::new() requires C, CGoto, CGP, CSwitch and/or CPrederef: $!"; + "Parrot::Ops2c::Utils::new() requires C: $!"; return; } @@ -372,10 +372,6 @@ $self->_print_run_core_func_decl_source($SOURCE); - $self->_print_cg_jump_table($SOURCE); - - $self->_print_goto_opcode($SOURCE); - $self->_print_op_function_definitions($SOURCE); } @@ -650,7 +646,6 @@ $one_op .= "$definition $comment {\n$src}\n\n"; push @op_funcs, $one_op; push @op_protos, $prototype; - $prev_src = $src if ( $self->{suffix} eq '_cgp' || $self->{suffix} eq '_switch' ); $prev_index = $index; } $index++; @@ -662,47 +657,6 @@ $self->{cg_jump_table} = \@cg_jump_table; } -sub _print_cg_jump_table { - my ( $self, $fh ) = @_; - - my @cg_jump_table = @{ $self->{cg_jump_table} }; - - if ( $self->{suffix} =~ /cg/ ) { - print $fh @cg_jump_table; - print $fh <{trans}->run_core_after_addr_table( $self->{bs} ); - } - return 1; -} - -sub _print_goto_opcode { - my ( $self, $fh ) = @_; - - if ( $self->{suffix} =~ /cgp/ ) { - print $fh <regs_i; - goto **(void **)cur_opcode; - -END_C - } - elsif ( $self->{suffix} =~ /cg/ ) { - print $fh <{bs}ops_addr[*cur_opcode]; - -END_C - } - return 1; -} - sub _print_op_function_definitions { my ( $self, $fh ) = @_; Index: lib/Parrot/OpTrans/CSwitch.pm =================================================================== --- lib/Parrot/OpTrans/CSwitch.pm (.../trunk) (revision 45837) +++ lib/Parrot/OpTrans/CSwitch.pm (.../branches/runcore_purge) (revision 45883) @@ -1,247 +0,0 @@ -# Copyright (C) 2001-2009, Parrot Foundation. -# $Id$ - -=head1 NAME - -Parrot::OpTrans::CSwitch - C Switch Transform - -=head1 DESCRIPTION - -C inherits from C -to provide a mixture of predereferenced register addressing and a -Ced run loop. - -=head2 Instance Methods - -=over 4 - -=cut - -package Parrot::OpTrans::CSwitch; - -use strict; -use warnings; - -use Parrot::OpTrans; -use base qw( Parrot::OpTrans::CPrederef ); - -sub new { - my $class = shift; - my $self = $class->SUPER::new(@_); - $self->{split_count} ||= 0; - return $self; -} - -=item C - -The core type is C. - -=cut - -sub core_type { - return 'PARROT_SWITCH_CORE'; -} - -=item C - -The prefix is C<'switch_'>. - -=cut - -sub core_prefix { - return "switch_"; -} - -=item C - -The suffix is C<'_switch'>. - -=cut - -sub suffix { - return "_switch"; -} - -=item C - -Returns the C C<#define> macros required by the ops. - -=cut - -sub defines { - my ( $self, $pred_def ); - $self = shift; - $pred_def = $self->SUPER::defines(); - my $type = __PACKAGE__; - return $pred_def . < $type */ -# define opcode_to_prederef(i, op) (op ? \\ - (opcode_t*) (op - Parrot_pcc_get_pred_offset(interp, i->ctx)) : (opcode_t*)NULL) -END -} - -=item C - -Transforms the C macro in an ops file into the -relevant C code. - -=cut - -sub goto_address { - my ( $self, $addr ) = @_; - - #print STDERR "pbcc: map_ret_abs($addr)\n"; - - if ( $addr eq '0' ) { - return "return (0);"; - } - else { - return < - -Transforms the C macro in an ops file into the -relevant C code. - -=cut - -sub goto_offset { - my ( $self, $offset ) = @_; - return "{ cur_opcode += $offset; goto SWITCH_AGAIN; }"; -} - -=item C - -Returns the C code for the init function. - -=cut - -sub init_func_init1 { - my ( $self, $base ) = @_; - my $cg_func = $self->core_prefix . $base; - my $bs = $base . $self->suffix . '_'; - - return < - -Returns the C code prior to the run core function. - -=cut - -sub run_core_func_start { - my $type = __PACKAGE__; - return < $type */ -#if defined(__GNUC__) && defined(I386) && defined(PARROT_SWITCH_REGS) - register opcode_t * cur_opcode __asm__ ("esi") = cur_op; - register char * _reg_base __asm__ ("edi"); -#else - opcode_t * cur_opcode = cur_op; - char * _reg_base; -#endif - -SWITCH_RELOAD: - _reg_base = (char*)Parrot_pcc_get_regs_ni(interp, CURRENT_CONTEXT(interp))->regs_i; - do { -SWITCH_AGAIN: - Parrot_cx_handle_tasks(interp, interp->scheduler); - if (!cur_opcode) - break; - switch (*(opcode_t*)cur_opcode) { -END_C -} - -=item C - -If defined return code to split e.g. a switch. - -=cut - -sub run_core_split { - my ($self) = @_; - $self->{split_count}++; - - return < - -Returns the C code following the run core function. - -=cut - -sub run_core_finish { - my ( $self, $base ) = @_; - my $bs = $base . $self->suffix . '_'; - my $c = <= 0 && - *(opcode_t*)cur_opcode < (opcode_t)${bs}op_lib.op_count) { - *(opcode_t*)cur_opcode = CORE_OPS_wrapper__; - continue; - } - Parrot_ex_throw_from_c_args(interp, NULL, 1, - "illegal opcode in switch core\\n"); - break; - } /* switch */ -END_C - for ( my $i = 0 ; $i < $self->{split_count} ; $i++ ) { - $c .= <core_prefix . "$base */\n\n"; - - return $c; -} - -=back - -=head1 SEE ALSO - -=over 4 - -=item C - -=item C - -=item C - -=item C - -=item C - -=back - -=cut - -1; - -# Local Variables: -# mode: cperl -# cperl-indent-level: 4 -# fill-column: 100 -# End: -# vim: expandtab shiftwidth=4: Index: lib/Parrot/OpTrans/CGP.pm =================================================================== --- lib/Parrot/OpTrans/CGP.pm (.../trunk) (revision 45837) +++ lib/Parrot/OpTrans/CGP.pm (.../branches/runcore_purge) (revision 45883) @@ -1,162 +0,0 @@ -# Copyright (C) 2002, Parrot Foundation. -# $Id$ - -=head1 NAME - -Parrot::OpTrans::CGP - C Goto Predereferenced Transform - -=head1 DESCRIPTION - -C inherits from C and -C to provide predereferenced register addressing -and C C run loop. - -=head2 Instance Methods - -=over 4 - -=cut - -package Parrot::OpTrans::CGP; - -use strict; -use warnings; - -use base qw( Parrot::OpTrans::CPrederef Parrot::OpTrans::CGoto ); - -=item C - -Returns C. - -=cut - -sub core_type { - return 'PARROT_CGP_CORE'; -} - -=item C - -The suffix is C<'_cgp'>. - -=cut - -sub suffix { - return "_cgp"; -} - -=item C - -The core prefix is C<'cgp_'>. - -=cut - -sub core_prefix { - return "cgp_"; -} - -=item C - -Returns the C C<#define> macros required by the ops. - -=cut - -sub defines { - my ( $self, $pred_def ); - $self = shift; - $pred_def = $self->SUPER::defines(); - my $type = __PACKAGE__; - return $pred_def . < $type */ -# define opcode_to_prederef(i, op) \\ - (opcode_t *) (op - Parrot_pcc_get_pred_offset(interp, i->ctx)) -END -} - -=item C - -Transforms the C macro in an ops file into the -relevant C code. - -=cut - -sub goto_address { - my ( $self, $addr ) = @_; - - #print STDERR "pbcc: map_ret_abs($addr)\n"; - - if ( $addr eq '0' ) { - return "return (0);"; - } - else { - return "if ($addr == 0) - return 0; - Parrot_cx_handle_tasks(interp, interp->scheduler); - _reg_base = (char*)Parrot_pcc_get_regs_ni(interp, CURRENT_CONTEXT(interp))->regs_i; - goto **(void **)(cur_opcode = opcode_to_prederef(interp, $addr))"; - } -} - -=item C - -Transforms the C macro in an ops file into the -relevant C code. - -=cut - -sub goto_offset { - my ( $self, $offset ) = @_; - - # this must be a single expression, in case it's in a single-statement if - return "do {\nParrot_pcc_set_pc(interp, CURRENT_CONTEXT(interp), CUR_OPCODE + $offset);\n" - . "goto **(void **)(cur_opcode += $offset);\n} while (1)"; -} - -sub run_core_func_start { - my $type = __PACKAGE__; - return < $type */ - /* at least gcc 2.95.2 miscompiles set_args - %edi - * is used for the vtable call and _reg_base is clobbered - * # if 1191 := PARROT_OP_set_args_pc - * (gdb) disas l_ops_addr[1191] l_ops_addr[1192] - */ -#if defined(__GNUC__) && defined(I386) && defined(PARROT_CGP_REGS) - register opcode_t * cur_opcode __asm__ ("esi") = cur_op; - register char * _reg_base __asm__ ("edi"); -#else - opcode_t *cur_opcode = cur_op; - char * _reg_base; -#endif - - static void *const l_ops_addr[] = { -END_C -} - -=back - -=head1 SEE ALSO - -=over 4 - -=item C - -=item C - -=item C - -=item C - -=item C - -=back - -=cut - -1; - -# Local Variables: -# mode: cperl -# cperl-indent-level: 4 -# fill-column: 100 -# End: -# vim: expandtab shiftwidth=4: Index: lib/Parrot/OpTrans/CGoto.pm =================================================================== --- lib/Parrot/OpTrans/CGoto.pm (.../trunk) (revision 45837) +++ lib/Parrot/OpTrans/CGoto.pm (.../branches/runcore_purge) (revision 45883) @@ -1,368 +0,0 @@ -# Copyright (C) 2002-2007, Parrot Foundation. -# $Id$ - -=head1 NAME - -Parrot::OpTrans::CGoto - CGoto Transform - -=head1 DESCRIPTION - -Used to generate C code from Parrot operations. - -C inherits from C to provide a -C C run loop. - -=head2 Instance Methods - -=over 4 - -=cut - -package Parrot::OpTrans::CGoto; - -use strict; -use warnings; - -use base qw( Parrot::OpTrans ); - -=item C - -The suffix is C<'_cg'>. - -=cut - -sub suffix { - return "_cg"; -} - -=item C - -The core prefix is C<'cg_'>. - -=cut - -sub core_prefix { - return "cg_"; -} - -=item C - -The core type is C. - -=cut - -sub core_type { - return 'PARROT_CGOTO_CORE'; -} - -=item C - -Returns the C C<#define> macros required by the ops. - -=cut - -sub defines { - my $type = __PACKAGE__; - return < $type */ -#undef CONST -#define REL_PC ((size_t)(cur_opcode - (opcode_t*)interp->code->base.data)) -#define CUR_OPCODE cur_opcode -#define IREG(i) REG_INT(interp, cur_opcode[i]) -#define NREG(i) REG_NUM(interp, cur_opcode[i]) -#define PREG(i) REG_PMC(interp, cur_opcode[i]) -#define SREG(i) REG_STR(interp, cur_opcode[i]) -#define CONST(i) Parrot_pcc_get_constants(interp, interp->ctx)[cur_opcode[i]] -END -} - -=item C - -=item C - -Sets/gets the current position in Parrot code. - -=cut - -sub pc { - my $self = shift; - - if (@_) { - $self->{PC} = shift; - } - else { - return $self->{PC}; - } -} - -=item C - -=item C - -Sets/gets the transform's arguments. - -=cut - -sub args { - my $self = shift; - - if (@_) { - $self->{ARGS} = [@_]; - } - else { - return $self->{ARGS}; - } -} - -=item C - -Returns the argument at C<$index>. - -=cut - -sub arg { - my $self = shift; - - return $self->{ARGS}[shift]; -} - -=item C - -Transforms the C macro in an ops file into the -relevant C code. - -=cut - -sub goto_address { - my ( $self, $addr ) = @_; - - #print STDERR "pbcc: map_ret_abs($addr)\n"; - - if ( $addr eq '0' ) { - return "return (0);"; - } - else { - return "if ((opcode_t *) $addr == 0) - return 0; - goto *ops_addr[*(cur_opcode = (opcode_t *)$addr)]"; - } -} - -=item C - -Transforms the C macro in an ops file into the -relevant C code. - -=cut - -sub expr_offset { - my ( $self, $offset ) = @_; - - return "cur_opcode + $offset"; -} - -=item C - -Transforms the C macro in an ops file into the -relevant C code. - -=cut - -sub goto_offset { - my ( $self, $offset ) = @_; - - return "goto *ops_addr[*(cur_opcode += $offset)]"; -} - -my %arg_maps = ( - 'op' => "cur_opcode[%ld]", - - 'i' => "IREG(%ld)", - 'n' => "NREG(%ld)", - 'p' => "PREG(%ld)", - 's' => "SREG(%ld)", - 'k' => "PREG(%ld)", - 'ki' => "IREG(%ld)", - - 'ic' => "cur_opcode[%ld]", - 'nc' => "CONST(%ld)->u.number", - 'pc' => "CONST(%ld)->u.key", - 'sc' => "CONST(%ld)->u.string", - 'kc' => "CONST(%ld)->u.key", - 'kic' => "cur_opcode[%ld]" -); - -=item C - -Returns the C code for the specified op argument type (see -C) and value. C<$op> is an instance of C. - -=cut - -sub access_arg { - my ( $self, $type, $num, $op ) = @_; - - #print STDERR "pbcc: map_arg($type, $num)\n"; - - die "Unrecognized type '$type' for num '$num'" unless exists $arg_maps{$type}; - - return sprintf( $arg_maps{$type}, $num ); -} - -=item C - -Returns the C code for C. - -=cut - -sub restart_address { - my ( $self, $addr ) = @_; - - return "interp->resume_offset = $addr; interp->resume_flag = 1"; -} - -=item C - -Returns the C code for C. - -=cut - -sub restart_offset { - my ( $self, $offset ) = @_; - - return "interp->resume_offset = REL_PC + $offset; interp->resume_flag = 1"; -} - -=item C - -Returns the C code for the run core function declaration. - -=cut - -sub run_core_func_decl { - my ( $self, $core ) = @_; - - return "opcode_t * " . $self->core_prefix . "$core(opcode_t *cur_op, PARROT_INTERP)"; -} - -=item C - -Returns the C code for the ops address declaration. - -=cut - -sub ops_addr_decl { - my ( $self, $bs ) = @_; - - return "static void *const* ${bs}ops_addr;\n\n"; -} - -=item C - -Returns the C code prior to the run core function. - -=cut - -sub run_core_func_start { - return < - -Returns the run core C code for section after the address table. - -=cut - -sub run_core_after_addr_table { - my ( $self, $bs ) = @_; - return < - -Returns the C code following the run core function. - -=cut - -sub run_core_finish { - my ( $self, $base ) = @_; - - return "\n} /* " . $self->core_prefix . "$base */\n\n"; -} - -=item C - -Returns the C code for the init function. - -=cut - -sub init_func_init1 { - my ( $self, $base ) = @_; - my $cg_func = $self->core_prefix . $base; - my $bs = $base . $self->suffix . '_'; - - return < - -Returns the C code to initialize the dispatch mechanism within the core's -initialization function. - -=cut - -sub init_set_dispatch { - my ( $self, $bs ) = @_; - - return < - -=item C - -=item C - -=item C - -=item C - -=back - -=cut - -1; - -# Local Variables: -# mode: cperl -# cperl-indent-level: 4 -# fill-column: 100 -# End: -# vim: expandtab shiftwidth=4: Index: lib/Parrot/OpTrans/CPrederef.pm =================================================================== --- lib/Parrot/OpTrans/CPrederef.pm (.../trunk) (revision 45837) +++ lib/Parrot/OpTrans/CPrederef.pm (.../branches/runcore_purge) (revision 45883) @@ -1,144 +0,0 @@ -#! perl -# Copyright (C) 2001-2007, Parrot Foundation. -# $Id$ - -=head1 NAME - -Parrot::OpTrans::CPrederef - C Predereferenced Transform - -=head1 DESCRIPTION - -C inherits from C -to provide basic functionality for predereferenced run loops (switch, -CGP). - -=head2 Instance Methods - -=over 4 - -=cut - -package Parrot::OpTrans::CPrederef; - -use strict; -use warnings; - -use Parrot::OpTrans; -use base qw( Parrot::OpTrans::C ); - -=item C - -Returns the C C<#define> macros required by the ops. - -=cut - -sub defines { - my $type = __PACKAGE__; - return < $type */ -#define REL_PC ((size_t)(cur_opcode - (opcode_t*)interp->code->prederef.code)) -#define CUR_OPCODE \\ - ((opcode_t*)cur_opcode + Parrot_pcc_get_pred_offset(interp, CURRENT_CONTEXT(interp))) -#define OP_AS_OFFS(o) (_reg_base + ((opcode_t*)cur_opcode)[o]) - -END -} - -=item expr_address($addr) - -=item expr_address($offset) - -=item expr_pop() - -Create various address parts. - -=cut - -sub expr_address { - my ( $self, $addr ) = @_; - return "opcode_to_prederef(interp, $addr)"; -} - -sub expr_offset { - my ( $self, $offset ) = @_; - return "CUR_OPCODE + $offset"; -} - -sub expr_pop { - my ($self) = @_; - return "opcode_to_prederef(interp, pop_dest(interp))"; -} - -sub run_core_func_decl { - my ( $self, $core ) = @_; - - my $type = __PACKAGE__; - my $prefix = $self->core_prefix; - return < $type */ -opcode_t * $prefix$core(opcode_t *cur_op, PARROT_INTERP) -END -} - -=item C - -Returns the C code for the specified op argument type (see -C) and value. C<$op> is an instance of C. - -=cut - -sub access_arg { - my ( $self, $type, $num, $op ) = @_; - - my %arg_maps = ( - 'op' => "cur_opcode[%ld]", - - 'i' => "(*(INTVAL *)OP_AS_OFFS(%ld))", - 'ki' => "(*(INTVAL *)OP_AS_OFFS(%ld))", - 'n' => "(*(FLOATVAL *)OP_AS_OFFS(%ld))", - 'p' => "(*(PMC **)OP_AS_OFFS(%ld))", - 's' => "(*(STRING **)OP_AS_OFFS(%ld))", - 'k' => "(*(PMC **)OP_AS_OFFS(%ld))", - - 'ic' => "((INTVAL)cur_opcode[%ld])", - 'kic' => "((INTVAL)cur_opcode[%ld])", - 'nc' => "(*(FLOATVAL *)cur_opcode[%ld])", - 'sc' => "((STRING *)cur_opcode[%ld])", - 'pc' => "((PMC *)cur_opcode[%ld])", - 'kc' => "((PMC *)cur_opcode[%ld])", - ); - - die "Unrecognized type '$type' for num '$num' in opcode @{[$op->full_name]}" - unless exists $arg_maps{$type}; - - return sprintf( $arg_maps{$type}, $num ); -} - -=back - -=head1 SEE ALSO - -=over 4 - -=item C - -=item C - -=item C - -=item C - -=item C - -=back - -=cut - -1; - -# Local Variables: -# mode: cperl -# cperl-indent-level: 4 -# fill-column: 100 -# End: -# vim: expandtab shiftwidth=4: Index: lib/Parrot/OpTrans/C.pm =================================================================== --- lib/Parrot/OpTrans/C.pm (.../trunk) (revision 45837) +++ lib/Parrot/OpTrans/C.pm (.../branches/runcore_purge) (revision 45883) @@ -33,16 +33,6 @@ return 'PARROT_FUNCTION_CORE'; } -=item C - -Returns an empty string. - -=cut - -sub core_prefix { - return ""; -} - =item C Returns the C C<#define> macros for register access etc. @@ -173,14 +163,6 @@ =item C -=item C - -=item C - -=item C - -=item C - =back =cut Index: lib/Parrot/OpTrans.pm =================================================================== --- lib/Parrot/OpTrans.pm (.../trunk) (revision 45837) +++ lib/Parrot/OpTrans.pm (.../branches/runcore_purge) (revision 45883) @@ -16,15 +16,9 @@ The subclass hierarchy is as follows: OpTrans - |___________ - | | - C CGoto - | | - CPrederef | - | | | - | |_________| - | | - CSwitch CGP + | + | + C =head2 Class Methods @@ -91,11 +85,6 @@ die ref($self) . " doesn't have core_type()"; } -=item C - -Implemented in subclasses to return a short prefix indicating the core -type used to individuate core function names. - =item C Optionally implemented in subclasses to return the C code for the run @@ -222,14 +211,6 @@ =item C -=item C - -=item C - -=item C - -=item C - =back =cut Index: lib/Parrot/Harness/Options.pm =================================================================== --- lib/Parrot/Harness/Options.pm (.../trunk) (revision 45837) +++ lib/Parrot/Harness/Options.pm (.../branches/runcore_purge) (revision 45883) @@ -88,10 +88,7 @@ my %remap = ( 'j' => '-runcore=fast', - 'g' => '-runcore=cgoto', 'G' => '-runcore=gcdebug', - 'C' => '-runcore=cgp', - 'S' => '-runcore=switch', 'b' => '-runcore=bounds', 'f' => '-runcore=fast', 'r' => '-run-pbc', @@ -113,9 +110,6 @@ print <<"EOF"; perl t/harness [options] [testfiles] -w ... warnings on - -g ... run CGoto - -C ... run CGP - -S ... run Switched -b ... run bounds checked --run-exec ... run exec core -f ... run fast core Index: MANIFEST =================================================================== --- MANIFEST (.../trunk) (revision 45837) +++ MANIFEST (.../branches/runcore_purge) (revision 45883) @@ -1,7 +1,7 @@ # ex: set ro: # $Id$ # -# generated by tools/dev/mk_manifest_and_skip.pl Tue Apr 20 20:11:26 2010 UT +# generated by tools/dev/mk_manifest_and_skip.pl Wed Apr 21 03:55:26 2010 UT # # See below for documentation on the format of this file. # @@ -225,8 +225,6 @@ config/auto/backtrace/test_dlinfo_c.in [] config/auto/byteorder.pm [] config/auto/byteorder/test_c.in [] -config/auto/cgoto.pm [] -config/auto/cgoto/test_c.in [] config/auto/cpu.pm [] config/auto/cpu/i386/auto.pm [] config/auto/cpu/i386/test_gcc_cmpxchg_c.in [] @@ -1117,10 +1115,6 @@ lib/Parrot/Op.pm [devel]lib lib/Parrot/OpTrans.pm [devel]lib lib/Parrot/OpTrans/C.pm [devel]lib -lib/Parrot/OpTrans/CGP.pm [devel]lib -lib/Parrot/OpTrans/CGoto.pm [devel]lib -lib/Parrot/OpTrans/CPrederef.pm [devel]lib -lib/Parrot/OpTrans/CSwitch.pm [devel]lib lib/Parrot/Ops2c/Auxiliary.pm [devel]lib lib/Parrot/Ops2c/Utils.pm [devel]lib lib/Parrot/Ops2pm.pm [devel]lib @@ -1987,7 +1981,6 @@ t/steps/auto/attributes-01.t [test] t/steps/auto/backtrace-01.t [test] t/steps/auto/byteorder-01.t [test] -t/steps/auto/cgoto-01.t [test] t/steps/auto/cpu-01.t [test] t/steps/auto/ctags-01.t [test] t/steps/auto/env-01.t [test] Index: ports/cygwin/README =================================================================== --- ports/cygwin/README (.../trunk) (revision 45837) +++ ports/cygwin/README (.../branches/runcore_purge) (revision 45883) @@ -682,9 +682,6 @@ /usr/include/parrot/1.0.0/parrot/op.h /usr/include/parrot/1.0.0/parrot/oplib.h /usr/include/parrot/1.0.0/parrot/oplib/core_ops.h - /usr/include/parrot/1.0.0/parrot/oplib/core_ops_cg.h - /usr/include/parrot/1.0.0/parrot/oplib/core_ops_cgp.h - /usr/include/parrot/1.0.0/parrot/oplib/core_ops_switch.h /usr/include/parrot/1.0.0/parrot/oplib/ops.h /usr/include/parrot/1.0.0/parrot/packfile.h /usr/include/parrot/1.0.0/parrot/parrot.h @@ -748,8 +745,6 @@ /usr/lib/parrot/1.0.0/src/install_config.o /usr/lib/parrot/1.0.0/src/nci.c /usr/lib/parrot/1.0.0/src/null_config.o - /usr/lib/parrot/1.0.0/src/ops/core_ops_cgp.c - /usr/lib/parrot/1.0.0/src/ops/core_ops_switch.c /usr/lib/parrot/1.0.0/src/parrot_config.o /usr/lib/parrot/1.0.0/tools/build/ops2c.pl /usr/lib/parrot/1.0.0/tools/build/pmc2c.pl @@ -892,7 +887,6 @@ /usr/share/doc/parrot/1.0.0/html/config/auto/attributes.pm.html /usr/share/doc/parrot/1.0.0/html/config/auto/backtrace.pm.html /usr/share/doc/parrot/1.0.0/html/config/auto/byteorder.pm.html - /usr/share/doc/parrot/1.0.0/html/config/auto/cgoto.pm.html /usr/share/doc/parrot/1.0.0/html/config/auto/cpu.pm.html /usr/share/doc/parrot/1.0.0/html/config/auto/cpu/i386/auto.pm.html /usr/share/doc/parrot/1.0.0/html/config/auto/cpu/ppc/auto.pm.html Index: MANIFEST.SKIP =================================================================== --- MANIFEST.SKIP (.../trunk) (revision 45837) +++ MANIFEST.SKIP (.../branches/runcore_purge) (revision 45883) @@ -1,6 +1,6 @@ # ex: set ro: # $Id$ -# generated by tools/dev/mk_manifest_and_skip.pl Thu Apr 15 17:41:44 2010 UT +# generated by tools/dev/mk_manifest_and_skip.pl Wed Apr 21 05:05:15 2010 UT # # This file should contain a transcript of the svn:ignore properties # of the directories in the Parrot subversion repository. (Needed for Index: include/parrot/oplib.h =================================================================== --- include/parrot/oplib.h (.../trunk) (revision 45837) +++ include/parrot/oplib.h (.../branches/runcore_purge) (revision 45883) @@ -51,7 +51,6 @@ CORE_OPS_check_events__, /* inserted into op dispatch when an event got scheduled */ CORE_OPS_wrapper__, /* inserted by dynop_register for new ops */ - CORE_OPS_prederef__ /* inserted by dynop_register for new ops */ /* 2 more reserved */ } special_core_ops_enum; Index: include/parrot/runcore_api.h =================================================================== --- include/parrot/runcore_api.h (.../trunk) (revision 45837) +++ include/parrot/runcore_api.h (.../branches/runcore_purge) (revision 45883) @@ -38,10 +38,6 @@ typedef enum Parrot_runcore_flags { RUNCORE_REENTRANT_FLAG = 1 << 0, RUNCORE_FUNC_TABLE_FLAG = 1 << 1, - RUNCORE_EVENT_CHECK_FLAG = 1 << 2, - RUNCORE_PREDEREF_OPS_FLAG = 1 << 3, - RUNCORE_CGOTO_OPS_FLAG = 1 << 4, - RUNCORE_JIT_OPS_FLAG = 1 << 5 } Parrot_runcore_flags; @@ -55,26 +51,6 @@ #define PARROT_RUNCORE_FUNC_TABLE_SET(runcore) \ Runcore_flag_SET(runcore, RUNCORE_FUNC_TABLE_FLAG) -#define PARROT_RUNCORE_EVENT_CHECK_TEST(runcore) \ - Runcore_flag_TEST(runcore, RUNCORE_EVENT_CHECK_FLAG) -#define PARROT_RUNCORE_EVENT_CHECK_SET(runcore) \ - Runcore_flag_SET(runcore, RUNCORE_EVENT_CHECK_FLAG) - -#define PARROT_RUNCORE_PREDEREF_OPS_TEST(runcore) \ - Runcore_flag_TEST(runcore, RUNCORE_PREDEREF_OPS_FLAG) -#define PARROT_RUNCORE_PREDEREF_OPS_SET(runcore) \ - Runcore_flag_SET(runcore, RUNCORE_PREDEREF_OPS_FLAG) - -#define PARROT_RUNCORE_CGOTO_OPS_TEST(runcore) \ - Runcore_flag_TEST(runcore, RUNCORE_CGOTO_OPS_FLAG) -#define PARROT_RUNCORE_CGOTO_OPS_SET(runcore) \ - Runcore_flag_SET(runcore, RUNCORE_CGOTO_OPS_FLAG) - -#define PARROT_RUNCORE_JIT_OPS_TEST(runcore) \ - Runcore_flag_TEST(runcore, RUNCORE_JIT_OPS_FLAG) -#define PARROT_RUNCORE_JIT_OPS_SET(runcore) \ - Runcore_flag_SET(runcore, RUNCORE_JIT_OPS_FLAG) - /* HEADERIZER BEGIN: src/runcore/main.c */ /* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */ @@ -152,21 +128,6 @@ ARGIN(Parrot_runcore_t *runcore)) __attribute__nonnull__(2); -PARROT_CAN_RETURN_NULL -void * init_prederef(PARROT_INTERP, ARGIN(Parrot_runcore_t *runcore)) - __attribute__nonnull__(1) - __attribute__nonnull__(2); - -void load_prederef(PARROT_INTERP, ARGIN(Parrot_runcore_t *runcore)) - __attribute__nonnull__(1) - __attribute__nonnull__(2); - -void Parrot_runcore_cgoto_init(PARROT_INTERP) - __attribute__nonnull__(1); - -void Parrot_runcore_cgp_init(PARROT_INTERP) - __attribute__nonnull__(1); - void Parrot_runcore_debugger_init(PARROT_INTERP) __attribute__nonnull__(1); @@ -182,21 +143,8 @@ void Parrot_runcore_slow_init(PARROT_INTERP) __attribute__nonnull__(1); -void Parrot_runcore_switch_init(PARROT_INTERP) - __attribute__nonnull__(1); - #define ASSERT_ARGS_get_core_op_lib_init __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ PARROT_ASSERT_ARG(runcore)) -#define ASSERT_ARGS_init_prederef __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ - PARROT_ASSERT_ARG(interp) \ - , PARROT_ASSERT_ARG(runcore)) -#define ASSERT_ARGS_load_prederef __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ - PARROT_ASSERT_ARG(interp) \ - , PARROT_ASSERT_ARG(runcore)) -#define ASSERT_ARGS_Parrot_runcore_cgoto_init __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ - 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_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 = (\ @@ -207,8 +155,6 @@ 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)) /* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */ /* HEADERIZER END: src/runcore/cores.c */ Index: include/parrot/op.h =================================================================== --- include/parrot/op.h (.../trunk) (revision 45837) +++ include/parrot/op.h (.../branches/runcore_purge) (revision 45883) @@ -57,7 +57,6 @@ /* NOTE: Sure wish we could put the types here... */ typedef opcode_t *(*op_func_t)(opcode_t *, PARROT_INTERP); -typedef void **(*op_func_prederef_t)(void **, PARROT_INTERP); /* Index: include/parrot/interpreter.h =================================================================== --- include/parrot/interpreter.h (.../trunk) (revision 45837) +++ include/parrot/interpreter.h (.../branches/runcore_purge) (revision 45883) @@ -64,9 +64,6 @@ PARROT_SLOW_CORE, /* slow bounds/trace/profile core */ PARROT_FUNCTION_CORE = PARROT_SLOW_CORE, PARROT_FAST_CORE = 0x01, /* fast DO_OP core */ - PARROT_SWITCH_CORE = 0x02, /* P = prederef */ - PARROT_CGP_CORE = 0x06, /* CP */ - PARROT_CGOTO_CORE = 0x04, /* C = cgoto */ 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 */ @@ -152,18 +149,6 @@ struct _Thread_data; /* in thread.h */ struct _Caches; /* caches .h */ -typedef struct _Prederef_branch { /* item for recording branches */ - size_t offs; /* offset in code */ - void *op; /* opcode at that position */ -} Prederef_branch; - -typedef struct _Prederef { - void **code; /* prederefed code */ - Prederef_branch *branches; /* list of branches in code */ - size_t n_branches; /* entries in that list */ - size_t n_allocated; /* allocated size of it */ -} Prederef; - /* Get Context from interpreter */ #define CONTEXT(interp) Parrot_pcc_get_context_struct((interp), (interp)->ctx) Index: include/parrot/packfile.h =================================================================== --- include/parrot/packfile.h (.../trunk) (revision 45837) +++ include/parrot/packfile.h (.../branches/runcore_purge) (revision 45883) @@ -255,7 +255,6 @@ struct PackFile_ByteCode { PackFile_Segment base; - Prederef prederef; /* The predereferenced code and info */ struct PackFile_Debug *debugs; PackFile_ConstTable *const_table; PackFile_FixupTable *fixups; Index: include/parrot/exceptions.h =================================================================== --- include/parrot/exceptions.h (.../trunk) (revision 45837) +++ include/parrot/exceptions.h (.../branches/runcore_purge) (revision 45883) @@ -51,7 +51,6 @@ EXCEPTION_JIT_UNAVAILABLE, EXCEPTION_EXEC_UNAVAILABLE, EXCEPTION_INTERP_ERROR, - EXCEPTION_PREDEREF_LOAD_ERROR, EXCEPTION_PARROT_USAGE_ERROR, EXCEPTION_PIO_ERROR, EXCEPTION_PARROT_POINTER_ERROR, Index: include/parrot/context.h =================================================================== --- include/parrot/context.h (.../trunk) (revision 45837) +++ include/parrot/context.h (.../branches/runcore_purge) (revision 45883) @@ -214,11 +214,6 @@ __attribute__nonnull__(2); PARROT_EXPORT -size_t Parrot_pcc_get_pred_offset_func(PARROT_INTERP, ARGIN(PMC *ctx)) - __attribute__nonnull__(1) - __attribute__nonnull__(2); - -PARROT_EXPORT UINTVAL Parrot_pcc_get_recursion_depth_func(PARROT_INTERP, ARGIN(PMC *ctx)) __attribute__nonnull__(1) __attribute__nonnull__(2); @@ -316,13 +311,6 @@ __attribute__nonnull__(2); PARROT_EXPORT -void Parrot_pcc_set_pred_offset_func(PARROT_INTERP, - ARGIN(PMC *ctx), - size_t pred_offset) - __attribute__nonnull__(1) - __attribute__nonnull__(2); - -PARROT_EXPORT void Parrot_pcc_set_signature_func(PARROT_INTERP, ARGIN(PMC *ctx), ARGIN_NULLOK(PMC *sig_object)) @@ -431,10 +419,6 @@ __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ PARROT_ASSERT_ARG(interp) \ , PARROT_ASSERT_ARG(ctx)) -#define ASSERT_ARGS_Parrot_pcc_get_pred_offset_func \ - __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ - PARROT_ASSERT_ARG(interp) \ - , PARROT_ASSERT_ARG(ctx)) #define ASSERT_ARGS_Parrot_pcc_get_recursion_depth_func \ __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ PARROT_ASSERT_ARG(interp) \ @@ -486,10 +470,6 @@ #define ASSERT_ARGS_Parrot_pcc_set_pc_func __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ PARROT_ASSERT_ARG(interp) \ , PARROT_ASSERT_ARG(ctx)) -#define ASSERT_ARGS_Parrot_pcc_set_pred_offset_func \ - __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ - PARROT_ASSERT_ARG(interp) \ - , PARROT_ASSERT_ARG(ctx)) #define ASSERT_ARGS_Parrot_pcc_set_signature_func __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ PARROT_ASSERT_ARG(interp) \ , PARROT_ASSERT_ARG(ctx)) @@ -533,9 +513,6 @@ # define Parrot_pcc_get_namespace(i, c) (__C(c)->current_namespace) # define Parrot_pcc_set_namespace(i, c, value) (__C(c)->current_namespace = (value)) -# define Parrot_pcc_get_pred_offset(i, c) (__C(c)->pred_offset) -# define Parrot_pcc_set_pred_offset(i, c, value) (__C(c)->pred_offset = (value)) - # define Parrot_pcc_get_pc(i, c) (__C(c)->current_pc) # define Parrot_pcc_set_pc(i, c, value) (__C(c)->current_pc = (value)) @@ -594,9 +571,6 @@ # define Parrot_pcc_get_namespace(i, c) Parrot_pcc_get_namespace_func((i), (c)) # define Parrot_pcc_set_namespace(i, c, value) Parrot_pcc_set_namespace_func((i), (c), (value)) -# define Parrot_pcc_get_pred_offset(i, c) Parrot_pcc_get_pred_offset_func((i), (c)) -# define Parrot_pcc_set_pred_offset(i, c, value) Parrot_pcc_set_pred_offset_func((i), (c), (value)) - # define Parrot_pcc_get_pc(i, c) Parrot_pcc_get_pc_func((i), (c)) # define Parrot_pcc_set_pc(i, c, value) Parrot_pcc_set_pc_func((i), (c), (value)) Index: Configure.pl =================================================================== --- Configure.pl (.../trunk) (revision 45837) +++ Configure.pl (.../branches/runcore_purge) (revision 45883) @@ -343,10 +343,6 @@ Use the given ops files. -=item C<--cgoto=0> - -Don't build cgoto core. This is recommended when you are short of memory. - =item C<--jitcapable> Use JIT system. @@ -623,7 +619,6 @@ auto::jit auto::frames auto::cpu - auto::cgoto auto::inline auto::gc auto::memalign Index: README =================================================================== --- README (.../trunk) (revision 45837) +++ README (.../branches/runcore_purge) (revision 45883) @@ -92,14 +92,6 @@ perldoc -F docs/intro.pod -NOTES ------ - -On some older computers with little RAM, the computed-goto dispatch core -(ops/core_ops_cg.c) may take a while to compile or may fail to compile at all. -You can pass a flag to Configure.pl (--cgoto=0) to disable the computed-goto -core, at a slight cost in runtime speed. - CHANGES ------- Index: compilers/imcc/main.c =================================================================== --- compilers/imcc/main.c (.../trunk) (revision 45837) +++ compilers/imcc/main.c (.../branches/runcore_purge) (revision 45883) @@ -251,13 +251,6 @@ if (strchr(opt->opt_arg, '2')) { IMCC_INFO(interp)->optimizer_level |= (OPT_PRE | OPT_CFG); } - if (strchr(opt->opt_arg, 't')) { -#ifdef HAVE_COMPUTED_GOTO - *core = PARROT_CGP_CORE; -#else - *core = PARROT_SWITCH_CORE; -#endif - } break; default: @@ -414,12 +407,6 @@ if (opt_level & OPT_SUB) opt_desc[i++] = 'c'; - if (PARROT_RUNCORE_JIT_OPS_TEST(interp->run_core)) - opt_desc[i++] = 'j'; - - if (PARROT_RUNCORE_PREDEREF_OPS_TEST(interp->run_core)) - opt_desc[i++] = 't'; - opt_desc[i] = '\0'; return; } Index: t/configure/testlib/adefectivefoobar =================================================================== --- t/configure/testlib/adefectivefoobar (.../trunk) (revision 45837) +++ t/configure/testlib/adefectivefoobar (.../branches/runcore_purge) (revision 45883) @@ -40,7 +40,6 @@ auto::jit auto::cpu auto::funcptr -auto::cgoto auto::inline auto::gc auto::memalign Index: t/configure/testlib/bdefectivefoobar =================================================================== --- t/configure/testlib/bdefectivefoobar (.../trunk) (revision 45837) +++ t/configure/testlib/bdefectivefoobar (.../branches/runcore_purge) (revision 45883) @@ -50,7 +50,6 @@ auto::jit auto::cpu auto::funcptr -auto::cgoto auto::inline auto::gc auto::memalign Index: t/configure/testlib/cdefectivefoobar =================================================================== --- t/configure/testlib/cdefectivefoobar (.../trunk) (revision 45837) +++ t/configure/testlib/cdefectivefoobar (.../branches/runcore_purge) (revision 45883) @@ -51,7 +51,6 @@ auto::jit auto::cpu auto::funcptr -auto::cgoto auto::inline auto::gc auto::memalign Index: t/configure/testlib/ddefectivefoobar =================================================================== --- t/configure/testlib/ddefectivefoobar (.../trunk) (revision 45837) +++ t/configure/testlib/ddefectivefoobar (.../branches/runcore_purge) (revision 45883) @@ -42,7 +42,6 @@ auto::jit auto::cpu auto::funcptr -auto::cgoto auto::inline auto::gc auto::memalign Index: t/configure/testlib/verbosefoobar =================================================================== --- t/configure/testlib/verbosefoobar (.../trunk) (revision 45837) +++ t/configure/testlib/verbosefoobar (.../branches/runcore_purge) (revision 45883) @@ -44,7 +44,6 @@ auto::jit auto::cpu auto::funcptr -auto::cgoto auto::inline auto::gc auto::memalign Index: t/pharness/02-get_test_prog_args.t =================================================================== --- t/pharness/02-get_test_prog_args.t (.../trunk) (revision 45837) +++ t/pharness/02-get_test_prog_args.t (.../branches/runcore_purge) (revision 45883) @@ -13,7 +13,7 @@ }; plan( skip_all => 't/harness only runs once configuration has completed' ) if $@; -plan( tests => 16 ); +plan( tests => 12 ); use Carp; use Parrot::Harness::Options qw( get_test_prog_args ); @@ -28,7 +28,6 @@ ($gc_debug, $run_exec) = (0,0); $args = get_test_prog_args($optsref, $gc_debug, $run_exec); like($args, qr/-d/, "Got expected option"); -like($args, qr/--runcore=cgoto/, "Got expected option"); like($args, qr/-D40/, "Got expected option"); $optsref = { @@ -40,7 +39,6 @@ ($gc_debug, $run_exec) = (0,0); $args = get_test_prog_args($optsref, $gc_debug, $run_exec); like($args, qr/-d/, "Got expected option"); -like($args, qr/--runcore=cgoto/, "Got expected option"); like($args, qr/-D40/, "Got expected option"); like($args, qr/-O2/, "Got expected option"); @@ -52,7 +50,6 @@ ($gc_debug, $run_exec) = (1,0); $args = get_test_prog_args($optsref, $gc_debug, $run_exec); like($args, qr/-d/, "Got expected option"); -like($args, qr/--runcore=cgoto/, "Got expected option"); like($args, qr/-D40/, "Got expected option"); like($args, qr/\s--gc-debug/, "Got expected option"); @@ -64,7 +61,6 @@ ($gc_debug, $run_exec) = (0,1); $args = get_test_prog_args($optsref, $gc_debug, $run_exec); like($args, qr/-d/, "Got expected option"); -like($args, qr/--runcore=cgoto/, "Got expected option"); like($args, qr/-D40/, "Got expected option"); like($args, qr/\s--run-exec/, "Got expected option"); Index: t/steps/auto/cgoto-01.t =================================================================== --- t/steps/auto/cgoto-01.t (.../trunk) (revision 45837) +++ t/steps/auto/cgoto-01.t (.../branches/runcore_purge) (revision 45883) @@ -1,139 +0,0 @@ -#! perl -# Copyright (C) 2007, Parrot Foundation. -# $Id$ -# auto/cgoto-01.t - -use strict; -use warnings; -use Test::More tests => 25; -use Carp; -use lib qw( lib t/configure/testlib ); -use_ok('config::auto::cgoto'); -use Parrot::Configure::Options qw( process_options ); -use Parrot::Configure::Step::Test; -use Parrot::Configure::Test qw( - test_step_constructor_and_description -); -use IO::CaptureOutput qw( capture ); - - -########### regular ########### - -my ($args, $step_list_ref) = process_options( { - argv => [ ], - mode => q{configure}, -} ); - -my $conf = Parrot::Configure::Step::Test->new; -$conf->include_config_results( $args ); - -my $serialized = $conf->pcfreeze(); - -my $pkg = q{auto::cgoto}; - -$conf->add_steps($pkg); -$conf->options->set( %{$args} ); -my $step = test_step_constructor_and_description($conf); -my $ret = $step->runstep($conf); -ok( $ret, "runstep() returned true value" ); -ok(defined($step->result()), "A result was defined"); -ok(defined($conf->data->get('cg_flag')), "An attribute has been defined"); - -$conf->replenish($serialized); - -########### _probe_for_cgoto() ########### - -($args, $step_list_ref) = process_options( { - argv => [ ], - mode => q{configure}, -} ); - -$conf->add_steps($pkg); -$conf->options->set( %{$args} ); -$step = test_step_constructor_and_description($conf); -$conf->options->set(cgoto => 1); -is(auto::cgoto::_probe_for_cgoto($conf), 1, - "Got expected return value"); -$conf->options->set(cgoto => 0); -is(auto::cgoto::_probe_for_cgoto($conf), 0, - "Got expected return value"); -$conf->options->set(cgoto => undef); -ok(defined(auto::cgoto::_probe_for_cgoto($conf)), - "Probe returned a defined value"); - -########### _evaluate_cgoto() ########### - -$step->_evaluate_cgoto($conf, 1); -ok($conf->data->get('cg_flag'), "An attribute was set to true value"); -is($step->result(), q{yes}, "Expected result was set"); - -$step->_evaluate_cgoto($conf, 0); -is($conf->data->get('cg_flag'), q{}, "An attribute was set to empty string"); -is($step->result(), q{no}, "Expected result was set"); - -$conf->replenish($serialized); - -($args, $step_list_ref) = process_options( { - argv => [ ], - mode => q{configure}, -} ); - -$conf->add_steps($pkg); -$conf->options->set( %{$args} ); -$step = test_step_constructor_and_description($conf); -{ - my $stdout; - capture( - sub { $step->_evaluate_cgoto($conf, 1) }, - \$stdout - ); - ok($conf->data->get('cg_flag'), "An attribute was set to true value"); - is($step->result(), q{yes}, "Expected result was set"); -} - -{ - my $stdout; - capture( - sub { $step->_evaluate_cgoto($conf, 0) }, - \$stdout - ); - is($conf->data->get('cg_flag'), q{}, - "An attribute was set to empty string"); - is($step->result(), q{no}, "Expected result was set"); -} - - -pass("Completed all tests in $0"); - -################### DOCUMENTATION ################### - -=head1 NAME - -auto/cgoto-01.t - test auto::cgoto - -=head1 SYNOPSIS - - % prove t/steps/auto/cgoto-01.t - -=head1 DESCRIPTION - -The files in this directory test functionality used by F. - -The tests in this file test auto::cgoto. - -=head1 AUTHOR - -James E Keenan - -=head1 SEE ALSO - -config::auto::cgoto, F. - -=cut - -# Local Variables: -# mode: cperl -# cperl-indent-level: 4 -# fill-column: 100 -# End: -# vim: expandtab shiftwidth=4: Index: t/tools/install/testlib/README =================================================================== --- t/tools/install/testlib/README (.../trunk) (revision 45837) +++ t/tools/install/testlib/README (.../branches/runcore_purge) (revision 45883) @@ -104,14 +104,6 @@ perldoc -F docs/intro.pod -NOTES ------ - -On some older computers with little RAM, the computed-goto dispatch core -(ops/core_ops_cg.c) may take a while to compile or may fail to compile at all. -You can pass a flag to Configure.pl (--cgoto=0) to disable the computed-goto -core, at a slight cost in runtime speed. - CHANGES ------- Index: t/tools/ops2cutils/04-print_c_source_top.t =================================================================== --- t/tools/ops2cutils/04-print_c_source_top.t (.../trunk) (revision 45837) +++ t/tools/ops2cutils/04-print_c_source_top.t (.../branches/runcore_purge) (revision 45883) @@ -19,7 +19,7 @@ } unshift @INC, qq{$topdir/lib}; } -use Test::More tests => 26; +use Test::More tests => 10; use Carp; use Cwd; use File::Copy; @@ -47,10 +47,6 @@ require Parrot::Ops2c::Utils; test_print_c_source_top( [qw( C )] ); - test_print_c_source_top( [qw( CGoto )] ); - test_print_c_source_top( [qw( CGP )] ); - test_print_c_source_top( [qw( CSwitch )] ); - test_print_c_source_top( [qw( C CGoto CGP CSwitch CPrederef )] ); ok( chdir($cwd), "returned to starting directory" ); } Index: t/tools/ops2cutils/09-dynamic_nolines.t =================================================================== --- t/tools/ops2cutils/09-dynamic_nolines.t (.../trunk) (revision 45837) +++ t/tools/ops2cutils/09-dynamic_nolines.t (.../branches/runcore_purge) (revision 45883) @@ -19,7 +19,7 @@ } unshift @INC, qq{$topdir/lib}; } -use Test::More tests => 22; +use Test::More tests => 10; use Carp; use Cwd; use File::Copy; @@ -52,10 +52,7 @@ } chdir "src/dynoplibs" or croak "Unable to change to src/dynoplibs: $!"; - test_dynops_nolines( [qw( CGoto obscure.ops )] ); - test_dynops_nolines( [qw( CGP obscure.ops )] ); test_dynops_nolines( [qw( C obscure.ops )] ); - test_dynops_nolines( [qw( CSwitch obscure.ops )] ); ok( chdir($cwd), "returned to starting directory" ); } Index: t/tools/ops2cutils/05-print_c_source_bottom.t =================================================================== --- t/tools/ops2cutils/05-print_c_source_bottom.t (.../trunk) (revision 45837) +++ t/tools/ops2cutils/05-print_c_source_bottom.t (.../branches/runcore_purge) (revision 45883) @@ -19,7 +19,7 @@ } unshift @INC, qq{$topdir/lib}; } -use Test::More tests => 26; +use Test::More tests => 10; use Carp; use Cwd; use File::Copy; @@ -48,10 +48,6 @@ require Parrot::Ops2c::Utils; test_print_c_source_bottom( [qw( C )] ); - test_print_c_source_bottom( [qw( CGoto )] ); - test_print_c_source_bottom( [qw( CGP )] ); - test_print_c_source_bottom( [qw( CSwitch )] ); - test_print_c_source_bottom( [qw( C CGoto CGP CSwitch CPrederef )] ); ok( chdir($cwd), "returned to starting directory" ); } Index: t/tools/ops2cutils/03-print_c_header_file.t =================================================================== --- t/tools/ops2cutils/03-print_c_header_file.t (.../trunk) (revision 45837) +++ t/tools/ops2cutils/03-print_c_header_file.t (.../branches/runcore_purge) (revision 45883) @@ -19,7 +19,7 @@ } unshift @INC, qq{$topdir/lib}; } -use Test::More tests => 24; +use Test::More tests => 12; use Carp; use Cwd; use File::Copy; @@ -47,13 +47,9 @@ require Parrot::Ops2c::Utils; test_single_trans_and_header(q{C}); - test_single_trans_and_header(q{CGoto}); - test_single_trans_and_header(q{CGP}); - test_single_trans_and_header(q{CSwitch}); - test_single_trans_and_header(q{CPrederef}); { - local @ARGV = qw( C CGoto CGP CSwitch CPrederef ); + local @ARGV = qw( C ); my $self = Parrot::Ops2c::Utils->new( { argv => [@ARGV], @@ -73,7 +69,7 @@ sub test_single_trans_and_header { my $trans = shift; - my %available = map { $_, 1 } qw( C CGoto CGP CSwitch CPrederef ); + my %available = map { $_, 1 } qw( C ); croak "Bad argument $trans to test_single_trans()" unless $available{$trans}; Index: t/tools/ops2cutils/01-new.t =================================================================== --- t/tools/ops2cutils/01-new.t (.../trunk) (revision 45837) +++ t/tools/ops2cutils/01-new.t (.../branches/runcore_purge) (revision 45883) @@ -19,7 +19,7 @@ } unshift @INC, qq{$topdir/lib}; } -use Test::More tests => 19; +use Test::More tests => 15; use Carp; use Cwd; use File::Copy; @@ -87,19 +87,15 @@ "Constructor correctly returned undef due to bad class name command-line argument" ); like( $stderr, - qr/Parrot::Ops2c::Utils::new\(\) requires C, CGoto, CGP, CSwitch and\/or CPrederef/, + qr/Parrot::Ops2c::Utils::new\(\) requires C/, "Got correct error message" ); } test_single_trans(q{C}); - test_single_trans(q{CGoto}); - test_single_trans(q{CGP}); - test_single_trans(q{CSwitch}); - test_single_trans(q{CPrederef}); { - local @ARGV = qw( C CGoto CGP CSwitch CPrederef ); + local @ARGV = qw( C ); my $self = Parrot::Ops2c::Utils->new( { argv => [@ARGV], flag => { core => 1 } } ); @@ -107,7 +103,7 @@ } { - local @ARGV = qw( C CGoto CGP CSwitch CPrederef ); + local @ARGV = qw( C ); my $self = Parrot::Ops2c::Utils->new( { argv => [@ARGV], @@ -146,7 +142,7 @@ sub test_single_trans { my $trans = shift; - my %available = map { $_, 1 } qw( C CGoto CGP CSwitch CPrederef ); + my %available = map { $_, 1 } qw( C ); croak "Bad argument $trans to test_single_trans()" unless $available{$trans}; Index: t/tools/ops2cutils/06-dynamic.t =================================================================== --- t/tools/ops2cutils/06-dynamic.t (.../trunk) (revision 45837) +++ t/tools/ops2cutils/06-dynamic.t (.../branches/runcore_purge) (revision 45883) @@ -19,7 +19,7 @@ } unshift @INC, qq{$topdir/lib}; } -use Test::More tests => 27; +use Test::More tests => 15; use Carp; use Cwd; use File::Copy; @@ -55,16 +55,13 @@ } chdir "src/dynoplibs" or croak "Unable to change to src/dynoplibs: $!"; - test_dynops( [qw( CGoto obscure.ops )] ); - test_dynops( [qw( CGP obscure.ops )] ); - test_dynops( [qw( C obscure.ops )] ); - test_dynops( [qw( CSwitch obscure.ops )] ); + test_dynops( [qw( C obscure.ops )] ); { my ($self, $stdout, $stderr); capture( sub { $self = Parrot::Ops2c::Utils->new( { - argv => [qw( CSwitch obscure.ops obscure.ops )], + argv => [qw( C obscure.ops obscure.ops )], flag => { dynamic => 1 }, } ); }, \$stdout, Index: t/tools/ops2cutils/07-make_incdir.t =================================================================== --- t/tools/ops2cutils/07-make_incdir.t (.../trunk) (revision 45837) +++ t/tools/ops2cutils/07-make_incdir.t (.../branches/runcore_purge) (revision 45883) @@ -81,7 +81,7 @@ require Parrot::Ops2c::Utils; { - local @ARGV = qw( C CGoto CGP CSwitch CPrederef ); + local @ARGV = qw( C ); my $self = Parrot::Ops2c::Utils->new( { argv => [@ARGV], @@ -98,7 +98,7 @@ sub test_single_trans { my $trans = shift; - my %available = map { $_, 1 } qw( C CGoto CGP CSwitch CPrederef ); + my %available = map { $_, 1 } qw( C ); croak "Bad argument $trans to test_single_trans()" unless $available{$trans}; Index: t/tools/ops2cutils/10-print_c_source_file.t =================================================================== --- t/tools/ops2cutils/10-print_c_source_file.t (.../trunk) (revision 45837) +++ t/tools/ops2cutils/10-print_c_source_file.t (.../branches/runcore_purge) (revision 45883) @@ -19,7 +19,7 @@ } unshift @INC, qq{$topdir/lib}; } -use Test::More tests => 21; +use Test::More tests => 12; use Carp; use Cwd; use File::Copy; @@ -47,12 +47,9 @@ require Parrot::Ops2c::Utils; test_single_trans_and_source(q{C}); - test_single_trans_and_source(q{CGoto}); - test_single_trans_and_source(q{CGP}); - test_single_trans_and_source(q{CSwitch}); { - local @ARGV = qw( C CGoto CGP CSwitch ); + local @ARGV = qw( C ); my $self = Parrot::Ops2c::Utils->new( { argv => [@ARGV], @@ -72,7 +69,7 @@ sub test_single_trans_and_source { my $trans = shift; - my %available = map { $_, 1 } qw( C CGoto CGP CSwitch CPrederef ); + my %available = map { $_, 1 } qw( C ); croak "Bad argument $trans to test_single_trans()" unless $available{$trans}; Index: t/tools/ops2cutils/08-nolines.t =================================================================== --- t/tools/ops2cutils/08-nolines.t (.../trunk) (revision 45837) +++ t/tools/ops2cutils/08-nolines.t (.../branches/runcore_purge) (revision 45883) @@ -47,7 +47,7 @@ require Parrot::Ops2c::Utils; { - local @ARGV = qw( C CGoto CGP CSwitch CPrederef ); + local @ARGV = qw( C ); my $self = Parrot::Ops2c::Utils->new( { argv => [@ARGV], Index: t/harness =================================================================== --- t/harness (.../trunk) (revision 45837) +++ t/harness (.../branches/runcore_purge) (revision 45883) @@ -134,10 +134,6 @@ Turn warnings on. -=item C<-g> - -Run the C core. - =item C<-G> Run the C core. @@ -146,14 +142,6 @@ Alias for running with the fast core. -=item C<-C> - -Run the C core. - -=item C<-S> - -Run Switched. - =item C<-b> Run bounds checking enabled. Index: t/examples/shootout.t =================================================================== --- t/examples/shootout.t (.../trunk) (revision 45837) +++ t/examples/shootout.t (.../branches/runcore_purge) (revision 45883) @@ -35,7 +35,7 @@ To add a new test, you do not have to modify this script: 1. add your script (toto.pir) to examples/shootout - 2. put parrot options in the first line (e.g "#!./parrot -Oc -R cgp-jit") + 2. put parrot options in the first line (e.g "#!./parrot -Oc") 3. make sure you have default argument values 4. put the expected output as a file : toto.pir_output 5. if you need an input file (to be read from stdin), call it toto.pir_input @@ -74,15 +74,13 @@ $args =~ s/-j/-C/; $args =~ s/-Cj/-C/; } - unless ( $PConfig{cg_flag} =~ /HAVE/ ) { - $args =~ s/-Cj/-j/; + $args =~ s/-Cj/-j/; - # Remove any plain -C option. - $args =~ s/(^|\s)-C(\s|$)/$1$2/; + # Remove any plain -C option. + $args =~ s/(^|\s)-C(\s|$)/$1$2/; - # Remove any extra Cs still floating around - $args =~ s/C//; - } + # Remove any extra Cs still floating around + $args =~ s/C//; # look for input files my $input = "$file$INPUT_EXT"; Index: t/op/interp.t =================================================================== --- t/op/interp.t (.../trunk) (revision 45837) +++ t/op/interp.t (.../branches/runcore_purge) (revision 45883) @@ -154,9 +154,6 @@ $I0 = interpinfo .INTERPINFO_CURRENT_RUNCORE if $I0 == .PARROT_FUNCTION_CORE goto ok1 if $I0 == .PARROT_FAST_CORE goto ok1 - if $I0 == .PARROT_SWITCH_CORE goto ok1 - if $I0 == .PARROT_CGOTO_CORE goto ok1 - if $I0 == .PARROT_CGP_CORE goto ok1 if $I0 == .PARROT_EXEC_CORE goto ok1 if $I0 == .PARROT_GC_DEBUG_CORE goto ok1 print 'not ' Index: t/op/annotate-old.t =================================================================== --- t/op/annotate-old.t (.../trunk) (revision 45837) +++ t/op/annotate-old.t (.../branches/runcore_purge) (revision 45883) @@ -24,8 +24,8 @@ =cut TODO: { - local $TODO = q|fails in fast and cgoto runcores - TT #1135| - if $ENV{TEST_PROG_ARGS} =~ /--runcore=(fast|cgoto)/; + local $TODO = q|fails in fast runcore - TT #1135| + if $ENV{TEST_PROG_ARGS} =~ /--runcore=fast/; pir_error_output_like( <data->set( cc_debug => '' ); $conf->data->add( ' ', ccflags => "-DDISABLE_GC_DEBUG=1 -DNDEBUG" ); - # per file overrides - not every compiler can optimize every file. - - # The src/ops/core_ops*.c files are challenging to optimize. - # gcc can usually handle it, but don't assume any other compilers can, - # until there is specific evidence otherwise. - if ( ! defined($gccversion)) { - $conf->data->set('optimize::src/ops/core_ops_cg.c',''); - $conf->data->set('optimize::src/ops/core_ops_cgp.c',''); - $conf->data->set('optimize::src/ops/core_ops_switch.c',''); - } - # TT #405 if ($conf->data->get('cpuarch') eq 'amd64') { $conf->data->set('optimize::src/gc/system.c',''); Index: config/auto/cgoto.pm =================================================================== --- config/auto/cgoto.pm (.../trunk) (revision 45837) +++ config/auto/cgoto.pm (.../branches/runcore_purge) (revision 45883) @@ -1,82 +0,0 @@ -# Copyright (C) 2001-2005, Parrot Foundation. -# $Id$ - -=head1 NAME - -config/auto/cgoto.pm - Computed C - -=head1 DESCRIPTION - -Determines whether the compiler supports computed C. - -=cut - -package auto::cgoto; - -use strict; -use warnings; - -use base qw(Parrot::Configure::Step); - -use Parrot::Configure::Utils ':auto'; - -sub _init { - my $self = shift; - return { - 'description' => 'Does your compiler support computed goto', - 'result' => '', - }; -} - -sub runstep { - my ( $self, $conf ) = @_; - - my $test = _probe_for_cgoto( $conf ); - - $self->_evaluate_cgoto($conf, $test); - - return 1; -} - -sub _probe_for_cgoto { - my $conf = shift; - my $cgoto = $conf->options->get('cgoto'); - my $test; - if ( defined $cgoto ) { - $test = $cgoto; - } - else { - $conf->cc_gen('config/auto/cgoto/test_c.in'); - $test = eval { $conf->cc_build(); 1; } || 0; - $conf->cc_clean(); - } - return $test; -} - -sub _evaluate_cgoto { - my ($self, $conf, $test) = @_; - my $verbose = $conf->options->get('verbose'); - if ($test) { - $conf->data->set( - cg_flag => '-DHAVE_COMPUTED_GOTO' - ); - print " (yes) " if $verbose; - $self->set_result('yes'); - } - else { - $conf->data->set( - cg_flag => '' - ); - print " (no) " if $verbose; - $self->set_result('no'); - } -} - -1; - -# Local Variables: -# mode: cperl -# cperl-indent-level: 4 -# fill-column: 100 -# End: -# vim: expandtab shiftwidth=4: Index: config/gen/makefiles/dynpmc.in =================================================================== --- config/gen/makefiles/dynpmc.in (.../trunk) (revision 45837) +++ config/gen/makefiles/dynpmc.in (.../branches/runcore_purge) (revision 45883) @@ -14,7 +14,7 @@ LD = @ld@ LDFLAGS = @ldflags@ @ld_debug@ @rpath_blib@ LD_LOAD_FLAGS = @ld_load_flags@ -CFLAGS = @ccflags@ @cc_shared@ @cc_debug@ @ccwarn@ @cc_hasjit@ @cg_flag@ @gc_flag@ @optimize@ +CFLAGS = @ccflags@ @cc_shared@ @cc_debug@ @ccwarn@ @cc_hasjit@ @gc_flag@ @optimize@ LIBPARROT = @libparrot_ldflags@ BUILD_TOOLS_DIR = $(BUILD_DIR)/tools/build Index: config/gen/makefiles/root.in =================================================================== --- config/gen/makefiles/root.in (.../trunk) (revision 45837) +++ config/gen/makefiles/root.in (.../branches/runcore_purge) (revision 45883) @@ -84,7 +84,7 @@ CC_SHARED = @cc_shared@ CC_O_OUT = @cc_o_out@ CC_WARN = @ccwarn@ -CFLAGS = $(CC_INC) @ccflags@ @cc_build_call_frames@ @cc_debug@ @cg_flag@ @gc_flag@ @clock_best@ $(CC_SHARED) +CFLAGS = $(CC_INC) @ccflags@ @cc_build_call_frames@ @cc_debug@ @gc_flag@ @clock_best@ $(CC_SHARED) LINK_DYNAMIC = @link_dynamic@ LINK = @link@ LINKFLAGS = @linkflags@ @link_debug@ @ld_debug@ @@ -170,8 +170,7 @@ parrot.pc \ compilers/imcc/imcc.y.flag \ compilers/imcc/imcc.l.flag \ - src/ops/core_ops.c \ - src/ops/core_ops_switch.c + src/ops/core_ops.c GEN_PASM_INCLUDES = \ runtime/parrot/include/cclass.pasm \ @@ -237,7 +236,6 @@ $(INC_DIR)/vtable.h \ $(INC_DIR)/oplib/core_ops.h \ $(INC_DIR)/oplib/ops.h \ - $(INC_DIR)/oplib/core_ops_switch.h \ $(INC_DIR)/extend_vtable.h \ $(INC_DIR)/pbcversion.h @@ -245,7 +243,6 @@ src/core_ops.c \ src/nci.c \ src/glut_nci_thunks.c \ - src/core_ops_switch.c \ src/parrot_config.c \ src/null_config.c \ src/install_config.c \ @@ -409,7 +406,6 @@ # generated list of header files GENERAL_H_FILES = $(NONGEN_HEADERS) $(GEN_HEADERS) \ -#IF(cg_flag): $(INC_DIR)/oplib/core_ops_cg.h $(INC_DIR)/oplib/core_ops_cgp.h CHARSET_O_FILES = @TEMP_charset_o@ @@ -433,10 +429,7 @@ INTERP_O_FILES = \ src/string/api$(O) \ - \ src/ops/core_ops$(O) \ - src/ops/core_ops_switch$(O) \ - \ #IF(i386_has_gcc_cmpxchg): src/atomic/gcc_x86$(O) \ src/byteorder$(O) \ src/string/charset$(O) \ @@ -500,7 +493,6 @@ @TEMP_atomic_o@ \ @TEMP_gc_o@ \ #IF(platform_asm): src/platform_asm$(O) \ -#IF(cg_flag): src/ops/core_ops_cg$(O) src/ops/core_ops_cgp$(O) \ OPS_FILES = @ops@ $(GEN_OPSFILES) @@ -1313,7 +1305,7 @@ src/runcore/main.str \ include/pmc/pmc_parrotlibrary.h \ $(INC_DIR)/dynext.h $(INC_DIR)/oplib/core_ops.h \ - $(INC_DIR)/oplib/core_ops_switch.h $(INC_DIR)/oplib/ops.h \ + $(INC_DIR)/oplib/ops.h \ $(PARROT_H_HEADERS) $(INC_DIR)/runcore_api.h \ $(INC_DIR)/runcore_profiling.h @@ -1418,7 +1410,7 @@ src/runcore/cores$(O) : src/runcore/cores.str \ include/pmc/pmc_sub.h \ $(INC_DIR)/dynext.h $(INC_DIR)/embed.h $(INC_DIR)/oplib/core_ops.h \ - $(INC_DIR)/oplib/core_ops_switch.h $(INC_DIR)/oplib/ops.h \ + $(INC_DIR)/oplib/ops.h \ $(INC_DIR)/runcore_api.h $(INC_DIR)/runcore_trace.h \ $(PARROT_H_HEADERS) @@ -1528,41 +1520,6 @@ include/pmc/pmc_continuation.h $(PERL) $(BUILD_TOOLS_DIR)/ops2c.pl C --core @no_lines_flag@ -## SUFFIX OVERRIDE -src/ops/core_ops_switch$(O) : $(GENERAL_H_FILES) src/ops/core_ops_switch.c \ - include/pmc/pmc_parrotlibrary.h - $(CC) $(CFLAGS) @optimize::src/ops/core_ops_switch.c@ @ccwarn::src/ops/core_ops_switch.c@ @cc_shared@ -I$(@D) @cc_o_out@$@ -c src/ops/core_ops_switch.c - -$(INC_DIR)/oplib/core_ops_switch.h : src/ops/core_ops_switch.c - -src/ops/core_ops_switch.c : $(OPS_FILES) $(BUILD_TOOLS_DIR)/ops2c.pl \ - lib/Parrot/OpsFile.pm lib/Parrot/Op.pm $(INC_DIR)/config.h \ - lib/Parrot/OpLib/core.pm lib/Parrot/OpTrans/CSwitch.pm \ - lib/Parrot/OpTrans/CPrederef.pm - $(PERL) $(BUILD_TOOLS_DIR)/ops2c.pl CSwitch --core @no_lines_flag@ - -## SUFFIX OVERRIDE -src/ops/core_ops_cg$(O): $(GENERAL_H_FILES) src/ops/core_ops_cg.c \ - include/pmc/pmc_parrotlibrary.h - $(CC) $(CFLAGS) @optimize::src/ops/core_ops_cg.c@ @ccwarn::src/ops/core_ops_cg.c@ @cc_shared@ -I$(@D) @cc_o_out@$@ -c src/ops/core_ops_cg.c - -## SUFFIX OVERRIDE -src/ops/core_ops_cgp$(O): $(GENERAL_H_FILES) src/ops/core_ops_cgp.c \ - include/pmc/pmc_parrotlibrary.h - $(CC) $(CFLAGS) @optimize::src/ops/core_ops_cgp.c@ @ccwarn::src/ops/core_ops_cgp.c@ @cc_shared@ -I$(@D) @cc_o_out@$@ -c src/ops/core_ops_cgp.c - -src/runcore/cores.c: $(INC_DIR)/oplib/core_ops_cgp.h - -$(INC_DIR)/oplib/core_ops_cg.h: src/ops/core_ops_cg.c - -src/ops/core_ops_cg.c : $(OPS_FILES) $(BUILD_TOOLS_DIR)/ops2c.pl lib/Parrot/OpsFile.pm lib/Parrot/Op.pm lib/Parrot/OpTrans/CGoto.pm lib/Parrot/OpLib/core.pm - $(PERL) $(BUILD_TOOLS_DIR)/ops2c.pl CGoto --core - -$(INC_DIR)/oplib/core_ops_cgp.h: src/ops/core_ops_cgp.c - -src/ops/core_ops_cgp.c : $(OPS_FILES) $(BUILD_TOOLS_DIR)/ops2c.pl lib/Parrot/OpsFile.pm lib/Parrot/Op.pm lib/Parrot/OpTrans/CGP.pm lib/Parrot/OpLib/core.pm lib/Parrot/OpTrans/CPrederef.pm - $(PERL) $(BUILD_TOOLS_DIR)/ops2c.pl CGP --core - @TEMP_gc_c@ @TEMP_pmc_build@ @@ -1746,15 +1703,12 @@ check : test # Test various run cores and other stuff -# 'testC', 'testg' and 'testj' are tested only +# 'testg' and 'testj' are tested only # when the needed runcores are available fulltest : -@make@ testb \ -#IF(cg_flag): testC \ testf \ -#IF(cg_flag): testg \ testr \ - testS \ src_tests \ run_tests \ buildtools_tests \ @@ -1771,10 +1725,6 @@ testb : test_prep $(PERL) t/harness $(EXTRA_TEST_ARGS) -b $(RUNCORE_TEST_FILES) -# CGP core -testC : test_prep - $(PERL) t/harness $(EXTRA_TEST_ARGS) -C $(RUNCORE_TEST_FILES) - # fast core testf : test_prep $(PERL) t/harness $(EXTRA_TEST_ARGS) -f $(RUNCORE_TEST_FILES) @@ -1795,18 +1745,6 @@ testr : test_prep $(PERL) t/harness $(EXTRA_TEST_ARGS) -r $(RUNCORE_TEST_FILES) -# switched core -testS : test_prep - $(PERL) t/harness $(EXTRA_TEST_ARGS) -S $(RUNCORE_TEST_FILES) - -# Computed goto jitted core - target retained, but falls back to standard core -testCj : test_prep - $(PERL) t/harness $(EXTRA_TEST_ARGS) $(RUNCORE_TEST_FILES) - -# switched jitted core - target retained, but falls back to standard core -testSj : test_prep - $(PERL) t/harness $(EXTRA_TEST_ARGS) $(RUNCORE_TEST_FILES) - # test the EXEC stuff testexec: test_prep $(PERL) t/harness $(EXTRA_TEST_ARGS) --run-exec $(RUNCORE_TEST_FILES) @@ -1881,7 +1819,6 @@ #UNLESS(win32): cover-clean \ editor-clean $(RM_F) $(INC_DIR)/oplib/core_ops_cg.h src/ops/core_ops_cg.c \ - $(INC_DIR)/oplib/core_ops_cgp.h src/ops/core_ops_cgp.c $(RM_F) chartypes "*.s" "*~" $(RM_F) $(FLUID_FILES_1) $(RM_F) $(FLUID_FILES_2) @@ -2331,11 +2268,8 @@ cover: \ cover.dummy \ cover-testb \ -#IF(cg_flag): cover-testC \ cover-testf \ -#IF(cg_flag): cover-testg \ cover-testr \ - cover-testS \ cover-src \ cover-run \ cover-perl \ @@ -2363,9 +2297,6 @@ cover-testb: cover.dummy -@make@ testb -cover-testC: cover.dummy - -@make@ testC - cover-testf: cover.dummy -@make@ testf @@ -2378,9 +2309,6 @@ cover-testr: cover.dummy -@make@ testr -cover-testS: cover.dummy - -@make@ testS - cover-src: cover.dummy -@make@ src_tests Index: config/gen/config_h/config_h.in =================================================================== --- config/gen/config_h/config_h.in (.../trunk) (revision 45837) +++ config/gen/config_h/config_h.in (.../branches/runcore_purge) (revision 45883) @@ -152,10 +152,6 @@ /* Oplib and dynamic ops related. */ #define PARROT_CORE_OPLIB_NAME "core" #define PARROT_CORE_OPLIB_INIT Parrot_DynOp_core_@MAJOR@_@MINOR@_@PATCH@ -#define PARROT_CORE_PREDEREF_OPLIB_INIT Parrot_DynOp_core_prederef_@MAJOR@_@MINOR@_@PATCH@ -#define PARROT_CORE_SWITCH_OPLIB_INIT Parrot_DynOp_core_switch_@MAJOR@_@MINOR@_@PATCH@ -#define PARROT_CORE_CG_OPLIB_INIT Parrot_DynOp_core_cg_@MAJOR@_@MINOR@_@PATCH@ -#define PARROT_CORE_CGP_OPLIB_INIT Parrot_DynOp_core_cgp_@MAJOR@_@MINOR@_@PATCH@ /* ICU. */ #define PARROT_HAS_ICU @has_icu@ Index: examples/sdl/mandel.pir =================================================================== --- examples/sdl/mandel.pir (.../trunk) (revision 45837) +++ examples/sdl/mandel.pir (.../branches/runcore_purge) (revision 45883) @@ -556,9 +556,7 @@ Optimized build [2] plain runcore 64 bit 3.0s - [2] -R cgp runcore 64 bit 1.5s [2] plain runcore 32 bit 3.6s - [2] -R cgp runcore 32 bit 1.6s [1] -R jit 1.1s [2] -R jit 0.8s [3] -R jit 0.5s Index: examples/c/test_main.c =================================================================== --- examples/c/test_main.c (.../trunk) (revision 45837) +++ examples/c/test_main.c (.../branches/runcore_purge) (revision 45883) @@ -209,13 +209,6 @@ static void usage(void) { -#ifdef HAVE_COMPUTED_GOTO - const char* cgoto_info = "Deactivate computed goto"; -#else - const char* cgoto_info = - "Deactivate computed goto (not available on this platform)"; -#endif - fprintf(stderr, "Usage: parrot [switches] [--] programfile [arguments]\n\ -b --bounds-checks Activate bounds checks\n\ @@ -223,9 +216,6 @@ -h --help Display this message\n\ -j --jit Activate Just-In-Time compiler\n\ -p --profile Activate profiling\n\ - -P --predereferenced_core Activate predereferencing\n\ - -S --switched_core Activate switched core\n\ - -g --no-computed-goto %s\n\ -t --trace Activate tracing\n\ -v --version Display version information\n\ -. --wait Wait for a keypress (gives Windows users\n\ @@ -233,8 +223,7 @@ --gc-debug\n\ Enable garbage collection debugging mode. This may also be enabled\n\ by setting the environment variable $PARROT_GC_DEBUG to 1.\n\ -\n", - cgoto_info); +\n"); Parrot_exit(interp, 0); } Index: examples/shootout/binarytrees.pir =================================================================== --- examples/shootout/binarytrees.pir (.../trunk) (revision 45837) +++ examples/shootout/binarytrees.pir (.../branches/runcore_purge) (revision 45883) @@ -1,4 +1,4 @@ -#!./parrot -R cgp +#!./parrot # Copyright (C) 2005-2009, Parrot Foundation. # $Id$ # Index: examples/shootout/fasta.pir =================================================================== --- examples/shootout/fasta.pir (.../trunk) (revision 45837) +++ examples/shootout/fasta.pir (.../branches/runcore_purge) (revision 45883) @@ -1,4 +1,4 @@ -#!./parrot -R cgp +#!./parrot # Copyright (C) 2005-2009, Parrot Foundation. # $Id$ # Index: examples/shootout/partialsums.pir =================================================================== --- examples/shootout/partialsums.pir (.../trunk) (revision 45837) +++ examples/shootout/partialsums.pir (.../branches/runcore_purge) (revision 45883) @@ -1,4 +1,4 @@ -#!./parrot -R cgp +#!./parrot # Copyright (C) 2006-2009, Parrot Foundation. # $Id$ # Index: examples/shootout/takfp.pir =================================================================== --- examples/shootout/takfp.pir (.../trunk) (revision 45837) +++ examples/shootout/takfp.pir (.../branches/runcore_purge) (revision 45883) @@ -1,8 +1,8 @@ -#!./parrot -R cgp +#!./parrot # Copyright (C) 2005-2009, Parrot Foundation. # $Id$ # -# ./parrot -R cgp takfp.pir N (N = 10 for shootout) +# ./parrot takfp.pir N (N = 10 for shootout) # by Joshua Isom # changed default value to N=7 (shootout default before being deprecated) # anyway N=10 froze my laptop. Karl Forner Index: examples/shootout/recursive-2.pir =================================================================== --- examples/shootout/recursive-2.pir (.../trunk) (revision 45837) +++ examples/shootout/recursive-2.pir (.../branches/runcore_purge) (revision 45883) @@ -6,7 +6,7 @@ # Fib and Tak by Joshua Isom # use less registers (leo) -# time ./parrot -Oc -R cgp-jit recursive-2.pir 11 +# time ./parrot -Oc recursive-2.pir 11 # real 2.32 s (AMD X2@2000) # modified default value to n=3. Karl Forner Index: examples/shootout/recursive.pir =================================================================== --- examples/shootout/recursive.pir (.../trunk) (revision 45837) +++ examples/shootout/recursive.pir (.../branches/runcore_purge) (revision 45883) @@ -5,7 +5,7 @@ # Ack by Leopold Toetsch # Fib and Tak by Joshua Isom # modified default value to n=3. Karl Forner -# ./parrot -Oc -R cgp-jit recursive.pir N +# ./parrot -Oc recursive.pir N .sub main :main .param pmc argv Index: examples/shootout/pidigits.pir =================================================================== --- examples/shootout/pidigits.pir (.../trunk) (revision 45837) +++ examples/shootout/pidigits.pir (.../branches/runcore_purge) (revision 45883) @@ -1,4 +1,4 @@ -#!./parrot -R cgp +#!./parrot # Copyright (C) 2005-2009, Parrot Foundation. # $Id$ # Index: examples/shootout/ack.pir =================================================================== --- examples/shootout/ack.pir (.../trunk) (revision 45837) +++ examples/shootout/ack.pir (.../branches/runcore_purge) (revision 45883) @@ -3,7 +3,7 @@ # $Id$ # OUTPUT="Ack(3, 9) = 4093\n" # -# ./parrot -Oc -R cgp-jit +# ./parrot -Oc # RQ (Karl) # Seems to be an old benchmark, now deprecated by the shootout # Index: examples/shootout/random.pir =================================================================== --- examples/shootout/random.pir (.../trunk) (revision 45837) +++ examples/shootout/random.pir (.../branches/runcore_purge) (revision 45883) @@ -1,4 +1,4 @@ -#!./parrot -R cgp +#!./parrot # Copyright (C) 2005-2009, Parrot Foundation. # $Id$ # Index: examples/config/file/configcompiler =================================================================== --- examples/config/file/configcompiler (.../trunk) (revision 45837) +++ examples/config/file/configcompiler (.../branches/runcore_purge) (revision 45883) @@ -50,7 +50,6 @@ auto::jit auto::cpu auto::funcptr -auto::cgoto auto::inline auto::gc auto::memalign Index: examples/config/file/configwithfatalstep =================================================================== --- examples/config/file/configwithfatalstep (.../trunk) (revision 45837) +++ examples/config/file/configwithfatalstep (.../branches/runcore_purge) (revision 45883) @@ -42,7 +42,6 @@ auto::jit auto::cpu auto::funcptr -auto::cgoto auto::inline auto::gc auto::memalign Index: examples/embed/cotorra.c =================================================================== --- examples/embed/cotorra.c (.../trunk) (revision 45837) +++ examples/embed/cotorra.c (.../branches/runcore_purge) (revision 45883) @@ -108,10 +108,7 @@ { static const struct runcoreinfo cores [] = { { PARROT_SLOW_CORE, "slow" }, - { PARROT_FAST_CORE, "fast" }, - { PARROT_CGOTO_CORE, "cgoto" }, { PARROT_GC_DEBUG_CORE, "gcdebug" }, - { PARROT_SWITCH_CORE, "switch" } }; static const unsigned int n = sizeof (cores)/sizeof (struct runcoreinfo); unsigned int i; Index: examples/benchmarks/oo1.pir =================================================================== --- examples/benchmarks/oo1.pir (.../trunk) (revision 45837) +++ examples/benchmarks/oo1.pir (.../branches/runcore_purge) (revision 45883) @@ -11,8 +11,6 @@ # python oo1.py 1.2 (first time) # python oo1.py 0.51 -# parrot -R cgp oo1.pasm -g -O3 - # original list fixed 4.9 (leaks mem ~ 110 M used) # don't clone vtable 4.4 # Dan's vtable cache 4.3 3.8 @@ -31,9 +29,6 @@ # Dan's new object layout 1.00 -# parrot -R cgp oo1-prop.pasm -# invokecc 0.75 -# RetCont out of loop 0.57 # parrot -R jit oo1-prop.pasm 0.54 .namespace [ "Foo" ] Index: examples/benchmarks/oo2.pir =================================================================== --- examples/benchmarks/oo2.pir (.../trunk) (revision 45837) +++ examples/benchmarks/oo2.pir (.../branches/runcore_purge) (revision 45883) @@ -11,17 +11,11 @@ # python oo2.py 2.9 (first time) # python oo2.py 2.4 -# parrot -R cgp oo2.pasm -g -O3 -# with reuse regsave mem 6.15 -# anchor P1 6.7 -# Dan's new object layout 5.1 - # parrot -R jit oo2.pasm -g -O3 # with reuse regsave mem 6.1 # anchor P1 6.5 # Dan's new object layout 4.9 -# parrot -R cgp oo2-prop.pasm 2.8 # parrot -R jit oo2-prop.pasm 2.6 .namespace [ "Foo" ]