[svn:parrot] r41394 - trunk/compilers/imcc

chromatic at svn.parrot.org chromatic at svn.parrot.org
Mon Sep 21 06:43:10 UTC 2009


Author: chromatic
Date: Mon Sep 21 06:43:08 2009
New Revision: 41394
URL: https://trac.parrot.org/parrot/changeset/41394

Log:
[IMCC] Fixed runcore flag setting with IMCC optimization options (-t, in
specific).

Modified:
   trunk/compilers/imcc/main.c

Modified: trunk/compilers/imcc/main.c
==============================================================================
--- trunk/compilers/imcc/main.c	Mon Sep 21 06:03:36 2009	(r41393)
+++ trunk/compilers/imcc/main.c	Mon Sep 21 06:43:08 2009	(r41394)
@@ -370,29 +370,29 @@
         switch (opt.opt_id) {
             case 'R':
                 if (STREQ(opt.opt_arg, "slow") || STREQ(opt.opt_arg, "bounds"))
-                    core |= PARROT_SLOW_CORE;
+                    core = PARROT_SLOW_CORE;
                 else if (STREQ(opt.opt_arg, "fast") || STREQ(opt.opt_arg, "function"))
-                    core |= PARROT_FAST_CORE;
+                    core = PARROT_FAST_CORE;
                 else if (STREQ(opt.opt_arg, "switch"))
-                    core |= PARROT_SWITCH_CORE;
+                    core = PARROT_SWITCH_CORE;
                 else if (STREQ(opt.opt_arg, "cgp"))
-                    core |= PARROT_CGP_CORE;
+                    core = PARROT_CGP_CORE;
                 else if (STREQ(opt.opt_arg, "cgoto"))
-                    core |= PARROT_CGOTO_CORE;
+                    core = PARROT_CGOTO_CORE;
                 else if (STREQ(opt.opt_arg, "jit"))
-                    core |= PARROT_FAST_CORE;
+                    core = PARROT_FAST_CORE;
                 else if (STREQ(opt.opt_arg, "cgp-jit"))
-                    core |= PARROT_CGP_CORE;
+                    core = PARROT_CGP_CORE;
                 else if (STREQ(opt.opt_arg, "switch-jit"))
-                    core |= PARROT_SWITCH_CORE;
+                    core = PARROT_SWITCH_CORE;
                 else if (STREQ(opt.opt_arg, "exec"))
-                    core |= PARROT_EXEC_CORE;
+                    core = PARROT_EXEC_CORE;
                 else if (STREQ(opt.opt_arg, "trace"))
-                    core |= PARROT_SLOW_CORE;
+                    core = PARROT_SLOW_CORE;
                 else if (STREQ(opt.opt_arg, "profiling"))
-                    core  = PARROT_PROFILING_CORE;
+                    core = PARROT_PROFILING_CORE;
                 else if (STREQ(opt.opt_arg, "gcdebug"))
-                    core |= PARROT_GC_DEBUG_CORE;
+                    core = PARROT_GC_DEBUG_CORE;
                 else
                     Parrot_ex_throw_from_c_args(interp, NULL, 1,
                         "main: Unrecognized runcore '%s' specified."
@@ -496,9 +496,10 @@
                     IMCC_INFO(interp)->optimizer_level |= (OPT_PRE | OPT_CFG);
                 }
                 if (strchr(opt.opt_arg, 't')) {
-                    core |= PARROT_SWITCH_CORE;
 #ifdef HAVE_COMPUTED_GOTO
-                    core |= PARROT_CGP_CORE;
+                    core = PARROT_CGP_CORE;
+#else
+                    core = PARROT_SWITCH_CORE;
 #endif
                 }
                 break;


More information about the parrot-commits mailing list