[svn:parrot] r45949 - in trunk: . compilers/data_json compilers/imcc compilers/json compilers/nqp compilers/pct compilers/pge compilers/tge config/auto config/auto/cgoto config/auto/sizes config/auto/zlib config/gen/config_h config/gen/makefiles config/init docs docs/book/draft docs/book/pct docs/dev docs/pdds examples/benchmarks examples/c examples/config/file examples/embed examples/languages/abc examples/languages/squaak examples/pge examples/sdl examples/shootout ext/nqp-rx ext/nqp-rx/src/stage0 include/parrot lib/Parrot lib/Parrot/Configure/Options lib/Parrot/Configure/Options/Conf lib/Parrot/Configure/Step lib/Parrot/Harness lib/Parrot/OpTrans lib/Parrot/Ops2c ports/cygwin ports/debian ports/fedora/2.3.0 ports/mandriva ports/suse/2.2.0 runtime/parrot/languages runtime/parrot/library runtime/parrot/library/Math src src/call src/dynoplibs src/gc src/interp src/pmc src/runcore t t/compilers/tge t/configure/testlib t/examples t/library t/oo t/op t/pharness t/pmc t/ src t/steps/auto t/steps/init/hints t/tools/install/testlib t/tools/ops2cutils tools/build tools/dev tools/util
cotto at svn.parrot.org
cotto at svn.parrot.org
Sat Apr 24 01:14:27 UTC 2010
Author: cotto
Date: Sat Apr 24 01:14:23 2010
New Revision: 45949
URL: https://trac.parrot.org/parrot/changeset/45949
Log:
[runcore] merge runcore_purge; the cgoto, cgp and switch runcores are history
Deleted:
trunk/config/auto/cgoto/
trunk/config/auto/cgoto.pm
trunk/lib/Parrot/OpTrans/CGP.pm
trunk/lib/Parrot/OpTrans/CGoto.pm
trunk/lib/Parrot/OpTrans/CPrederef.pm
trunk/lib/Parrot/OpTrans/CSwitch.pm
trunk/t/steps/auto/cgoto-01.t
Modified:
trunk/ (props changed)
trunk/Configure.pl
trunk/MANIFEST
trunk/MANIFEST.SKIP
trunk/MANIFEST.generated
trunk/README
trunk/compilers/data_json/Rules.mak (props changed)
trunk/compilers/imcc/Rules.in (props changed)
trunk/compilers/imcc/main.c
trunk/compilers/json/Rules.mak (props changed)
trunk/compilers/nqp/Rules.mak (props changed)
trunk/compilers/pct/Rules.mak (props changed)
trunk/compilers/pge/Rules.mak (props changed)
trunk/compilers/tge/Rules.mak (props changed)
trunk/config/auto/sizes/intval_maxmin_c.in (props changed)
trunk/config/auto/zlib/ (props changed)
trunk/config/gen/config_h/config_h.in
trunk/config/gen/makefiles/dynpmc.in
trunk/config/gen/makefiles/root.in
trunk/config/init/optimize.pm
trunk/docs/book/draft/README (props changed)
trunk/docs/book/draft/appa_glossary.pod (props changed)
trunk/docs/book/draft/appb_patch_submission.pod (props changed)
trunk/docs/book/draft/appc_command_line_options.pod (contents, props changed)
trunk/docs/book/draft/appd_build_options.pod (props changed)
trunk/docs/book/draft/appe_source_code.pod (props changed)
trunk/docs/book/draft/ch01_introduction.pod (props changed)
trunk/docs/book/draft/ch02_getting_started.pod (props changed)
trunk/docs/book/draft/ch07_dynpmcs.pod (props changed)
trunk/docs/book/draft/ch08_dynops.pod (props changed)
trunk/docs/book/draft/ch10_opcode_reference.pod (props changed)
trunk/docs/book/draft/ch11_directive_reference.pod (props changed)
trunk/docs/book/draft/ch12_operator_reference.pod (props changed)
trunk/docs/book/draft/chXX_hlls.pod (props changed)
trunk/docs/book/draft/chXX_library.pod (props changed)
trunk/docs/book/draft/chXX_testing_and_debugging.pod (props changed)
trunk/docs/book/pct/ch01_introduction.pod (props changed)
trunk/docs/book/pct/ch02_getting_started.pod (props changed)
trunk/docs/book/pct/ch03_compiler_tools.pod (props changed)
trunk/docs/book/pct/ch04_pge.pod (props changed)
trunk/docs/book/pct/ch05_nqp.pod (props changed)
trunk/docs/configuration.pod
trunk/docs/dev/c_functions.pod (props changed)
trunk/docs/pdds/pdd30_install.pod (props changed)
trunk/docs/porting_intro.pod
trunk/docs/running.pod
trunk/examples/benchmarks/oo1.pir
trunk/examples/benchmarks/oo2.pir
trunk/examples/c/test_main.c
trunk/examples/config/file/configcompiler
trunk/examples/config/file/configwithfatalstep
trunk/examples/embed/cotorra.c (contents, props changed)
trunk/examples/languages/abc/ (props changed)
trunk/examples/languages/squaak/ (props changed)
trunk/examples/pge/demo.pir (props changed)
trunk/examples/sdl/mandel.pir
trunk/examples/shootout/ack.pir
trunk/examples/shootout/binarytrees.pir
trunk/examples/shootout/fasta.pir
trunk/examples/shootout/partialsums.pir
trunk/examples/shootout/pidigits.pir
trunk/examples/shootout/random.pir
trunk/examples/shootout/recursive-2.pir
trunk/examples/shootout/recursive.pir
trunk/examples/shootout/takfp.pir
trunk/ext/nqp-rx/Rules.mak (props changed)
trunk/ext/nqp-rx/src/stage0/Regex-s0.pir
trunk/include/parrot/call.h (props changed)
trunk/include/parrot/context.h
trunk/include/parrot/exceptions.h
trunk/include/parrot/gc_api.h (props changed)
trunk/include/parrot/interpreter.h
trunk/include/parrot/op.h
trunk/include/parrot/oplib.h
trunk/include/parrot/packfile.h
trunk/include/parrot/runcore_api.h (contents, props changed)
trunk/include/parrot/runcore_profiling.h (props changed)
trunk/include/parrot/runcore_trace.h (props changed)
trunk/lib/Parrot/Configure/Options/Conf.pm
trunk/lib/Parrot/Configure/Options/Conf/Shared.pm
trunk/lib/Parrot/Configure/Step/List.pm
trunk/lib/Parrot/Configure/Step/Test.pm (props changed)
trunk/lib/Parrot/H2inc.pm (props changed)
trunk/lib/Parrot/Harness/Options.pm
trunk/lib/Parrot/OpTrans.pm
trunk/lib/Parrot/OpTrans/C.pm
trunk/lib/Parrot/Ops2c/Auxiliary.pm
trunk/lib/Parrot/Ops2c/Utils.pm
trunk/ports/cygwin/README
trunk/ports/cygwin/parrot-1.0.0-1.cygport (props changed)
trunk/ports/debian/libparrot-dev.install.in (props changed)
trunk/ports/debian/libparrot.install.in (props changed)
trunk/ports/debian/parrot-doc.install.in (props changed)
trunk/ports/debian/parrot.install.in (props changed)
trunk/ports/fedora/2.3.0/ (props changed)
trunk/ports/mandriva/parrot.spec.mandriva (props changed)
trunk/ports/suse/2.2.0/ (props changed)
trunk/runtime/parrot/languages/ (props changed)
trunk/runtime/parrot/library/Math/Rand.pir (props changed)
trunk/runtime/parrot/library/Rules.mak (props changed)
trunk/runtime/parrot/library/distutils.pir
trunk/src/call/context.c
trunk/src/call/context_accessors.c
trunk/src/call/ops.c (props changed)
trunk/src/call/pcc.c (contents, props changed)
trunk/src/dynoplibs/Defines.in
trunk/src/dynoplibs/Rules.in
trunk/src/embed.c
trunk/src/gc/alloc_memory.c (props changed)
trunk/src/gc/alloc_resources.c (props changed)
trunk/src/gc/api.c (props changed)
trunk/src/gc/malloc.c (props changed)
trunk/src/gc/malloc_trace.c (props changed)
trunk/src/gc/mark_sweep.c (props changed)
trunk/src/gc/system.c (props changed)
trunk/src/interp/inter_cb.c (props changed)
trunk/src/interp/inter_create.c (props changed)
trunk/src/interp/inter_misc.c (contents, props changed)
trunk/src/main.c
trunk/src/packfile.c
trunk/src/pmc/callcontext.pmc
trunk/src/runcore/cores.c (contents, props changed)
trunk/src/runcore/main.c (contents, props changed)
trunk/src/runcore/profiling.c (props changed)
trunk/src/runcore/trace.c (props changed)
trunk/t/compilers/tge/NoneGrammar.tg (props changed)
trunk/t/configure/testlib/adefectivefoobar
trunk/t/configure/testlib/bdefectivefoobar
trunk/t/configure/testlib/cdefectivefoobar
trunk/t/configure/testlib/ddefectivefoobar
trunk/t/configure/testlib/verbosefoobar
trunk/t/examples/shootout.t
trunk/t/harness
trunk/t/library/md5.t (props changed)
trunk/t/oo/root_new.t (props changed)
trunk/t/op/annotate-old.t
trunk/t/op/debuginfo.t
trunk/t/op/interp.t
trunk/t/pharness/02-get_test_prog_args.t
trunk/t/pmc/namespace-old.t (props changed)
trunk/t/src/embed.t (props changed)
trunk/t/steps/init/hints/linux-01.t (props changed)
trunk/t/tools/install/testlib/README
trunk/t/tools/ops2cutils/01-new.t
trunk/t/tools/ops2cutils/03-print_c_header_file.t
trunk/t/tools/ops2cutils/04-print_c_source_top.t
trunk/t/tools/ops2cutils/05-print_c_source_bottom.t
trunk/t/tools/ops2cutils/06-dynamic.t
trunk/t/tools/ops2cutils/07-make_incdir.t
trunk/t/tools/ops2cutils/08-nolines.t
trunk/t/tools/ops2cutils/09-dynamic_nolines.t
trunk/t/tools/ops2cutils/10-print_c_source_file.t
trunk/tools/build/h2inc.pl (props changed)
trunk/tools/build/ops2c.pl
trunk/tools/dev/fetch_languages.pl (props changed)
trunk/tools/dev/mk_gitignore.pl (props changed)
trunk/tools/dev/parrot-fuzzer
trunk/tools/util/perlcritic-cage.conf (props changed)
Modified: trunk/Configure.pl
==============================================================================
--- trunk/Configure.pl Sat Apr 24 00:51:33 2010 (r45948)
+++ trunk/Configure.pl Sat Apr 24 01:14:23 2010 (r45949)
@@ -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
Modified: trunk/MANIFEST
==============================================================================
--- trunk/MANIFEST Sat Apr 24 00:51:33 2010 (r45948)
+++ trunk/MANIFEST Sat Apr 24 01:14:23 2010 (r45949)
@@ -1,7 +1,7 @@
# ex: set ro:
# $Id$
#
-# generated by tools/dev/mk_manifest_and_skip.pl Thu Apr 22 20:12:33 2010 UT
+# generated by tools/dev/mk_manifest_and_skip.pl Sat Apr 24 00:39:15 2010 UT
#
# See below for documentation on the format of this file.
#
@@ -224,8 +224,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 []
@@ -1109,10 +1107,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
@@ -1978,7 +1972,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]
Modified: trunk/MANIFEST.SKIP
==============================================================================
--- trunk/MANIFEST.SKIP Sat Apr 24 00:51:33 2010 (r45948)
+++ trunk/MANIFEST.SKIP Sat Apr 24 01:14:23 2010 (r45949)
@@ -1,6 +1,6 @@
# ex: set ro:
# $Id$
-# generated by tools/dev/mk_manifest_and_skip.pl Wed Apr 21 10:28:38 2010 UT
+# generated by tools/dev/mk_manifest_and_skip.pl Sat Apr 24 00:59:52 2010 UT
#
# This file should contain a transcript of the svn:ignore properties
# of the directories in the Parrot subversion repository. (Needed for
@@ -1074,6 +1074,11 @@
^t/tools/pmc2c\..*\.h/
^t/tools/pmc2c\..*\.pmc$
^t/tools/pmc2c\..*\.pmc/
+# generated from svn:ignore of 'tools/build/'
+^tools/build/dynoplibs\.pl$
+^tools/build/dynoplibs\.pl/
+^tools/build/dynpmc\.pl$
+^tools/build/dynpmc\.pl/
# Local variables:
# mode: text
# buffer-read-only: t
Modified: trunk/MANIFEST.generated
==============================================================================
--- trunk/MANIFEST.generated Sat Apr 24 00:51:33 2010 (r45948)
+++ trunk/MANIFEST.generated Sat Apr 24 01:14:23 2010 (r45949)
@@ -37,10 +37,7 @@
include/parrot/extend_vtable.h [main]include
include/parrot/feature.h [main]include
include/parrot/has_header.h [main]include
-include/parrot/oplib/core_ops_cg.h [main]include
-include/parrot/oplib/core_ops_cgp.h [main]include
include/parrot/oplib/core_ops.h [main]include
-include/parrot/oplib/core_ops_switch.h [main]include
include/parrot/oplib/ops.h [main]include
include/parrot/pbcversion.h [devel]include
include/parrot/platform.h [main]include
@@ -225,8 +222,6 @@
src/jit_emit.h []
src/nci.c []
src/null_config.c []
-src/ops/core_ops_cgp.c []
-src/ops/core_ops_switch.c []
src/parrot_config.c []
src/pmc/boolean.dump [devel]src
src/pmc/continuation.dump [devel]src
Modified: trunk/README
==============================================================================
--- trunk/README Sat Apr 24 00:51:33 2010 (r45948)
+++ trunk/README Sat Apr 24 01:14:23 2010 (r45949)
@@ -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
-------
Modified: trunk/compilers/imcc/main.c
==============================================================================
--- trunk/compilers/imcc/main.c Sat Apr 24 00:51:33 2010 (r45948)
+++ trunk/compilers/imcc/main.c Sat Apr 24 01:14:23 2010 (r45949)
@@ -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;
}
Deleted: trunk/config/auto/cgoto.pm
==============================================================================
--- trunk/config/auto/cgoto.pm Sat Apr 24 01:14:23 2010 (r45948)
+++ /dev/null 00:00:00 1970 (deleted)
@@ -1,82 +0,0 @@
-# Copyright (C) 2001-2005, Parrot Foundation.
-# $Id$
-
-=head1 NAME
-
-config/auto/cgoto.pm - Computed C<goto>
-
-=head1 DESCRIPTION
-
-Determines whether the compiler supports computed C<goto>.
-
-=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:
Modified: trunk/config/gen/config_h/config_h.in
==============================================================================
--- trunk/config/gen/config_h/config_h.in Sat Apr 24 00:51:33 2010 (r45948)
+++ trunk/config/gen/config_h/config_h.in Sat Apr 24 01:14:23 2010 (r45949)
@@ -152,10 +152,6 @@
/* Oplib and dynamic ops related. */
#define PARROT_CORE_OPLIB_NAME "core"
#define PARROT_CORE_OPLIB_INIT Parrot_DynOp_core_ at MAJOR@_ at MINOR@_ at PATCH@
-#define PARROT_CORE_PREDEREF_OPLIB_INIT Parrot_DynOp_core_prederef_ at MAJOR@_ at MINOR@_ at PATCH@
-#define PARROT_CORE_SWITCH_OPLIB_INIT Parrot_DynOp_core_switch_ at MAJOR@_ at MINOR@_ at PATCH@
-#define PARROT_CORE_CG_OPLIB_INIT Parrot_DynOp_core_cg_ at MAJOR@_ at MINOR@_ at PATCH@
-#define PARROT_CORE_CGP_OPLIB_INIT Parrot_DynOp_core_cgp_ at MAJOR@_ at MINOR@_ at PATCH@
/* ICU. */
#define PARROT_HAS_ICU @has_icu@
Modified: trunk/config/gen/makefiles/dynpmc.in
==============================================================================
--- trunk/config/gen/makefiles/dynpmc.in Sat Apr 24 00:51:33 2010 (r45948)
+++ trunk/config/gen/makefiles/dynpmc.in Sat Apr 24 01:14:23 2010 (r45949)
@@ -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
Modified: trunk/config/gen/makefiles/root.in
==============================================================================
--- trunk/config/gen/makefiles/root.in Sat Apr 24 00:51:33 2010 (r45948)
+++ trunk/config/gen/makefiles/root.in Sat Apr 24 01:14:23 2010 (r45949)
@@ -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 :
- at 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
- at make@ testb
-cover-testC: cover.dummy
- - at make@ testC
-
cover-testf: cover.dummy
- at make@ testf
@@ -2378,9 +2309,6 @@
cover-testr: cover.dummy
- at make@ testr
-cover-testS: cover.dummy
- - at make@ testS
-
cover-src: cover.dummy
- at make@ src_tests
Modified: trunk/config/init/optimize.pm
==============================================================================
--- trunk/config/init/optimize.pm Sat Apr 24 00:51:33 2010 (r45948)
+++ trunk/config/init/optimize.pm Sat Apr 24 01:14:23 2010 (r45949)
@@ -74,17 +74,6 @@
$conf->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','');
Modified: trunk/docs/book/draft/appc_command_line_options.pod
==============================================================================
--- trunk/docs/book/draft/appc_command_line_options.pod Sat Apr 24 00:51:33 2010 (r45948)
+++ trunk/docs/book/draft/appc_command_line_options.pod Sat Apr 24 01:14:23 2010 (r45949)
@@ -260,18 +260,6 @@
Run with the I<fast core>.
-=item -R cgoto
-
-Run the I<computed goto core> (CGoto).
-
-=item -R cgp
-
-Run with the I<CGoto-Prederefed> core.
-
-=item -R switch
-
-Run with the I<Switched core>.
-
=item -R gcdebug
Performs a full GC run before every op dispatch
Modified: trunk/docs/configuration.pod
==============================================================================
--- trunk/docs/configuration.pod Sat Apr 24 00:51:33 2010 (r45948)
+++ trunk/docs/configuration.pod Sat Apr 24 01:14:23 2010 (r45949)
@@ -123,10 +123,6 @@
=over 4
-=item F<config/auto/cgoto.pm>
-
- Does your compiler support computed goto...
-
=item F<gen/config_h.pm>
Generate C headers...
@@ -136,7 +132,7 @@
Note that on non-interactive steps, the text I<done> 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<result>
Modified: trunk/docs/porting_intro.pod
==============================================================================
--- trunk/docs/porting_intro.pod Sat Apr 24 00:51:33 2010 (r45948)
+++ trunk/docs/porting_intro.pod Sat Apr 24 01:14:23 2010 (r45949)
@@ -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<config/auto/cgoto/test_c.in>
-
-=item * I<make testC>
-
-=back
-
=head1 Threads
=head2 What it is
Modified: trunk/docs/running.pod
==============================================================================
--- trunk/docs/running.pod Sat Apr 24 00:51:33 2010 (r45948)
+++ trunk/docs/running.pod Sat Apr 24 01:14:23 2010 (r45949)
@@ -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<docs/dev/profilling.pod>
@@ -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<docs/glossary.pod> for a
-fuller explanation.
-
=head1 Operation table
Command Line Action Output
Modified: trunk/examples/benchmarks/oo1.pir
==============================================================================
--- trunk/examples/benchmarks/oo1.pir Sat Apr 24 00:51:33 2010 (r45948)
+++ trunk/examples/benchmarks/oo1.pir Sat Apr 24 01:14:23 2010 (r45949)
@@ -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" ]
Modified: trunk/examples/benchmarks/oo2.pir
==============================================================================
--- trunk/examples/benchmarks/oo2.pir Sat Apr 24 00:51:33 2010 (r45948)
+++ trunk/examples/benchmarks/oo2.pir Sat Apr 24 01:14:23 2010 (r45949)
@@ -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" ]
Modified: trunk/examples/c/test_main.c
==============================================================================
--- trunk/examples/c/test_main.c Sat Apr 24 00:51:33 2010 (r45948)
+++ trunk/examples/c/test_main.c Sat Apr 24 01:14:23 2010 (r45949)
@@ -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);
}
Modified: trunk/examples/config/file/configcompiler
==============================================================================
--- trunk/examples/config/file/configcompiler Sat Apr 24 00:51:33 2010 (r45948)
+++ trunk/examples/config/file/configcompiler Sat Apr 24 01:14:23 2010 (r45949)
@@ -50,7 +50,6 @@
auto::jit
auto::cpu
auto::funcptr
-auto::cgoto
auto::inline
auto::gc
auto::memalign
Modified: trunk/examples/config/file/configwithfatalstep
==============================================================================
--- trunk/examples/config/file/configwithfatalstep Sat Apr 24 00:51:33 2010 (r45948)
+++ trunk/examples/config/file/configwithfatalstep Sat Apr 24 01:14:23 2010 (r45949)
@@ -42,7 +42,6 @@
auto::jit
auto::cpu
auto::funcptr
-auto::cgoto
auto::inline
auto::gc
auto::memalign
Modified: trunk/examples/embed/cotorra.c
==============================================================================
--- trunk/examples/embed/cotorra.c Sat Apr 24 00:51:33 2010 (r45948)
+++ trunk/examples/embed/cotorra.c Sat Apr 24 01:14:23 2010 (r45949)
@@ -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;
Modified: trunk/examples/sdl/mandel.pir
==============================================================================
--- trunk/examples/sdl/mandel.pir Sat Apr 24 00:51:33 2010 (r45948)
+++ trunk/examples/sdl/mandel.pir Sat Apr 24 01:14:23 2010 (r45949)
@@ -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
Modified: trunk/examples/shootout/ack.pir
==============================================================================
--- trunk/examples/shootout/ack.pir Sat Apr 24 00:51:33 2010 (r45948)
+++ trunk/examples/shootout/ack.pir Sat Apr 24 01:14:23 2010 (r45949)
@@ -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
#
Modified: trunk/examples/shootout/binarytrees.pir
==============================================================================
--- trunk/examples/shootout/binarytrees.pir Sat Apr 24 00:51:33 2010 (r45948)
+++ trunk/examples/shootout/binarytrees.pir Sat Apr 24 01:14:23 2010 (r45949)
@@ -1,4 +1,4 @@
-#!./parrot -R cgp
+#!./parrot
# Copyright (C) 2005-2009, Parrot Foundation.
# $Id$
#
Modified: trunk/examples/shootout/fasta.pir
==============================================================================
--- trunk/examples/shootout/fasta.pir Sat Apr 24 00:51:33 2010 (r45948)
+++ trunk/examples/shootout/fasta.pir Sat Apr 24 01:14:23 2010 (r45949)
@@ -1,4 +1,4 @@
-#!./parrot -R cgp
+#!./parrot
# Copyright (C) 2005-2009, Parrot Foundation.
# $Id$
#
Modified: trunk/examples/shootout/partialsums.pir
==============================================================================
--- trunk/examples/shootout/partialsums.pir Sat Apr 24 00:51:33 2010 (r45948)
+++ trunk/examples/shootout/partialsums.pir Sat Apr 24 01:14:23 2010 (r45949)
@@ -1,4 +1,4 @@
-#!./parrot -R cgp
+#!./parrot
# Copyright (C) 2006-2009, Parrot Foundation.
# $Id$
#
Modified: trunk/examples/shootout/pidigits.pir
==============================================================================
--- trunk/examples/shootout/pidigits.pir Sat Apr 24 00:51:33 2010 (r45948)
+++ trunk/examples/shootout/pidigits.pir Sat Apr 24 01:14:23 2010 (r45949)
@@ -1,4 +1,4 @@
-#!./parrot -R cgp
+#!./parrot
# Copyright (C) 2005-2009, Parrot Foundation.
# $Id$
#
Modified: trunk/examples/shootout/random.pir
==============================================================================
--- trunk/examples/shootout/random.pir Sat Apr 24 00:51:33 2010 (r45948)
+++ trunk/examples/shootout/random.pir Sat Apr 24 01:14:23 2010 (r45949)
@@ -1,4 +1,4 @@
-#!./parrot -R cgp
+#!./parrot
# Copyright (C) 2005-2009, Parrot Foundation.
# $Id$
#
Modified: trunk/examples/shootout/recursive-2.pir
==============================================================================
--- trunk/examples/shootout/recursive-2.pir Sat Apr 24 00:51:33 2010 (r45948)
+++ trunk/examples/shootout/recursive-2.pir Sat Apr 24 01:14:23 2010 (r45949)
@@ -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 at 2000)
# modified default value to n=3. Karl Forner
Modified: trunk/examples/shootout/recursive.pir
==============================================================================
--- trunk/examples/shootout/recursive.pir Sat Apr 24 00:51:33 2010 (r45948)
+++ trunk/examples/shootout/recursive.pir Sat Apr 24 01:14:23 2010 (r45949)
@@ -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
Modified: trunk/examples/shootout/takfp.pir
==============================================================================
--- trunk/examples/shootout/takfp.pir Sat Apr 24 00:51:33 2010 (r45948)
+++ trunk/examples/shootout/takfp.pir Sat Apr 24 01:14:23 2010 (r45949)
@@ -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
Modified: trunk/ext/nqp-rx/src/stage0/Regex-s0.pir
==============================================================================
--- trunk/ext/nqp-rx/src/stage0/Regex-s0.pir Sat Apr 24 00:51:33 2010 (r45948)
+++ trunk/ext/nqp-rx/src/stage0/Regex-s0.pir Sat Apr 24 01:14:23 2010 (r45949)
@@ -1893,7 +1893,7 @@
# vim: expandtab shiftwidth=4 ft=pir:
### .include 'src/PAST/Regex.pir'
-# $Id: Regex.pir 41578 2009-09-30 14:45:23Z pmichaud $
+# $Id$
=head1 NAME
Modified: trunk/include/parrot/context.h
==============================================================================
--- trunk/include/parrot/context.h Sat Apr 24 00:51:33 2010 (r45948)
+++ trunk/include/parrot/context.h Sat Apr 24 01:14:23 2010 (r45949)
@@ -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))
Modified: trunk/include/parrot/exceptions.h
==============================================================================
--- trunk/include/parrot/exceptions.h Sat Apr 24 00:51:33 2010 (r45948)
+++ trunk/include/parrot/exceptions.h Sat Apr 24 01:14:23 2010 (r45949)
@@ -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,
Modified: trunk/include/parrot/interpreter.h
==============================================================================
--- trunk/include/parrot/interpreter.h Sat Apr 24 00:51:33 2010 (r45948)
+++ trunk/include/parrot/interpreter.h Sat Apr 24 01:14:23 2010 (r45949)
@@ -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)
Modified: trunk/include/parrot/op.h
==============================================================================
--- trunk/include/parrot/op.h Sat Apr 24 00:51:33 2010 (r45948)
+++ trunk/include/parrot/op.h Sat Apr 24 01:14:23 2010 (r45949)
@@ -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);
/*
Modified: trunk/include/parrot/oplib.h
==============================================================================
--- trunk/include/parrot/oplib.h Sat Apr 24 00:51:33 2010 (r45948)
+++ trunk/include/parrot/oplib.h Sat Apr 24 01:14:23 2010 (r45949)
@@ -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;
Modified: trunk/include/parrot/packfile.h
==============================================================================
--- trunk/include/parrot/packfile.h Sat Apr 24 00:51:33 2010 (r45948)
+++ trunk/include/parrot/packfile.h Sat Apr 24 01:14:23 2010 (r45949)
@@ -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;
Modified: trunk/include/parrot/runcore_api.h
==============================================================================
--- trunk/include/parrot/runcore_api.h Sat Apr 24 00:51:33 2010 (r45948)
+++ trunk/include/parrot/runcore_api.h Sat Apr 24 01:14:23 2010 (r45949)
@@ -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 */
Modified: trunk/lib/Parrot/Configure/Options/Conf.pm
==============================================================================
--- trunk/lib/Parrot/Configure/Options/Conf.pm Sat Apr 24 00:51:33 2010 (r45948)
+++ trunk/lib/Parrot/Configure/Options/Conf.pm Sat Apr 24 01:14:23 2010 (r45949)
@@ -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
Modified: trunk/lib/Parrot/Configure/Options/Conf/Shared.pm
==============================================================================
--- trunk/lib/Parrot/Configure/Options/Conf/Shared.pm Sat Apr 24 00:51:33 2010 (r45948)
+++ trunk/lib/Parrot/Configure/Options/Conf/Shared.pm Sat Apr 24 01:14:23 2010 (r45949)
@@ -15,7 +15,6 @@
cc
ccflags
ccwarn
- cgoto
configure_trace
cxx
darwin_no_fink
Modified: trunk/lib/Parrot/Configure/Step/List.pm
==============================================================================
--- trunk/lib/Parrot/Configure/Step/List.pm Sat Apr 24 00:51:33 2010 (r45948)
+++ trunk/lib/Parrot/Configure/Step/List.pm Sat Apr 24 01:14:23 2010 (r45949)
@@ -41,7 +41,6 @@
auto::isreg
auto::jit
auto::frames
- auto::cgoto
auto::inline
auto::gc
auto::memalign
Modified: trunk/lib/Parrot/Harness/Options.pm
==============================================================================
--- trunk/lib/Parrot/Harness/Options.pm Sat Apr 24 00:51:33 2010 (r45948)
+++ trunk/lib/Parrot/Harness/Options.pm Sat Apr 24 01:14:23 2010 (r45949)
@@ -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
Modified: trunk/lib/Parrot/OpTrans.pm
==============================================================================
--- trunk/lib/Parrot/OpTrans.pm Sat Apr 24 00:51:33 2010 (r45948)
+++ trunk/lib/Parrot/OpTrans.pm Sat Apr 24 01:14:23 2010 (r45949)
@@ -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<core_prefix()>
-
-Implemented in subclasses to return a short prefix indicating the core
-type used to individuate core function names.
-
=item C<run_core_func_decl($base)>
Optionally implemented in subclasses to return the C code for the run
@@ -222,14 +211,6 @@
=item C<Parrot::OpTrans::C>
-=item C<Parrot::OpTrans::CGP>
-
-=item C<Parrot::OpTrans::CGoto>
-
-=item C<Parrot::OpTrans::CPrederef>
-
-=item C<Parrot::OpTrans::CSwitch>
-
=back
=cut
Modified: trunk/lib/Parrot/OpTrans/C.pm
==============================================================================
--- trunk/lib/Parrot/OpTrans/C.pm Sat Apr 24 00:51:33 2010 (r45948)
+++ trunk/lib/Parrot/OpTrans/C.pm Sat Apr 24 01:14:23 2010 (r45949)
@@ -33,16 +33,6 @@
return 'PARROT_FUNCTION_CORE';
}
-=item C<core_prefix()>
-
-Returns an empty string.
-
-=cut
-
-sub core_prefix {
- return "";
-}
-
=item C<defines()>
Returns the C C<#define> macros for register access etc.
@@ -173,14 +163,6 @@
=item C<Parrot::OpTrans>
-=item C<Parrot::OpTrans::CGP>
-
-=item C<Parrot::OpTrans::CGoto>
-
-=item C<Parrot::OpTrans::CPrederef>
-
-=item C<Parrot::OpTrans::CSwitch>
-
=back
=cut
Deleted: trunk/lib/Parrot/OpTrans/CGP.pm
==============================================================================
--- trunk/lib/Parrot/OpTrans/CGP.pm Sat Apr 24 01:14:23 2010 (r45948)
+++ /dev/null 00:00:00 1970 (deleted)
@@ -1,162 +0,0 @@
-# Copyright (C) 2002, Parrot Foundation.
-# $Id$
-
-=head1 NAME
-
-Parrot::OpTrans::CGP - C Goto Predereferenced Transform
-
-=head1 DESCRIPTION
-
-C<Parrot::OpTrans::CGP> inherits from C<Parrot::OpTrans::CPrederef> and
-C<Parrot::OpTrans::CGoto> to provide predereferenced register addressing
-and C C<goto> 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<core_type()>
-
-Returns C<PARROT_CGP_CORE>.
-
-=cut
-
-sub core_type {
- return 'PARROT_CGP_CORE';
-}
-
-=item C<suffix()>
-
-The suffix is C<'_cgp'>.
-
-=cut
-
-sub suffix {
- return "_cgp";
-}
-
-=item C<core_prefix()>
-
-The core prefix is C<'cgp_'>.
-
-=cut
-
-sub core_prefix {
- return "cgp_";
-}
-
-=item C<defines()>
-
-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 . <<END;
-/* defines - $0 -> $type */
-# define opcode_to_prederef(i, op) \\
- (opcode_t *) (op - Parrot_pcc_get_pred_offset(interp, i->ctx))
-END
-}
-
-=item C<goto_address($address)>
-
-Transforms the C<goto ADDRESS($address)> 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<goto_offset($offset)>
-
-Transforms the C<goto OFFSET($offset)> 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 <<END_C;
-/* run_core_func_start - $0 -> $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<Parrot::OpTrans>
-
-=item C<Parrot::OpTrans::C>
-
-=item C<Parrot::OpTrans::CGoto>
-
-=item C<Parrot::OpTrans::CPrederef>
-
-=item C<Parrot::OpTrans::CSwitch>
-
-=back
-
-=cut
-
-1;
-
-# Local Variables:
-# mode: cperl
-# cperl-indent-level: 4
-# fill-column: 100
-# End:
-# vim: expandtab shiftwidth=4:
Deleted: trunk/lib/Parrot/OpTrans/CGoto.pm
==============================================================================
--- trunk/lib/Parrot/OpTrans/CGoto.pm Sat Apr 24 01:14:23 2010 (r45948)
+++ /dev/null 00:00:00 1970 (deleted)
@@ -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<Parrot::OpTrans::CGoto> inherits from C<Parrot::OpTrans> to provide a
-C C<goto> run loop.
-
-=head2 Instance Methods
-
-=over 4
-
-=cut
-
-package Parrot::OpTrans::CGoto;
-
-use strict;
-use warnings;
-
-use base qw( Parrot::OpTrans );
-
-=item C<suffix()>
-
-The suffix is C<'_cg'>.
-
-=cut
-
-sub suffix {
- return "_cg";
-}
-
-=item C<core_prefix()>
-
-The core prefix is C<'cg_'>.
-
-=cut
-
-sub core_prefix {
- return "cg_";
-}
-
-=item C<core_type()>
-
-The core type is C<PARROT_CGOTO_CORE>.
-
-=cut
-
-sub core_type {
- return 'PARROT_CGOTO_CORE';
-}
-
-=item C<defines()>
-
-Returns the C C<#define> macros required by the ops.
-
-=cut
-
-sub defines {
- my $type = __PACKAGE__;
- return <<END;
-/* defines - $0 -> $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<pc($pc)>
-
-=item C<pc()>
-
-Sets/gets the current position in Parrot code.
-
-=cut
-
-sub pc {
- my $self = shift;
-
- if (@_) {
- $self->{PC} = shift;
- }
- else {
- return $self->{PC};
- }
-}
-
-=item C<args(@args)>
-
-=item C<args()>
-
-Sets/gets the transform's arguments.
-
-=cut
-
-sub args {
- my $self = shift;
-
- if (@_) {
- $self->{ARGS} = [@_];
- }
- else {
- return $self->{ARGS};
- }
-}
-
-=item C<arg($index)>
-
-Returns the argument at C<$index>.
-
-=cut
-
-sub arg {
- my $self = shift;
-
- return $self->{ARGS}[shift];
-}
-
-=item C<goto_address($address)>
-
-Transforms the C<goto ADDRESS($address)> 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<expr_offset($offset)>
-
-Transforms the C<OFFSET($offset)> macro in an ops file into the
-relevant C code.
-
-=cut
-
-sub expr_offset {
- my ( $self, $offset ) = @_;
-
- return "cur_opcode + $offset";
-}
-
-=item C<goto_offset($offset)>
-
-Transforms the C<goto OFFSET($offset)> 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<access_arg($type, $num, $op)>
-
-Returns the C code for the specified op argument type (see
-C<Parrot::OpTrans>) and value. C<$op> is an instance of C<Parrot::Op>.
-
-=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<restart_address($address)>
-
-Returns the C code for C<restart ADDRESS($address)>.
-
-=cut
-
-sub restart_address {
- my ( $self, $addr ) = @_;
-
- return "interp->resume_offset = $addr; interp->resume_flag = 1";
-}
-
-=item C<restart_offset($offset)>
-
-Returns the C code for C<restart OFFSET($offset)>.
-
-=cut
-
-sub restart_offset {
- my ( $self, $offset ) = @_;
-
- return "interp->resume_offset = REL_PC + $offset; interp->resume_flag = 1";
-}
-
-=item C<run_core_func_decl($core)>
-
-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<ops_addr_decl($base_suffix)>
-
-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<run_core_func_start()>
-
-Returns the C code prior to the run core function.
-
-=cut
-
-sub run_core_func_start {
- return <<END_C;
-#if defined(__GNUC__) && defined(I386) /* && defined(NO_DYNOPS) */
- register opcode_t *cur_opcode __asm__ ("esi") = cur_op;
-#else
- opcode_t *cur_opcode = cur_op;
-#endif
-
- static void *const l_ops_addr[] = {
-END_C
-}
-
-=item C<run_core_after_addr_table($base_suffix)>
-
-Returns the run core C code for section after the address table.
-
-=cut
-
-sub run_core_after_addr_table {
- my ( $self, $bs ) = @_;
- return <<END_C;
-
- if (!${bs}ops_addr)
- ${bs}ops_addr = l_ops_addr;
- if (cur_opcode == 0) {
- DECL_CONST_CAST;
- return (opcode_t *) PARROT_const_cast(void **, ${bs}ops_addr);
- }
-END_C
-}
-
-=item C<run_core_finish($base)>
-
-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<init_func_init1($base)>
-
-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 <<END_C;
- if (!${bs}op_lib.op_func_table)
- ${bs}op_lib.op_func_table = (op_func_t *) $cg_func(0, 0);
-END_C
-}
-
-=item C<init_set_dispatch($base_suffix)>
-
-Returns the C code to initialize the dispatch mechanism within the core's
-initialization function.
-
-=cut
-
-sub init_set_dispatch {
- my ( $self, $bs ) = @_;
-
- return <<END_C;
- ${bs}ops_addr = (void**) init;
-END_C
-}
-
-=back
-
-=head1 SEE ALSO
-
-=over 4
-
-=item C<Parrot::OpTrans>
-
-=item C<Parrot::OpTrans::C>
-
-=item C<Parrot::OpTrans::CGP>
-
-=item C<Parrot::OpTrans::CPrederef>
-
-=item C<Parrot::OpTrans::CSwitch>
-
-=back
-
-=cut
-
-1;
-
-# Local Variables:
-# mode: cperl
-# cperl-indent-level: 4
-# fill-column: 100
-# End:
-# vim: expandtab shiftwidth=4:
Deleted: trunk/lib/Parrot/OpTrans/CPrederef.pm
==============================================================================
--- trunk/lib/Parrot/OpTrans/CPrederef.pm Sat Apr 24 01:14:23 2010 (r45948)
+++ /dev/null 00:00:00 1970 (deleted)
@@ -1,144 +0,0 @@
-#! perl
-# Copyright (C) 2001-2007, Parrot Foundation.
-# $Id$
-
-=head1 NAME
-
-Parrot::OpTrans::CPrederef - C Predereferenced Transform
-
-=head1 DESCRIPTION
-
-C<Parrot::OpTrans::CPrederef> inherits from C<Parrot::OpTrans::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<defines()>
-
-Returns the C C<#define> macros required by the ops.
-
-=cut
-
-sub defines {
- my $type = __PACKAGE__;
- return <<END;
-/* defines - $0 -> $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 <<END;
-/* run_core_func_decl - $0 -> $type */
-opcode_t * $prefix$core(opcode_t *cur_op, PARROT_INTERP)
-END
-}
-
-=item C<access_arg($type, $num, $op)>
-
-Returns the C code for the specified op argument type (see
-C<Parrot::OpTrans>) and value. C<$op> is an instance of C<Parrot::Op>.
-
-=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<Parrot::OpTrans>
-
-=item C<Parrot::OpTrans::C>
-
-=item C<Parrot::OpTrans::CGP>
-
-=item C<Parrot::OpTrans::CGoto>
-
-=item C<Parrot::OpTrans::CSwitch>
-
-=back
-
-=cut
-
-1;
-
-# Local Variables:
-# mode: cperl
-# cperl-indent-level: 4
-# fill-column: 100
-# End:
-# vim: expandtab shiftwidth=4:
Deleted: trunk/lib/Parrot/OpTrans/CSwitch.pm
==============================================================================
--- trunk/lib/Parrot/OpTrans/CSwitch.pm Sat Apr 24 01:14:23 2010 (r45948)
+++ /dev/null 00:00:00 1970 (deleted)
@@ -1,247 +0,0 @@
-# Copyright (C) 2001-2009, Parrot Foundation.
-# $Id$
-
-=head1 NAME
-
-Parrot::OpTrans::CSwitch - C Switch Transform
-
-=head1 DESCRIPTION
-
-C<Parrot::OpTrans::CSwitch> inherits from C<Parrot::OpTrans::CPrederef>
-to provide a mixture of predereferenced register addressing and a
-C<switch>ed 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<core_type()>
-
-The core type is C<PARROT_SWITCH_CORE>.
-
-=cut
-
-sub core_type {
- return 'PARROT_SWITCH_CORE';
-}
-
-=item C<core_prefix()>
-
-The prefix is C<'switch_'>.
-
-=cut
-
-sub core_prefix {
- return "switch_";
-}
-
-=item C<suffix()>
-
-The suffix is C<'_switch'>.
-
-=cut
-
-sub suffix {
- return "_switch";
-}
-
-=item C<defines()>
-
-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 . <<END;
-/* defines - $0 -> $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<goto_address($address)>
-
-Transforms the C<goto ADDRESS($address)> 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 <<EOC;
- {
- cur_opcode = opcode_to_prederef(interp, $addr);
- goto SWITCH_RELOAD;
- }
-EOC
- }
-}
-
-=item C<goto_offset($offset)>
-
-Transforms the C<goto OFFSET($offset)> 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<init_func_init1($base)>
-
-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 <<END_C;
- if (!${bs}op_lib.op_func_table)
- ${bs}op_lib.op_func_table = (op_func_t *)&${bs}op_lib;
-END_C
-}
-
-
-=item C<run_core_func_start()>
-
-Returns the C code prior to the run core function.
-
-=cut
-
-sub run_core_func_start {
- my $type = __PACKAGE__;
- return <<END_C;
-/* run_core_func_start - $0 -> $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<run_core_split($base)>
-
-If defined return code to split e.g. a switch.
-
-=cut
-
-sub run_core_split {
- my ($self) = @_;
- $self->{split_count}++;
-
- return <<END_C;
- default:
- switch (*(opcode_t*)cur_opcode) {
-END_C
-}
-
-=item C<run_core_finish($base)>
-
-Returns the C code following the run core function.
-
-=cut
-
-sub run_core_finish {
- my ( $self, $base ) = @_;
- my $bs = $base . $self->suffix . '_';
- my $c = <<END_C;
- default:
- if (*(opcode_t*)cur_opcode >= 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 .= <<END_C;
- } /* switch $i */
-END_C
- }
- $c .= <<END_C;
- } while (1);
- return NULL;
-}
-END_C
-
- $c .= " /* " . $self->core_prefix . "$base */\n\n";
-
- return $c;
-}
-
-=back
-
-=head1 SEE ALSO
-
-=over 4
-
-=item C<Parrot::OpTrans>
-
-=item C<Parrot::OpTrans::C>
-
-=item C<Parrot::OpTrans::CGP>
-
-=item C<Parrot::OpTrans::CGoto>
-
-=item C<Parrot::OpTrans::CPrederef>
-
-=back
-
-=cut
-
-1;
-
-# Local Variables:
-# mode: cperl
-# cperl-indent-level: 4
-# fill-column: 100
-# End:
-# vim: expandtab shiftwidth=4:
Modified: trunk/lib/Parrot/Ops2c/Auxiliary.pm
==============================================================================
--- trunk/lib/Parrot/Ops2c/Auxiliary.pm Sat Apr 24 00:51:33 2010 (r45948)
+++ trunk/lib/Parrot/Ops2c/Auxiliary.pm Sat Apr 24 01:14:23 2010 (r45949)
@@ -12,7 +12,7 @@
my $usage_msg = <<USAGE;
% 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:
Modified: trunk/lib/Parrot/Ops2c/Utils.pm
==============================================================================
--- trunk/lib/Parrot/Ops2c/Utils.pm Sat Apr 24 00:51:33 2010 (r45948)
+++ trunk/lib/Parrot/Ops2c/Utils.pm Sat Apr 24 01:14:23 2010 (r45949)
@@ -89,10 +89,10 @@
return;
}
my $class_name = shift @argv;
- my %is_allowed = map { $_ => 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 <<END_C;
- NULL
- };
-END_C
- print $fh $self->{trans}->run_core_after_addr_table( $self->{bs} );
- }
- return 1;
-}
-
-sub _print_goto_opcode {
- my ( $self, $fh ) = @_;
-
- if ( $self->{suffix} =~ /cgp/ ) {
- print $fh <<END_C;
-#ifdef __GNUC__
-# ifdef I386
- else if (cur_opcode == (opcode_t *)(void **) 1)
- __asm__ ("jmp *4(%ebp)"); /* jump to ret addr, used by JIT */
-# endif
-#endif
- _reg_base = (char*)Parrot_pcc_get_regs_ni(interp, CURRENT_CONTEXT(interp))->regs_i;
- goto **(void **)cur_opcode;
-
-END_C
- }
- elsif ( $self->{suffix} =~ /cg/ ) {
- print $fh <<END_C;
-goto *$self->{bs}ops_addr[*cur_opcode];
-
-END_C
- }
- return 1;
-}
-
sub _print_op_function_definitions {
my ( $self, $fh ) = @_;
Modified: trunk/ports/cygwin/README
==============================================================================
--- trunk/ports/cygwin/README Sat Apr 24 00:51:33 2010 (r45948)
+++ trunk/ports/cygwin/README Sat Apr 24 01:14:23 2010 (r45949)
@@ -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
Modified: trunk/runtime/parrot/library/distutils.pir
==============================================================================
--- trunk/runtime/parrot/library/distutils.pir Sat Apr 24 00:51:33 2010 (r45948)
+++ trunk/runtime/parrot/library/distutils.pir Sat Apr 24 01:14:23 2010 (r45949)
@@ -1268,9 +1268,6 @@
.sub 'get_cores'
$P0 = new 'Hash'
$P0['C'] = ''
-# $P0['CGP'] = '_cgp'
-# $P0['CGoto'] = '_cg'
- $P0['CSwitch'] = '_switch'
.return ($P0)
.end
@@ -4228,9 +4225,6 @@
flags .= " "
$S0 = $P0['cc_hasjit']
flags .= $S0
- flags .= " "
- $S0 = $P0['cg_flag']
- flags .= $S0
.return (flags)
.end
Modified: trunk/src/call/context.c
==============================================================================
--- trunk/src/call/context.c Sat Apr 24 00:51:33 2010 (r45948)
+++ trunk/src/call/context.c Sat Apr 24 01:14:23 2010 (r45949)
@@ -320,7 +320,6 @@
ctx->current_object = NULL;
ctx->handlers = PMCNULL;
ctx->caller_ctx = NULL;
- ctx->pred_offset = 0;
ctx->current_sig = PMCNULL;
ctx->current_sub = PMCNULL;
@@ -330,7 +329,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 */
@@ -342,7 +340,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;
Modified: trunk/src/call/context_accessors.c
==============================================================================
--- trunk/src/call/context_accessors.c Sat Apr 24 00:51:33 2010 (r45948)
+++ trunk/src/call/context_accessors.c Sat Apr 24 01:14:23 2010 (r45949)
@@ -471,38 +471,6 @@
/*
-=item C<size_t Parrot_pcc_get_pred_offset_func(PARROT_INTERP, PMC *ctx)>
-
-=item C<void Parrot_pcc_set_pred_offset_func(PARROT_INTERP, PMC *ctx, size_t
-pred_offset)>
-
-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<UINTVAL Parrot_pcc_warnings_on_func(PARROT_INTERP, PMC *ctx, UINTVAL
flags)>
Modified: trunk/src/call/pcc.c
==============================================================================
--- trunk/src/call/pcc.c Sat Apr 24 00:51:33 2010 (r45948)
+++ trunk/src/call/pcc.c Sat Apr 24 01:14:23 2010 (r45949)
@@ -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);
}
Modified: trunk/src/dynoplibs/Defines.in
==============================================================================
--- trunk/src/dynoplibs/Defines.in Sat Apr 24 00:51:33 2010 (r45948)
+++ trunk/src/dynoplibs/Defines.in Sat Apr 24 01:14:23 2010 (r45949)
@@ -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 \
Modified: trunk/src/dynoplibs/Rules.in
==============================================================================
--- trunk/src/dynoplibs/Rules.in Sat Apr 24 00:51:33 2010 (r45948)
+++ trunk/src/dynoplibs/Rules.in Sat Apr 24 01:14:23 2010 (r45949)
@@ -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
Modified: trunk/src/embed.c
==============================================================================
--- trunk/src/embed.c Sat Apr 24 00:51:33 2010 (r45948)
+++ trunk/src/embed.c Sat Apr 24 01:14:23 2010 (r45949)
@@ -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;
Modified: trunk/src/interp/inter_misc.c
==============================================================================
--- trunk/src/interp/inter_misc.c Sat Apr 24 00:51:33 2010 (r45948)
+++ trunk/src/interp/inter_misc.c Sat Apr 24 01:14:23 2010 (r45949)
@@ -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;
Modified: trunk/src/main.c
==============================================================================
--- trunk/src/main.c Sat Apr 24 00:51:33 2010 (r45948)
+++ trunk/src/main.c Sat Apr 24 01:14:23 2010 (r45949)
@@ -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"
" <Run core options>\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"
" <VM options>\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"))
Modified: trunk/src/packfile.c
==============================================================================
--- trunk/src/packfile.c Sat Apr 24 00:51:33 2010 (r45948)
+++ trunk/src/packfile.c Sat Apr 24 01:14:23 2010 (r45949)
@@ -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;
@@ -3090,10 +3074,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);
Modified: trunk/src/pmc/callcontext.pmc
==============================================================================
--- trunk/src/pmc/callcontext.pmc Sat Apr 24 00:51:33 2010 (r45948)
+++ trunk/src/pmc/callcontext.pmc Sat Apr 24 01:14:23 2010 (r45949)
@@ -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 */
Modified: trunk/src/runcore/cores.c
==============================================================================
--- trunk/src/runcore/cores.c Sat Apr 24 00:51:33 2010 (r45948)
+++ trunk/src/runcore/cores.c Sat Apr 24 01:14:23 2010 (r45949)
@@ -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<void Parrot_runcore_switch_init(PARROT_INTERP)>
-
-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<void Parrot_runcore_exec_init(PARROT_INTERP)>
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<void Parrot_runcore_cgp_init(PARROT_INTERP)>
-
-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<void Parrot_runcore_cgoto_init(PARROT_INTERP)>
-
-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<static opcode_t * runops_fast_core(PARROT_INTERP, Parrot_runcore_t
*runcore, opcode_t *pc)>
@@ -660,42 +518,6 @@
}
-/*
-
-=item C<static opcode_t * runops_cgoto_core(PARROT_INTERP, Parrot_runcore_t
-*runcore, opcode_t *pc)>
-
-Runs the Parrot operations starting at C<pc> until there are no more
-operations, using the computed C<goto> core, performing no bounds checking,
-profiling, or tracing.
-
-If computed C<goto> 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,120 +757,6 @@
}
-/*
-
-=item C<static opcode_t * runops_switch_core(PARROT_INTERP, Parrot_runcore_t
-*runcore, opcode_t *pc)>
-
-Runs the C<switch> 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<void * init_prederef(PARROT_INTERP, Parrot_runcore_t *runcore)>
-
-Initialize: load prederef C<func_table>, 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<void load_prederef(PARROT_INTERP, Parrot_runcore_t *runcore)>
-
-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);
-}
-
/*
@@ -1099,41 +807,6 @@
/*
-=item C<static opcode_t * runops_cgp_core(PARROT_INTERP, Parrot_runcore_t
-*runcore, opcode_t *pc)>
-
-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
*/
Modified: trunk/src/runcore/main.c
==============================================================================
--- trunk/src/runcore/main.c Sat Apr 24 00:51:33 2010 (r45948)
+++ trunk/src/runcore/main.c Sat Apr 24 01:14:23 2010 (r45949)
@@ -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<static void turn_ev_check(PARROT_INTERP, int on)>
-
-Turn on or off event checking for prederefed cores.
-
-Fills in the C<event_checker> opcode, or restores original ops in all
-branch locations of the opcode stream.
-
-Note that when C<on> 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<static oplib_init_f get_dynamic_op_lib_init(PARROT_INTERP, const PMC
*lib)>
@@ -249,33 +182,6 @@
/*
-=item C<static void stop_prederef(PARROT_INTERP)>
-
-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<void prepare_for_run(PARROT_INTERP)>
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,129 +449,10 @@
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<static void dynop_register_xx(PARROT_INTERP, size_t n_old, size_t n_new,
-oplib_init_f init_func)>
-
-Register C<op_lib> 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
/*
@@ -702,7 +472,7 @@
dynop_register_switch(PARROT_INTERP, size_t n_old, size_t n_new)
{
ASSERT_ARGS(dynop_register_switch)
- op_lib_t * const lib = PARROT_CORE_SWITCH_OPLIB_INIT(interp, 1);
+ op_lib_t * const lib = PARROT_CORE_OPLIB_INIT(interp, 1);
lib->op_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);
}
Modified: trunk/t/configure/testlib/adefectivefoobar
==============================================================================
--- trunk/t/configure/testlib/adefectivefoobar Sat Apr 24 00:51:33 2010 (r45948)
+++ trunk/t/configure/testlib/adefectivefoobar Sat Apr 24 01:14:23 2010 (r45949)
@@ -40,7 +40,6 @@
auto::jit
auto::cpu
auto::funcptr
-auto::cgoto
auto::inline
auto::gc
auto::memalign
Modified: trunk/t/configure/testlib/bdefectivefoobar
==============================================================================
--- trunk/t/configure/testlib/bdefectivefoobar Sat Apr 24 00:51:33 2010 (r45948)
+++ trunk/t/configure/testlib/bdefectivefoobar Sat Apr 24 01:14:23 2010 (r45949)
@@ -50,7 +50,6 @@
auto::jit
auto::cpu
auto::funcptr
-auto::cgoto
auto::inline
auto::gc
auto::memalign
Modified: trunk/t/configure/testlib/cdefectivefoobar
==============================================================================
--- trunk/t/configure/testlib/cdefectivefoobar Sat Apr 24 00:51:33 2010 (r45948)
+++ trunk/t/configure/testlib/cdefectivefoobar Sat Apr 24 01:14:23 2010 (r45949)
@@ -51,7 +51,6 @@
auto::jit
auto::cpu
auto::funcptr
-auto::cgoto
auto::inline
auto::gc
auto::memalign
Modified: trunk/t/configure/testlib/ddefectivefoobar
==============================================================================
--- trunk/t/configure/testlib/ddefectivefoobar Sat Apr 24 00:51:33 2010 (r45948)
+++ trunk/t/configure/testlib/ddefectivefoobar Sat Apr 24 01:14:23 2010 (r45949)
@@ -42,7 +42,6 @@
auto::jit
auto::cpu
auto::funcptr
-auto::cgoto
auto::inline
auto::gc
auto::memalign
Modified: trunk/t/configure/testlib/verbosefoobar
==============================================================================
--- trunk/t/configure/testlib/verbosefoobar Sat Apr 24 00:51:33 2010 (r45948)
+++ trunk/t/configure/testlib/verbosefoobar Sat Apr 24 01:14:23 2010 (r45949)
@@ -44,7 +44,6 @@
auto::jit
auto::cpu
auto::funcptr
-auto::cgoto
auto::inline
auto::gc
auto::memalign
Modified: trunk/t/examples/shootout.t
==============================================================================
--- trunk/t/examples/shootout.t Sat Apr 24 00:51:33 2010 (r45948)
+++ trunk/t/examples/shootout.t Sat Apr 24 01:14:23 2010 (r45949)
@@ -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";
Modified: trunk/t/harness
==============================================================================
--- trunk/t/harness Sat Apr 24 00:51:33 2010 (r45948)
+++ trunk/t/harness Sat Apr 24 01:14:23 2010 (r45949)
@@ -134,10 +134,6 @@
Turn warnings on.
-=item C<-g>
-
-Run the C<CGoto> core.
-
=item C<-G>
Run the C<GCDebug> core.
@@ -146,14 +142,6 @@
Alias for running with the fast core.
-=item C<-C>
-
-Run the C<CGP> core.
-
-=item C<-S>
-
-Run Switched.
-
=item C<-b>
Run bounds checking enabled.
Modified: trunk/t/op/annotate-old.t
==============================================================================
--- trunk/t/op/annotate-old.t Sat Apr 24 00:51:33 2010 (r45948)
+++ trunk/t/op/annotate-old.t Sat Apr 24 01:14:23 2010 (r45949)
@@ -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( <<CODE, <<OUTPUT, 'unhandled exception from loaded function');
.sub main :main
Modified: trunk/t/op/debuginfo.t
==============================================================================
--- trunk/t/op/debuginfo.t Sat Apr 24 00:51:33 2010 (r45948)
+++ trunk/t/op/debuginfo.t Sat Apr 24 01:14:23 2010 (r45949)
@@ -24,11 +24,11 @@
=cut
$ENV{TEST_PROG_ARGS} ||= '';
-my $nolineno = $ENV{TEST_PROG_ARGS} =~ /--runcore=(fast|cgoto)/
+my $nolineno = $ENV{TEST_PROG_ARGS} =~ /--runcore=fast/
? "\\(unknown file\\)\n-1" : "debuginfo_\\d+\\.pasm\n\\d";
#SKIP: {
-#skip "disabled on fast-core",1 if $ENV{TEST_PROG_ARGS} =~ /--runcore=(fast|cgoto)/;
+#skip "disabled on fast-core",1 if $ENV{TEST_PROG_ARGS} =~ /--runcore=fast/;
pasm_output_like( <<'CODE', <<"OUTPUT", "getline, getfile" );
.pcc_sub main:
@@ -158,7 +158,7 @@
called from Sub 'main' pc (\d+|-1) \(.*?:(\d+|-1)\)$/
OUTPUT
-$nolineno = $ENV{TEST_PROG_ARGS} =~ /--runcore=(fast|cgoto)/
+$nolineno = $ENV{TEST_PROG_ARGS} =~ /--runcore=fast/
? '\(\(unknown file\):-1\)' : '\(xyz.pir:126\)';
pir_error_output_like( <<'CODE', <<"OUTPUT", "setfile and setline" );
@@ -173,7 +173,7 @@
/$nolineno/
OUTPUT
-$nolineno = $ENV{TEST_PROG_ARGS} =~ /--runcore=(fast|cgoto)/
+$nolineno = $ENV{TEST_PROG_ARGS} =~ /--runcore=fast/
? '\(\(unknown file\):-1\)' : '\(foo.p6:128\)';
pir_error_output_like( <<'CODE', <<"OUTPUT", "setfile and setline" );
.sub main :main
Modified: trunk/t/op/interp.t
==============================================================================
--- trunk/t/op/interp.t Sat Apr 24 00:51:33 2010 (r45948)
+++ trunk/t/op/interp.t Sat Apr 24 01:14:23 2010 (r45949)
@@ -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 '
Modified: trunk/t/pharness/02-get_test_prog_args.t
==============================================================================
--- trunk/t/pharness/02-get_test_prog_args.t Sat Apr 24 00:51:33 2010 (r45948)
+++ trunk/t/pharness/02-get_test_prog_args.t Sat Apr 24 01:14:23 2010 (r45949)
@@ -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");
Deleted: trunk/t/steps/auto/cgoto-01.t
==============================================================================
--- trunk/t/steps/auto/cgoto-01.t Sat Apr 24 01:14:23 2010 (r45948)
+++ /dev/null 00:00:00 1970 (deleted)
@@ -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<Configure.pl>.
-
-The tests in this file test auto::cgoto.
-
-=head1 AUTHOR
-
-James E Keenan
-
-=head1 SEE ALSO
-
-config::auto::cgoto, F<Configure.pl>.
-
-=cut
-
-# Local Variables:
-# mode: cperl
-# cperl-indent-level: 4
-# fill-column: 100
-# End:
-# vim: expandtab shiftwidth=4:
Modified: trunk/t/tools/install/testlib/README
==============================================================================
--- trunk/t/tools/install/testlib/README Sat Apr 24 00:51:33 2010 (r45948)
+++ trunk/t/tools/install/testlib/README Sat Apr 24 01:14:23 2010 (r45949)
@@ -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
-------
Modified: trunk/t/tools/ops2cutils/01-new.t
==============================================================================
--- trunk/t/tools/ops2cutils/01-new.t Sat Apr 24 00:51:33 2010 (r45948)
+++ trunk/t/tools/ops2cutils/01-new.t Sat Apr 24 01:14:23 2010 (r45949)
@@ -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};
Modified: trunk/t/tools/ops2cutils/03-print_c_header_file.t
==============================================================================
--- trunk/t/tools/ops2cutils/03-print_c_header_file.t Sat Apr 24 00:51:33 2010 (r45948)
+++ trunk/t/tools/ops2cutils/03-print_c_header_file.t Sat Apr 24 01:14:23 2010 (r45949)
@@ -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};
Modified: trunk/t/tools/ops2cutils/04-print_c_source_top.t
==============================================================================
--- trunk/t/tools/ops2cutils/04-print_c_source_top.t Sat Apr 24 00:51:33 2010 (r45948)
+++ trunk/t/tools/ops2cutils/04-print_c_source_top.t Sat Apr 24 01:14:23 2010 (r45949)
@@ -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" );
}
Modified: trunk/t/tools/ops2cutils/05-print_c_source_bottom.t
==============================================================================
--- trunk/t/tools/ops2cutils/05-print_c_source_bottom.t Sat Apr 24 00:51:33 2010 (r45948)
+++ trunk/t/tools/ops2cutils/05-print_c_source_bottom.t Sat Apr 24 01:14:23 2010 (r45949)
@@ -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" );
}
Modified: trunk/t/tools/ops2cutils/06-dynamic.t
==============================================================================
--- trunk/t/tools/ops2cutils/06-dynamic.t Sat Apr 24 00:51:33 2010 (r45948)
+++ trunk/t/tools/ops2cutils/06-dynamic.t Sat Apr 24 01:14:23 2010 (r45949)
@@ -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,
Modified: trunk/t/tools/ops2cutils/07-make_incdir.t
==============================================================================
--- trunk/t/tools/ops2cutils/07-make_incdir.t Sat Apr 24 00:51:33 2010 (r45948)
+++ trunk/t/tools/ops2cutils/07-make_incdir.t Sat Apr 24 01:14:23 2010 (r45949)
@@ -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};
Modified: trunk/t/tools/ops2cutils/08-nolines.t
==============================================================================
--- trunk/t/tools/ops2cutils/08-nolines.t Sat Apr 24 00:51:33 2010 (r45948)
+++ trunk/t/tools/ops2cutils/08-nolines.t Sat Apr 24 01:14:23 2010 (r45949)
@@ -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],
Modified: trunk/t/tools/ops2cutils/09-dynamic_nolines.t
==============================================================================
--- trunk/t/tools/ops2cutils/09-dynamic_nolines.t Sat Apr 24 00:51:33 2010 (r45948)
+++ trunk/t/tools/ops2cutils/09-dynamic_nolines.t Sat Apr 24 01:14:23 2010 (r45949)
@@ -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" );
}
Modified: trunk/t/tools/ops2cutils/10-print_c_source_file.t
==============================================================================
--- trunk/t/tools/ops2cutils/10-print_c_source_file.t Sat Apr 24 00:51:33 2010 (r45948)
+++ trunk/t/tools/ops2cutils/10-print_c_source_file.t Sat Apr 24 01:14:23 2010 (r45949)
@@ -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};
Modified: trunk/tools/build/ops2c.pl
==============================================================================
--- trunk/tools/build/ops2c.pl Sat Apr 24 00:51:33 2010 (r45948)
+++ trunk/tools/build/ops2c.pl Sat Apr 24 01:14:23 2010 (r45949)
@@ -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<CGoto>
-
-Create the C<goto> run loop.
-
-=item C<CGP>
-
-Create the C<goto> and predereferenced run loop.
-
-=item C<CSwitch>
-
-Create the C<switch>ed and predereferenced run loop.
-
-=item C<CPrederef>
-
-Create the predereferenced run loop.
-
=back
=head2 Options
@@ -153,14 +137,6 @@
=item C<Parrot::OpTrans::C>
-=item C<Parrot::OpTrans::CGoto>
-
-=item C<Parrot::OpTrans::CGP>
-
-=item C<Parrot::OpTrans::CSwitch>
-
-=item C<Parrot::OpTrans::CPrederef>
-
=item C<Parrot::Ops2c::Utils>
=item C<Parrot::Ops2c::Auxiliary>
Modified: trunk/tools/dev/parrot-fuzzer
==============================================================================
--- trunk/tools/dev/parrot-fuzzer Sat Apr 24 00:51:33 2010 (r45948)
+++ trunk/tools/dev/parrot-fuzzer Sat Apr 24 01:14:23 2010 (r45949)
@@ -62,7 +62,7 @@
Specify which runcore to use when running Parrot. The default is the C<slow>
core. This option corresponds directly to Parrot's C<--runcore> option. Other
-runcores include C<fast>, C<jit>, C<cgoto>, C<cgp>, C<cgp-jit>, and C<switch>.
+runcores include C<fast>.
See Parrot's help for more details.
=item C<--ignore_blacklist>
More information about the parrot-commits
mailing list