[svn:parrot] r47653 - branches/gsoc_instrument/src/dynpmc
khairul at svn.parrot.org
khairul at svn.parrot.org
Wed Jun 16 06:02:44 UTC 2010
Author: khairul
Date: Wed Jun 16 06:02:44 2010
New Revision: 47653
URL: https://trac.parrot.org/parrot/changeset/47653
Log:
use opsenum instead of raw op numbers
Modified:
branches/gsoc_instrument/src/dynpmc/instrument.pmc
Modified: branches/gsoc_instrument/src/dynpmc/instrument.pmc
==============================================================================
--- branches/gsoc_instrument/src/dynpmc/instrument.pmc Wed Jun 16 05:51:51 2010 (r47652)
+++ branches/gsoc_instrument/src/dynpmc/instrument.pmc Wed Jun 16 06:02:44 2010 (r47653)
@@ -23,6 +23,7 @@
#include "parrot/imcc.h"
#include "parrot/runcore_api.h"
#include "parrot/embed.h"
+#include "parrot/opsenum.h"
/*
* Structures for the linked list data type.
@@ -624,7 +625,12 @@
DO_OP(pc, interp);
/* Todo: Move this to a probe. This detects loadlib opcodes. */
- if (*pc_copy >= 96 && *pc_copy <= 101) {
+ if (*pc_copy == enum_ops_loadlib_p_s
+ || *pc_copy == enum_ops_loadlib_p_sc
+ || *pc_copy == enum_ops_loadlib_p_s_p
+ || *pc_copy == enum_ops_loadlib_p_sc_p
+ || *pc_copy == enum_ops_loadlib_p_s_pc
+ || *pc_copy == enum_ops_loadlib_p_sc_pc) {
detect_loadlib(interp);
}
@@ -656,11 +662,11 @@
*/
mem_copy_n_typed(coredata, interp->run_core, 1, Parrot_runcore_t);
- coredata->name = string_from_literal(interp, "instrument");
+ coredata->name = string_from_literal(interp, "instrument");
coredata->runops = Instrument_runcore_runops;
- coredata->prepare_run = NULL;
- coredata->destroy = NULL;
- coredata->flags = 0;
+ coredata->prepare_run = NULL;
+ coredata->destroy = NULL;
+ coredata->flags = 0;
coredata->supervisor_interp = supervisor;
coredata->supervisor_pmc = instrument;
coredata->op_hooks = NULL;
More information about the parrot-commits
mailing list