[svn:parrot] r40756 - in branches/context_pmc3: include/parrot lib/Parrot/OpTrans src src/call src/gc src/jit/i386

bacek at svn.parrot.org bacek at svn.parrot.org
Mon Aug 24 11:14:31 UTC 2009


Author: bacek
Date: Mon Aug 24 11:14:29 2009
New Revision: 40756
URL: https://trac.parrot.org/parrot/changeset/40756

Log:
[cage] Rename Parrot_ctx_ functions to Parrot_cx_ for consistency with other functions

Modified:
   branches/context_pmc3/include/parrot/context.h
   branches/context_pmc3/include/parrot/interpreter.h
   branches/context_pmc3/include/parrot/register.h
   branches/context_pmc3/lib/Parrot/OpTrans/C.pm
   branches/context_pmc3/lib/Parrot/OpTrans/CGoto.pm
   branches/context_pmc3/src/call/pcc.c
   branches/context_pmc3/src/context.c
   branches/context_pmc3/src/gc/alloc_register.c
   branches/context_pmc3/src/jit.c
   branches/context_pmc3/src/jit/i386/jit_defs.c

Modified: branches/context_pmc3/include/parrot/context.h
==============================================================================
--- branches/context_pmc3/include/parrot/context.h	Mon Aug 24 10:50:01 2009	(r40755)
+++ branches/context_pmc3/include/parrot/context.h	Mon Aug 24 11:14:29 2009	(r40756)
@@ -62,34 +62,34 @@
     size_t pred_offset;
 };
 
-#define PMC_context(pmc) Parrot_ctx_get_context(interp, (pmc))
+#define PMC_context(pmc) Parrot_cx_get_context(interp, (pmc))
 
 STRING*
-Parrot_ctx_get_string_constant(PARROT_INTERP, ARGIN(PMC* ctx), INTVAL idx);
+Parrot_cx_get_string_constant(PARROT_INTERP, ARGIN(PMC* ctx), INTVAL idx);
 
 PMC*
-Parrot_ctx_get_pmc_constant(PARROT_INTERP, ARGIN(PMC* ctx), INTVAL idx);
+Parrot_cx_get_pmc_constant(PARROT_INTERP, ARGIN(PMC* ctx), INTVAL idx);
 
 /* HEADERIZER BEGIN: src/context.c */
 /* Don't modify between HEADERIZER BEGIN / HEADERIZER END.  Your changes will be lost. */
 
 PARROT_EXPORT
 PARROT_CANNOT_RETURN_NULL
-struct PackFile_Constant ** Parrot_ctx_constants(PARROT_INTERP,
+struct PackFile_Constant ** Parrot_cx_constants(PARROT_INTERP,
     ARGIN(PMC *ctx))
         __attribute__nonnull__(1)
         __attribute__nonnull__(2);
 
 PARROT_EXPORT
 PARROT_CAN_RETURN_NULL
-Parrot_Context* Parrot_ctx_get_context(PARROT_INTERP, ARGIN(PMC *ctx))
+Parrot_Context* Parrot_cx_get_context(PARROT_INTERP, ARGIN(PMC *ctx))
         __attribute__nonnull__(1)
         __attribute__nonnull__(2);
 
-#define ASSERT_ARGS_Parrot_ctx_constants __attribute__unused__ int _ASSERT_ARGS_CHECK = \
+#define ASSERT_ARGS_Parrot_cx_constants __attribute__unused__ int _ASSERT_ARGS_CHECK = \
        PARROT_ASSERT_ARG(interp) \
     || PARROT_ASSERT_ARG(ctx)
-#define ASSERT_ARGS_Parrot_ctx_get_context __attribute__unused__ int _ASSERT_ARGS_CHECK = \
+#define ASSERT_ARGS_Parrot_cx_get_context __attribute__unused__ int _ASSERT_ARGS_CHECK = \
        PARROT_ASSERT_ARG(interp) \
     || PARROT_ASSERT_ARG(ctx)
 /* Don't modify between HEADERIZER BEGIN / HEADERIZER END.  Your changes will be lost. */

Modified: branches/context_pmc3/include/parrot/interpreter.h
==============================================================================
--- branches/context_pmc3/include/parrot/interpreter.h	Mon Aug 24 10:50:01 2009	(r40755)
+++ branches/context_pmc3/include/parrot/interpreter.h	Mon Aug 24 11:14:29 2009	(r40756)
@@ -194,7 +194,7 @@
 } Prederef;
 
 
-#define CONTEXT(interp) Parrot_ctx_get_context(interp, interp->ctx)
+#define CONTEXT(interp) Parrot_cx_get_context(interp, interp->ctx)
 
 
 /*
@@ -204,7 +204,7 @@
  * functions to manipulate Context.
  */
 #define CURRENT_CONTEXT(interp)             (interp->ctx)
-#define CONTEXT_FIELD(interp, ctx, name)    ((Parrot_ctx_get_context(interp, ctx))->name)
+#define CONTEXT_FIELD(interp, ctx, name)    ((Parrot_cx_get_context(interp, ctx))->name)
 #define CURRENT_CONTEXT_FIELD(interp, name) CONTEXT_FIELD(interp, interp->ctx, name)
 
 

Modified: branches/context_pmc3/include/parrot/register.h
==============================================================================
--- branches/context_pmc3/include/parrot/register.h	Mon Aug 24 10:50:01 2009	(r40755)
+++ branches/context_pmc3/include/parrot/register.h	Mon Aug 24 11:14:29 2009	(r40756)
@@ -43,7 +43,7 @@
 #define REGNO_STR 2
 #define REGNO_PMC 3
 
-#define __CTX Parrot_ctx_get_context(interp, interp->ctx)
+#define __CTX Parrot_cx_get_context(interp, interp->ctx)
 #define _SIZEOF_INTS    (sizeof (INTVAL) * __CTX->n_regs_used[REGNO_INT])
 #define _SIZEOF_NUMS    (sizeof (FLOATVAL) * __CTX->n_regs_used[REGNO_NUM])
 #define _SIZEOF_PMCS    (sizeof (PMC*) * __CTX->n_regs_used[REGNO_PMC])

Modified: branches/context_pmc3/lib/Parrot/OpTrans/C.pm
==============================================================================
--- branches/context_pmc3/lib/Parrot/OpTrans/C.pm	Mon Aug 24 10:50:01 2009	(r40755)
+++ branches/context_pmc3/lib/Parrot/OpTrans/C.pm	Mon Aug 24 11:14:29 2009	(r40756)
@@ -60,7 +60,7 @@
 #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_ctx_constants(interp, interp->ctx)[cur_opcode[i]]
+#define CONST(i) Parrot_cx_constants(interp, interp->ctx)[cur_opcode[i]]
 END
 }
 

Modified: branches/context_pmc3/lib/Parrot/OpTrans/CGoto.pm
==============================================================================
--- branches/context_pmc3/lib/Parrot/OpTrans/CGoto.pm	Mon Aug 24 10:50:01 2009	(r40755)
+++ branches/context_pmc3/lib/Parrot/OpTrans/CGoto.pm	Mon Aug 24 11:14:29 2009	(r40756)
@@ -73,7 +73,7 @@
 #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_ctx_constants(interp, interp->ctx)[i]
+#define CONST(i) Parrot_cx_constants(interp, interp->ctx)[i]
 END
 }
 

Modified: branches/context_pmc3/src/call/pcc.c
==============================================================================
--- branches/context_pmc3/src/call/pcc.c	Mon Aug 24 10:50:01 2009	(r40755)
+++ branches/context_pmc3/src/call/pcc.c	Mon Aug 24 11:14:29 2009	(r40756)
@@ -837,7 +837,7 @@
             /* ensure that callees don't modify constant caller strings */
             if (constant)
                 UVal_str(st->val) = Parrot_str_new_COW(interp,
-                                        Parrot_ctx_get_string_constant(interp, st->src.ctx, idx));
+                                        Parrot_cx_get_string_constant(interp, st->src.ctx, idx));
             else
                 UVal_str(st->val) = CTX_REG_STR(st->src.ctx, idx);
 
@@ -848,7 +848,7 @@
                                          : CTX_REG_NUM(st->src.ctx, idx);
             break;
         case PARROT_ARG_PMC:
-            UVal_pmc(st->val) = constant ? Parrot_ctx_get_pmc_constant(interp, st->src.ctx, idx)
+            UVal_pmc(st->val) = constant ? Parrot_cx_get_pmc_constant(interp, st->src.ctx, idx)
                                          : CTX_REG_PMC(st->src.ctx, idx);
 
             if (st->src.sig & PARROT_ARG_FLATTEN) {
@@ -1322,7 +1322,7 @@
         n_named++;
         idx   = st->dest.u.op.pc[i];
         param = PARROT_ARG_CONSTANT_ISSET(st->dest.sig)
-                ? Parrot_ctx_get_string_constant(interp, st->dest.ctx, idx)
+                ? Parrot_cx_get_string_constant(interp, st->dest.ctx, idx)
                 : CTX_REG_STR(st->dest.ctx, idx);
 
         if (st->name == param || Parrot_str_equal(interp, st->name, param)) {
@@ -1575,7 +1575,7 @@
             else {
                 const   INTVAL idx   = st->dest.u.op.pc[last_name_pos];
                 STRING * const param = PARROT_ARG_CONSTANT_ISSET(sig)
-                    ? Parrot_ctx_get_string_constant(interp, st->dest.ctx, idx)
+                    ? Parrot_cx_get_string_constant(interp, st->dest.ctx, idx)
                     : CTX_REG_STR(st->dest.ctx, idx);
 
                 Parrot_ex_throw_from_c_args(interp, NULL,

Modified: branches/context_pmc3/src/context.c
==============================================================================
--- branches/context_pmc3/src/context.c	Mon Aug 24 10:50:01 2009	(r40755)
+++ branches/context_pmc3/src/context.c	Mon Aug 24 11:14:29 2009	(r40756)
@@ -30,7 +30,7 @@
 
 /*
  
-=item C<Parrot_ctx_get_string_constant()>
+=item C<Parrot_cx_get_string_constant()>
 
 Get string constant from context.
 
@@ -40,14 +40,14 @@
 
 PARROT_EXPORT
 STRING*
-Parrot_ctx_get_string_constant(PARROT_INTERP, ARGIN(PMC* ctx), INTVAL idx) {
-    Parrot_Context const * c = Parrot_ctx_get_context(interp, ctx);
+Parrot_cx_get_string_constant(PARROT_INTERP, ARGIN(PMC* ctx), INTVAL idx) {
+    Parrot_Context const * c = Parrot_cx_get_context(interp, ctx);
     return c->constants[idx]->u.string;
 }
 
 /*
  
-=item C<Parrot_ctx_get_pmc_constant()>
+=item C<Parrot_cx_get_pmc_constant()>
 
 Get PMC constant from context.
 
@@ -58,15 +58,15 @@
 PARROT_EXPORT
 PARROT_CAN_RETURN_NULL
 PMC*
-Parrot_ctx_get_pmc_constant(PARROT_INTERP, ARGIN(PMC* ctx), INTVAL idx) {
-    Parrot_Context const * c = Parrot_ctx_get_context(interp, ctx);
+Parrot_cx_get_pmc_constant(PARROT_INTERP, ARGIN(PMC* ctx), INTVAL idx) {
+    Parrot_Context const * c = Parrot_cx_get_context(interp, ctx);
     return c->constants[idx]->u.key;
 }
 
 
 /*
 
-=item C<struct PackFile_Constant ** Parrot_ctx_constants(PARROT_INTERP, PMC
+=item C<struct PackFile_Constant ** Parrot_cx_constants(PARROT_INTERP, PMC
 *ctx)>
 
 =cut
@@ -75,8 +75,8 @@
 PARROT_EXPORT
 PARROT_CANNOT_RETURN_NULL
 struct PackFile_Constant **
-Parrot_ctx_constants(PARROT_INTERP, ARGIN(PMC *ctx)) {
-    ASSERT_ARGS(Parrot_ctx_constants)
+Parrot_cx_constants(PARROT_INTERP, ARGIN(PMC *ctx)) {
+    ASSERT_ARGS(Parrot_cx_constants)
     return ((Parrot_Context*)(VTABLE_get_pointer(interp, ctx)))->constants;
 }
 
@@ -84,7 +84,7 @@
 
 /*
 
-=item C<Parrot_Context* Parrot_ctx_get_context(PARROT_INTERP, PMC *ctx)>
+=item C<Parrot_Context* Parrot_cx_get_context(PARROT_INTERP, PMC *ctx)>
 
 Fetch Parrot_Context from Context PMC.
 
@@ -94,7 +94,7 @@
 PARROT_EXPORT
 PARROT_CAN_RETURN_NULL
 Parrot_Context*
-Parrot_ctx_get_context(PARROT_INTERP, ARGIN(PMC *ctx)) {
+Parrot_cx_get_context(PARROT_INTERP, ARGIN(PMC *ctx)) {
     if (PMC_IS_NULL(ctx))
         return NULL;
 

Modified: branches/context_pmc3/src/gc/alloc_register.c
==============================================================================
--- branches/context_pmc3/src/gc/alloc_register.c	Mon Aug 24 10:50:01 2009	(r40755)
+++ branches/context_pmc3/src/gc/alloc_register.c	Mon Aug 24 11:14:29 2009	(r40756)
@@ -219,7 +219,7 @@
 {
     ASSERT_ARGS(clear_regs)
     int i;
-    Parrot_Context *ctx = Parrot_ctx_get_context(interp, pmcctx);
+    Parrot_Context *ctx = Parrot_cx_get_context(interp, pmcctx);
 
     /* NULL out registers - P/S have to be NULL for GC
      *
@@ -261,8 +261,8 @@
         ARGIN_NULLOK(PMC *pmcold))
 {
     ASSERT_ARGS(init_context)
-    Parrot_Context *ctx = Parrot_ctx_get_context(interp, pmcctx);
-    Parrot_Context *old = Parrot_ctx_get_context(interp, pmcold);
+    Parrot_Context *ctx = Parrot_cx_get_context(interp, pmcctx);
+    Parrot_Context *old = Parrot_cx_get_context(interp, pmcold);
 
     ctx->gc_mark           = 0;
     ctx->current_results   = NULL;

Modified: branches/context_pmc3/src/jit.c
==============================================================================
--- branches/context_pmc3/src/jit.c	Mon Aug 24 10:50:01 2009	(r40755)
+++ branches/context_pmc3/src/jit.c	Mon Aug 24 11:14:29 2009	(r40756)
@@ -287,7 +287,7 @@
         int arg_type;
         PMC *sig;
         if (argn >= args) {
-            sig = Parrot_ctx_get_pmc_constant(interp, CURRENT_CONTEXT(interp), cur_op[1]);
+            sig = Parrot_cx_get_pmc_constant(interp, CURRENT_CONTEXT(interp), cur_op[1]);
             arg_type = VTABLE_get_integer_keyed_int(interp,
                     sig, argn - args);
             arg_type &= (PARROT_ARG_TYPE_MASK | PARROT_ARG_CONSTANT);

Modified: branches/context_pmc3/src/jit/i386/jit_defs.c
==============================================================================
--- branches/context_pmc3/src/jit/i386/jit_defs.c	Mon Aug 24 10:50:01 2009	(r40755)
+++ branches/context_pmc3/src/jit/i386/jit_defs.c	Mon Aug 24 11:14:29 2009	(r40756)
@@ -1232,7 +1232,7 @@
     PMC *sig_pmc;
     INTVAL *sig_bits, i, n;
 
-    sig_pmc = Parrot_ctx_get_pmc_constant(interp, CURRENT_CONTEXT(interp), CUR_OPCODE[1]);
+    sig_pmc = Parrot_cx_get_pmc_constant(interp, CURRENT_CONTEXT(interp), CUR_OPCODE[1]);
     GETATTR_FixedIntegerArray_int_array(interp, sig_pmc, sig_bits);
     n = VTABLE_elements(interp, sig_pmc);
     jit_info->n_args = n;
@@ -1369,7 +1369,7 @@
     PMC *sig_pmc;
     INTVAL *sig_bits, sig;
 
-    sig_pmc = Parrot_ctx_get_pmc_constant(interp, CURRENT_CONTEXT(interp), CUR_OPCODE[1]);
+    sig_pmc = Parrot_cx_get_pmc_constant(interp, CURRENT_CONTEXT(interp), CUR_OPCODE[1]);
     if (!VTABLE_elements(interp, sig_pmc))
         return;
     GETATTR_FixedIntegerArray_int_array(interp, sig_pmc, sig_bits);


More information about the parrot-commits mailing list