[svn:parrot] r48191 - trunk/src/interp
NotFound at svn.parrot.org
NotFound at svn.parrot.org
Tue Jul 27 21:51:04 UTC 2010
Author: NotFound
Date: Tue Jul 27 21:51:03 2010
New Revision: 48191
URL: https://trac.parrot.org/parrot/changeset/48191
Log:
don't waste time calculating a value we already have
Modified:
trunk/src/interp/inter_misc.c
Modified: trunk/src/interp/inter_misc.c
==============================================================================
--- trunk/src/interp/inter_misc.c Tue Jul 27 20:49:11 2010 (r48190)
+++ trunk/src/interp/inter_misc.c Tue Jul 27 21:51:03 2010 (r48191)
@@ -224,22 +224,8 @@
ret = Parrot_gc_impatient_pmcs(interp);
break;
case CURRENT_RUNCORE:
- {
- STRING *name = interp->run_core->name;
-
- if (Parrot_str_equal(interp, name, CONST_STRING(interp, "slow")))
- return PARROT_SLOW_CORE;
- 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_EXEC_CORE;
- else if (Parrot_str_equal(interp, name, CONST_STRING(interp, "gc_debug")))
- return PARROT_GC_DEBUG_CORE;
- else if (Parrot_str_equal(interp, name, CONST_STRING(interp, "debugger")))
- return PARROT_DEBUGGER_CORE;
- else if (Parrot_str_equal(interp, name, CONST_STRING(interp, "profiling")))
- return PARROT_PROFILING_CORE;
- }
+ ret = interp->run_core->id;
+ break;
default: /* or a warning only? */
ret = -1;
Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_UNIMPLEMENTED,
More information about the parrot-commits
mailing list