[svn:parrot] r37187 - in trunk/src: . ops

cotto at svn.parrot.org cotto at svn.parrot.org
Sun Mar 8 01:03:52 UTC 2009


Author: cotto
Date: Sun Mar  8 01:03:51 2009
New Revision: 37187
URL: https://trac.parrot.org/parrot/changeset/37187

Log:
[PMC] use VTABLE functions instead of messing directly with ParrotInterpreter PMC internals

Modified:
   trunk/src/inter_cb.c
   trunk/src/ops/core.ops
   trunk/src/ops/experimental.ops

Modified: trunk/src/inter_cb.c
==============================================================================
--- trunk/src/inter_cb.c	Sun Mar  8 00:18:26 2009	(r37186)
+++ trunk/src/inter_cb.c	Sun Mar  8 01:03:51 2009	(r37187)
@@ -235,7 +235,7 @@
      */
     sc = CONST_STRING(interp, "_interpreter");
     passed_interp = VTABLE_getprop(interp, user_data, sc);
-    if (PMC_data(passed_interp) != interp)
+    if (VTABLE_get_pointer(interp, passed_interp) != interp)
         PANIC(interp, "callback gone to wrong interpreter");
 
     sc = CONST_STRING(interp, "_synchronous");

Modified: trunk/src/ops/core.ops
==============================================================================
--- trunk/src/ops/core.ops	Sun Mar  8 00:18:26 2009	(r37186)
+++ trunk/src/ops/core.ops	Sun Mar  8 01:03:51 2009	(r37187)
@@ -1169,7 +1169,7 @@
 =cut
 
 op runinterp(invar PMC, in LABEL) {
-    Interp * const new_interp = (Interp *)PMC_data($1);
+    Interp * const new_interp = (Interp *)VTABLE_get_pointer(interp, $1);
     Interp_flags_SET(new_interp, PARROT_EXTERN_CODE_FLAG);
     new_interp->code = interp->code;
     runops(new_interp, REL_PC + $2);

Modified: trunk/src/ops/experimental.ops
==============================================================================
--- trunk/src/ops/experimental.ops	Sun Mar  8 00:18:26 2009	(r37186)
+++ trunk/src/ops/experimental.ops	Sun Mar  8 01:03:51 2009	(r37187)
@@ -323,7 +323,7 @@
 =cut
 
 op runinterp(invar PMC, in PMC) {
-    Interp * const new_interp = (Interp *)PMC_data($1);
+    Interp * const new_interp = (Interp *)VTABLE_get_pointer(interp, $1);
     opcode_t *pc;
     Interp_flags_SET(new_interp, PARROT_EXTERN_CODE_FLAG);
     pc = (opcode_t *)VTABLE_invoke(new_interp, $2, NULL);


More information about the parrot-commits mailing list