[svn:parrot] r40861 - in branches/context_pmc3: compilers/imcc include/parrot lib/Parrot/OpTrans lib/Parrot/Pmc2c src src/call src/gc src/interp src/jit/i386 src/ops src/pmc src/runcore
bacek at svn.parrot.org
bacek at svn.parrot.org
Sun Aug 30 09:24:37 UTC 2009
Author: bacek
Date: Sun Aug 30 09:24:34 2009
New Revision: 40861
URL: https://trac.parrot.org/parrot/changeset/40861
Log:
Replace 'cx' with 'pcc' prefix in context related functions
Modified:
branches/context_pmc3/compilers/imcc/imcc.y
branches/context_pmc3/compilers/imcc/imcparser.c
branches/context_pmc3/compilers/imcc/pbc.c
branches/context_pmc3/include/parrot/call.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/CGP.pm
branches/context_pmc3/lib/Parrot/OpTrans/CGoto.pm
branches/context_pmc3/lib/Parrot/OpTrans/CPrederef.pm
branches/context_pmc3/lib/Parrot/OpTrans/CSwitch.pm
branches/context_pmc3/lib/Parrot/Pmc2c/PCCMETHOD.pm
branches/context_pmc3/src/call/context.c
branches/context_pmc3/src/call/pcc.c
branches/context_pmc3/src/debug.c
branches/context_pmc3/src/embed.c
branches/context_pmc3/src/exceptions.c
branches/context_pmc3/src/gc/alloc_register.c
branches/context_pmc3/src/global.c
branches/context_pmc3/src/global_setup.c
branches/context_pmc3/src/hll.c
branches/context_pmc3/src/interp/inter_create.c
branches/context_pmc3/src/interp/inter_misc.c
branches/context_pmc3/src/jit.c
branches/context_pmc3/src/jit/i386/jit_defs.c
branches/context_pmc3/src/multidispatch.c
branches/context_pmc3/src/oo.c
branches/context_pmc3/src/ops/core.ops
branches/context_pmc3/src/ops/object.ops
branches/context_pmc3/src/ops/pic.ops
branches/context_pmc3/src/ops/var.ops
branches/context_pmc3/src/packfile.c
branches/context_pmc3/src/pic.c
branches/context_pmc3/src/pmc.c
branches/context_pmc3/src/pmc/class.pmc
branches/context_pmc3/src/pmc/continuation.pmc
branches/context_pmc3/src/pmc/coroutine.pmc
branches/context_pmc3/src/pmc/exception.pmc
branches/context_pmc3/src/pmc/exporter.pmc
branches/context_pmc3/src/pmc/nci.pmc
branches/context_pmc3/src/pmc/object.pmc
branches/context_pmc3/src/pmc/parrotinterpreter.pmc
branches/context_pmc3/src/pmc/role.pmc
branches/context_pmc3/src/pmc/sub.pmc
branches/context_pmc3/src/runcore/cores.c
branches/context_pmc3/src/runcore/main.c
branches/context_pmc3/src/scheduler.c
branches/context_pmc3/src/sub.c
Modified: branches/context_pmc3/compilers/imcc/imcc.y
==============================================================================
--- branches/context_pmc3/compilers/imcc/imcc.y Sun Aug 30 08:58:32 2009 (r40860)
+++ branches/context_pmc3/compilers/imcc/imcc.y Sun Aug 30 09:24:34 2009 (r40861)
@@ -1210,7 +1210,7 @@
HLL STRINGC
{
STRING * const hll_name = Parrot_str_unescape(interp, $2 + 1, '"', NULL);
- Parrot_cx_set_HLL(interp, CONTEXT(interp),
+ Parrot_pcc_set_HLL(interp, CONTEXT(interp),
Parrot_register_HLL(interp, hll_name));
IMCC_INFO(interp)->cur_namespace = NULL;
Modified: branches/context_pmc3/compilers/imcc/imcparser.c
==============================================================================
--- branches/context_pmc3/compilers/imcc/imcparser.c Sun Aug 30 08:58:32 2009 (r40860)
+++ branches/context_pmc3/compilers/imcc/imcparser.c Sun Aug 30 09:24:34 2009 (r40861)
@@ -3318,7 +3318,7 @@
#line 1211 "compilers/imcc/imcc.y"
{
STRING * const hll_name = Parrot_str_unescape(interp, (yyvsp[(2) - (2)].s) + 1, '"', NULL);
- Parrot_cx_set_HLL(interp, CONTEXT(interp),
+ Parrot_pcc_set_HLL(interp, CONTEXT(interp),
Parrot_register_HLL(interp, hll_name));
IMCC_INFO(interp)->cur_namespace = NULL;
Modified: branches/context_pmc3/compilers/imcc/pbc.c
==============================================================================
--- branches/context_pmc3/compilers/imcc/pbc.c Sun Aug 30 08:58:32 2009 (r40860)
+++ branches/context_pmc3/compilers/imcc/pbc.c Sun Aug 30 09:24:34 2009 (r40861)
@@ -1280,7 +1280,7 @@
}
/* could be eval too; check if :outer is the current sub */
- current = Parrot_cx_get_sub(interp, CONTEXT(interp));
+ current = Parrot_pcc_get_sub(interp, CONTEXT(interp));
if (PMC_IS_NULL(current))
IMCC_fatal(interp, 1, "Undefined :outer sub '%s'.\n",
@@ -1434,7 +1434,7 @@
sub->namespace_name = ns_pmc;
sub->start_offs = offs;
sub->end_offs = end;
- sub->HLL_id = Parrot_cx_get_HLL(interp, CONTEXT(interp));
+ sub->HLL_id = Parrot_pcc_get_HLL(interp, CONTEXT(interp));
for (i = 0; i < 4; ++i)
sub->n_regs_used[i] = unit->n_regs_used[i];
Modified: branches/context_pmc3/include/parrot/call.h
==============================================================================
--- branches/context_pmc3/include/parrot/call.h Sun Aug 30 08:58:32 2009 (r40860)
+++ branches/context_pmc3/include/parrot/call.h Sun Aug 30 09:24:34 2009 (r40861)
@@ -755,102 +755,103 @@
PARROT_EXPORT
PARROT_CANNOT_RETURN_NULL
-struct PackFile_Constant ** Parrot_cx_constants(PARROT_INTERP,
+struct PackFile_Constant ** Parrot_pcc_constants(PARROT_INTERP,
ARGIN(PMC *ctx))
__attribute__nonnull__(1)
__attribute__nonnull__(2);
PARROT_EXPORT
-UINTVAL Parrot_cx_dec_recursion_depth(PARROT_INTERP, ARGIN(PMC *ctx))
+UINTVAL Parrot_pcc_dec_recursion_depth(PARROT_INTERP, ARGIN(PMC *ctx))
__attribute__nonnull__(1)
__attribute__nonnull__(2);
PARROT_EXPORT
-PMC* Parrot_cx_get_caller_ctx(PARROT_INTERP, ARGIN(PMC *ctx))
+PMC* Parrot_pcc_get_caller_ctx(PARROT_INTERP, ARGIN(PMC *ctx))
__attribute__nonnull__(1)
__attribute__nonnull__(2);
PARROT_EXPORT
PARROT_CAN_RETURN_NULL
-Parrot_Context* Parrot_cx_get_context(PARROT_INTERP, ARGIN_NULLOK(PMC *ctx))
+Parrot_Context* Parrot_pcc_get_context(PARROT_INTERP,
+ ARGIN_NULLOK(PMC *ctx))
__attribute__nonnull__(1);
PARROT_EXPORT
-PMC* Parrot_cx_get_continuation(PARROT_INTERP, ARGIN(PMC *ctx))
+PMC* Parrot_pcc_get_continuation(PARROT_INTERP, ARGIN(PMC *ctx))
__attribute__nonnull__(1)
__attribute__nonnull__(2);
PARROT_EXPORT
-INTVAL Parrot_cx_get_HLL(PARROT_INTERP, ARGIN(PMC *ctx))
+INTVAL Parrot_pcc_get_HLL(PARROT_INTERP, ARGIN(PMC *ctx))
__attribute__nonnull__(1)
__attribute__nonnull__(2);
PARROT_EXPORT
-PMC* Parrot_cx_get_lex_pad(PARROT_INTERP, ARGIN(PMC *ctx))
+PMC* Parrot_pcc_get_lex_pad(PARROT_INTERP, ARGIN(PMC *ctx))
__attribute__nonnull__(1)
__attribute__nonnull__(2);
PARROT_EXPORT
-PMC* Parrot_cx_get_namespace(PARROT_INTERP, ARGIN(PMC *ctx))
+PMC* Parrot_pcc_get_namespace(PARROT_INTERP, ARGIN(PMC *ctx))
__attribute__nonnull__(1)
__attribute__nonnull__(2);
PARROT_EXPORT
-PMC* Parrot_cx_get_object(PARROT_INTERP, ARGIN(PMC *ctx))
+PMC* Parrot_pcc_get_object(PARROT_INTERP, ARGIN(PMC *ctx))
__attribute__nonnull__(1)
__attribute__nonnull__(2);
PARROT_EXPORT
-PMC* Parrot_cx_get_outer_ctx(PARROT_INTERP, ARGIN(PMC *ctx))
+PMC* Parrot_pcc_get_outer_ctx(PARROT_INTERP, ARGIN(PMC *ctx))
__attribute__nonnull__(1)
__attribute__nonnull__(2);
PARROT_EXPORT
-opcode_t* Parrot_cx_get_pc(PARROT_INTERP, ARGIN(PMC *ctx))
+opcode_t* Parrot_pcc_get_pc(PARROT_INTERP, ARGIN(PMC *ctx))
__attribute__nonnull__(1)
__attribute__nonnull__(2);
PARROT_EXPORT
PARROT_CAN_RETURN_NULL
-PMC* Parrot_cx_get_pmc_constant(PARROT_INTERP, ARGIN(PMC *ctx), INTVAL idx)
+PMC* Parrot_pcc_get_pmc_constant(PARROT_INTERP, ARGIN(PMC *ctx), INTVAL idx)
__attribute__nonnull__(1)
__attribute__nonnull__(2);
PARROT_EXPORT
-size_t Parrot_cx_get_pred_offset(PARROT_INTERP, ARGIN(PMC *ctx))
+size_t Parrot_pcc_get_pred_offset(PARROT_INTERP, ARGIN(PMC *ctx))
__attribute__nonnull__(1)
__attribute__nonnull__(2);
PARROT_EXPORT
-UINTVAL Parrot_cx_get_recursion_depth(PARROT_INTERP, ARGIN(PMC *ctx))
+UINTVAL Parrot_pcc_get_recursion_depth(PARROT_INTERP, ARGIN(PMC *ctx))
__attribute__nonnull__(1)
__attribute__nonnull__(2);
PARROT_EXPORT
-opcode_t* Parrot_cx_get_results(PARROT_INTERP, ARGIN(PMC *ctx))
+opcode_t* Parrot_pcc_get_results(PARROT_INTERP, ARGIN(PMC *ctx))
__attribute__nonnull__(1)
__attribute__nonnull__(2);
PARROT_EXPORT
PARROT_CAN_RETURN_NULL
-STRING* Parrot_cx_get_string_constant(PARROT_INTERP,
+STRING* Parrot_pcc_get_string_constant(PARROT_INTERP,
ARGIN(PMC *ctx),
INTVAL idx)
__attribute__nonnull__(1)
__attribute__nonnull__(2);
PARROT_EXPORT
-PMC* Parrot_cx_get_sub(PARROT_INTERP, ARGIN(PMC *ctx))
+PMC* Parrot_pcc_get_sub(PARROT_INTERP, ARGIN(PMC *ctx))
__attribute__nonnull__(1)
__attribute__nonnull__(2);
PARROT_EXPORT
-UINTVAL Parrot_cx_inc_recursion_depth(PARROT_INTERP, ARGIN(PMC *ctx))
+UINTVAL Parrot_pcc_inc_recursion_depth(PARROT_INTERP, ARGIN(PMC *ctx))
__attribute__nonnull__(1)
__attribute__nonnull__(2);
PARROT_EXPORT
-void Parrot_cx_set_caller_ctx(PARROT_INTERP,
+void Parrot_pcc_set_caller_ctx(PARROT_INTERP,
ARGIN(PMC *ctx),
ARGIN(PMC *caller_ctx))
__attribute__nonnull__(1)
@@ -858,19 +859,19 @@
__attribute__nonnull__(3);
PARROT_EXPORT
-void Parrot_cx_set_continuation(PARROT_INTERP,
+void Parrot_pcc_set_continuation(PARROT_INTERP,
ARGIN(PMC *ctx),
ARGIN_NULLOK(PMC *_continuation))
__attribute__nonnull__(1)
__attribute__nonnull__(2);
PARROT_EXPORT
-void Parrot_cx_set_HLL(PARROT_INTERP, ARGIN(PMC *ctx), INTVAL hll)
+void Parrot_pcc_set_HLL(PARROT_INTERP, ARGIN(PMC *ctx), INTVAL hll)
__attribute__nonnull__(1)
__attribute__nonnull__(2);
PARROT_EXPORT
-void Parrot_cx_set_lex_pad(PARROT_INTERP,
+void Parrot_pcc_set_lex_pad(PARROT_INTERP,
ARGIN(PMC *ctx),
ARGIN(PMC *lex_pad))
__attribute__nonnull__(1)
@@ -878,21 +879,21 @@
__attribute__nonnull__(3);
PARROT_EXPORT
-void Parrot_cx_set_namespace(PARROT_INTERP,
+void Parrot_pcc_set_namespace(PARROT_INTERP,
ARGIN(PMC *ctx),
ARGIN_NULLOK(PMC *_namespace))
__attribute__nonnull__(1)
__attribute__nonnull__(2);
PARROT_EXPORT
-void Parrot_cx_set_object(PARROT_INTERP,
+void Parrot_pcc_set_object(PARROT_INTERP,
ARGIN(PMC *ctx),
ARGIN_NULLOK(PMC *object))
__attribute__nonnull__(1)
__attribute__nonnull__(2);
PARROT_EXPORT
-void Parrot_cx_set_outer_ctx(PARROT_INTERP,
+void Parrot_pcc_set_outer_ctx(PARROT_INTERP,
ARGIN(PMC *ctx),
ARGIN(PMC *outer_ctx))
__attribute__nonnull__(1)
@@ -900,120 +901,124 @@
__attribute__nonnull__(3);
PARROT_EXPORT
-void Parrot_cx_set_pc(PARROT_INTERP,
+void Parrot_pcc_set_pc(PARROT_INTERP,
ARGIN(PMC *ctx),
ARGIN_NULLOK(opcode_t *pc))
__attribute__nonnull__(1)
__attribute__nonnull__(2);
PARROT_EXPORT
-void Parrot_cx_set_pred_offset(PARROT_INTERP,
+void Parrot_pcc_set_pred_offset(PARROT_INTERP,
ARGIN(PMC *ctx),
size_t pred_offset)
__attribute__nonnull__(1)
__attribute__nonnull__(2);
PARROT_EXPORT
-void Parrot_cx_set_results(PARROT_INTERP,
+void Parrot_pcc_set_results(PARROT_INTERP,
ARGIN(PMC *ctx),
ARGIN_NULLOK(opcode_t *pc))
__attribute__nonnull__(1)
__attribute__nonnull__(2);
PARROT_EXPORT
-void Parrot_cx_set_sub(PARROT_INTERP,
+void Parrot_pcc_set_sub(PARROT_INTERP,
ARGIN(PMC *ctx),
ARGIN_NULLOK(PMC *sub))
__attribute__nonnull__(1)
__attribute__nonnull__(2);
-#define ASSERT_ARGS_Parrot_cx_constants __attribute__unused__ int _ASSERT_ARGS_CHECK = \
+#define ASSERT_ARGS_Parrot_pcc_constants __attribute__unused__ int _ASSERT_ARGS_CHECK = \
PARROT_ASSERT_ARG(interp) \
|| PARROT_ASSERT_ARG(ctx)
-#define ASSERT_ARGS_Parrot_cx_dec_recursion_depth __attribute__unused__ int _ASSERT_ARGS_CHECK = \
+#define ASSERT_ARGS_Parrot_pcc_dec_recursion_depth \
+ __attribute__unused__ int _ASSERT_ARGS_CHECK = \
PARROT_ASSERT_ARG(interp) \
|| PARROT_ASSERT_ARG(ctx)
-#define ASSERT_ARGS_Parrot_cx_get_caller_ctx __attribute__unused__ int _ASSERT_ARGS_CHECK = \
+#define ASSERT_ARGS_Parrot_pcc_get_caller_ctx __attribute__unused__ int _ASSERT_ARGS_CHECK = \
PARROT_ASSERT_ARG(interp) \
|| PARROT_ASSERT_ARG(ctx)
-#define ASSERT_ARGS_Parrot_cx_get_context __attribute__unused__ int _ASSERT_ARGS_CHECK = \
+#define ASSERT_ARGS_Parrot_pcc_get_context __attribute__unused__ int _ASSERT_ARGS_CHECK = \
PARROT_ASSERT_ARG(interp)
-#define ASSERT_ARGS_Parrot_cx_get_continuation __attribute__unused__ int _ASSERT_ARGS_CHECK = \
+#define ASSERT_ARGS_Parrot_pcc_get_continuation __attribute__unused__ int _ASSERT_ARGS_CHECK = \
PARROT_ASSERT_ARG(interp) \
|| PARROT_ASSERT_ARG(ctx)
-#define ASSERT_ARGS_Parrot_cx_get_HLL __attribute__unused__ int _ASSERT_ARGS_CHECK = \
+#define ASSERT_ARGS_Parrot_pcc_get_HLL __attribute__unused__ int _ASSERT_ARGS_CHECK = \
PARROT_ASSERT_ARG(interp) \
|| PARROT_ASSERT_ARG(ctx)
-#define ASSERT_ARGS_Parrot_cx_get_lex_pad __attribute__unused__ int _ASSERT_ARGS_CHECK = \
+#define ASSERT_ARGS_Parrot_pcc_get_lex_pad __attribute__unused__ int _ASSERT_ARGS_CHECK = \
PARROT_ASSERT_ARG(interp) \
|| PARROT_ASSERT_ARG(ctx)
-#define ASSERT_ARGS_Parrot_cx_get_namespace __attribute__unused__ int _ASSERT_ARGS_CHECK = \
+#define ASSERT_ARGS_Parrot_pcc_get_namespace __attribute__unused__ int _ASSERT_ARGS_CHECK = \
PARROT_ASSERT_ARG(interp) \
|| PARROT_ASSERT_ARG(ctx)
-#define ASSERT_ARGS_Parrot_cx_get_object __attribute__unused__ int _ASSERT_ARGS_CHECK = \
+#define ASSERT_ARGS_Parrot_pcc_get_object __attribute__unused__ int _ASSERT_ARGS_CHECK = \
PARROT_ASSERT_ARG(interp) \
|| PARROT_ASSERT_ARG(ctx)
-#define ASSERT_ARGS_Parrot_cx_get_outer_ctx __attribute__unused__ int _ASSERT_ARGS_CHECK = \
+#define ASSERT_ARGS_Parrot_pcc_get_outer_ctx __attribute__unused__ int _ASSERT_ARGS_CHECK = \
PARROT_ASSERT_ARG(interp) \
|| PARROT_ASSERT_ARG(ctx)
-#define ASSERT_ARGS_Parrot_cx_get_pc __attribute__unused__ int _ASSERT_ARGS_CHECK = \
+#define ASSERT_ARGS_Parrot_pcc_get_pc __attribute__unused__ int _ASSERT_ARGS_CHECK = \
PARROT_ASSERT_ARG(interp) \
|| PARROT_ASSERT_ARG(ctx)
-#define ASSERT_ARGS_Parrot_cx_get_pmc_constant __attribute__unused__ int _ASSERT_ARGS_CHECK = \
+#define ASSERT_ARGS_Parrot_pcc_get_pmc_constant __attribute__unused__ int _ASSERT_ARGS_CHECK = \
PARROT_ASSERT_ARG(interp) \
|| PARROT_ASSERT_ARG(ctx)
-#define ASSERT_ARGS_Parrot_cx_get_pred_offset __attribute__unused__ int _ASSERT_ARGS_CHECK = \
+#define ASSERT_ARGS_Parrot_pcc_get_pred_offset __attribute__unused__ int _ASSERT_ARGS_CHECK = \
PARROT_ASSERT_ARG(interp) \
|| PARROT_ASSERT_ARG(ctx)
-#define ASSERT_ARGS_Parrot_cx_get_recursion_depth __attribute__unused__ int _ASSERT_ARGS_CHECK = \
+#define ASSERT_ARGS_Parrot_pcc_get_recursion_depth \
+ __attribute__unused__ int _ASSERT_ARGS_CHECK = \
PARROT_ASSERT_ARG(interp) \
|| PARROT_ASSERT_ARG(ctx)
-#define ASSERT_ARGS_Parrot_cx_get_results __attribute__unused__ int _ASSERT_ARGS_CHECK = \
+#define ASSERT_ARGS_Parrot_pcc_get_results __attribute__unused__ int _ASSERT_ARGS_CHECK = \
PARROT_ASSERT_ARG(interp) \
|| PARROT_ASSERT_ARG(ctx)
-#define ASSERT_ARGS_Parrot_cx_get_string_constant __attribute__unused__ int _ASSERT_ARGS_CHECK = \
+#define ASSERT_ARGS_Parrot_pcc_get_string_constant \
+ __attribute__unused__ int _ASSERT_ARGS_CHECK = \
PARROT_ASSERT_ARG(interp) \
|| PARROT_ASSERT_ARG(ctx)
-#define ASSERT_ARGS_Parrot_cx_get_sub __attribute__unused__ int _ASSERT_ARGS_CHECK = \
+#define ASSERT_ARGS_Parrot_pcc_get_sub __attribute__unused__ int _ASSERT_ARGS_CHECK = \
PARROT_ASSERT_ARG(interp) \
|| PARROT_ASSERT_ARG(ctx)
-#define ASSERT_ARGS_Parrot_cx_inc_recursion_depth __attribute__unused__ int _ASSERT_ARGS_CHECK = \
+#define ASSERT_ARGS_Parrot_pcc_inc_recursion_depth \
+ __attribute__unused__ int _ASSERT_ARGS_CHECK = \
PARROT_ASSERT_ARG(interp) \
|| PARROT_ASSERT_ARG(ctx)
-#define ASSERT_ARGS_Parrot_cx_set_caller_ctx __attribute__unused__ int _ASSERT_ARGS_CHECK = \
+#define ASSERT_ARGS_Parrot_pcc_set_caller_ctx __attribute__unused__ int _ASSERT_ARGS_CHECK = \
PARROT_ASSERT_ARG(interp) \
|| PARROT_ASSERT_ARG(ctx) \
|| PARROT_ASSERT_ARG(caller_ctx)
-#define ASSERT_ARGS_Parrot_cx_set_continuation __attribute__unused__ int _ASSERT_ARGS_CHECK = \
+#define ASSERT_ARGS_Parrot_pcc_set_continuation __attribute__unused__ int _ASSERT_ARGS_CHECK = \
PARROT_ASSERT_ARG(interp) \
|| PARROT_ASSERT_ARG(ctx)
-#define ASSERT_ARGS_Parrot_cx_set_HLL __attribute__unused__ int _ASSERT_ARGS_CHECK = \
+#define ASSERT_ARGS_Parrot_pcc_set_HLL __attribute__unused__ int _ASSERT_ARGS_CHECK = \
PARROT_ASSERT_ARG(interp) \
|| PARROT_ASSERT_ARG(ctx)
-#define ASSERT_ARGS_Parrot_cx_set_lex_pad __attribute__unused__ int _ASSERT_ARGS_CHECK = \
+#define ASSERT_ARGS_Parrot_pcc_set_lex_pad __attribute__unused__ int _ASSERT_ARGS_CHECK = \
PARROT_ASSERT_ARG(interp) \
|| PARROT_ASSERT_ARG(ctx) \
|| PARROT_ASSERT_ARG(lex_pad)
-#define ASSERT_ARGS_Parrot_cx_set_namespace __attribute__unused__ int _ASSERT_ARGS_CHECK = \
+#define ASSERT_ARGS_Parrot_pcc_set_namespace __attribute__unused__ int _ASSERT_ARGS_CHECK = \
PARROT_ASSERT_ARG(interp) \
|| PARROT_ASSERT_ARG(ctx)
-#define ASSERT_ARGS_Parrot_cx_set_object __attribute__unused__ int _ASSERT_ARGS_CHECK = \
+#define ASSERT_ARGS_Parrot_pcc_set_object __attribute__unused__ int _ASSERT_ARGS_CHECK = \
PARROT_ASSERT_ARG(interp) \
|| PARROT_ASSERT_ARG(ctx)
-#define ASSERT_ARGS_Parrot_cx_set_outer_ctx __attribute__unused__ int _ASSERT_ARGS_CHECK = \
+#define ASSERT_ARGS_Parrot_pcc_set_outer_ctx __attribute__unused__ int _ASSERT_ARGS_CHECK = \
PARROT_ASSERT_ARG(interp) \
|| PARROT_ASSERT_ARG(ctx) \
|| PARROT_ASSERT_ARG(outer_ctx)
-#define ASSERT_ARGS_Parrot_cx_set_pc __attribute__unused__ int _ASSERT_ARGS_CHECK = \
+#define ASSERT_ARGS_Parrot_pcc_set_pc __attribute__unused__ int _ASSERT_ARGS_CHECK = \
PARROT_ASSERT_ARG(interp) \
|| PARROT_ASSERT_ARG(ctx)
-#define ASSERT_ARGS_Parrot_cx_set_pred_offset __attribute__unused__ int _ASSERT_ARGS_CHECK = \
+#define ASSERT_ARGS_Parrot_pcc_set_pred_offset __attribute__unused__ int _ASSERT_ARGS_CHECK = \
PARROT_ASSERT_ARG(interp) \
|| PARROT_ASSERT_ARG(ctx)
-#define ASSERT_ARGS_Parrot_cx_set_results __attribute__unused__ int _ASSERT_ARGS_CHECK = \
+#define ASSERT_ARGS_Parrot_pcc_set_results __attribute__unused__ int _ASSERT_ARGS_CHECK = \
PARROT_ASSERT_ARG(interp) \
|| PARROT_ASSERT_ARG(ctx)
-#define ASSERT_ARGS_Parrot_cx_set_sub __attribute__unused__ int _ASSERT_ARGS_CHECK = \
+#define ASSERT_ARGS_Parrot_pcc_set_sub __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 Sun Aug 30 08:58:32 2009 (r40860)
+++ branches/context_pmc3/include/parrot/interpreter.h Sun Aug 30 09:24:34 2009 (r40861)
@@ -205,7 +205,7 @@
* Not considered as part of public API. Should be replaced with proper accessor
* functions to manipulate Context.
*/
-#define CONTEXT_FIELD(interp, ctx, name) ((Parrot_cx_get_context((interp), (ctx)))->name)
+#define CONTEXT_FIELD(interp, ctx, name) ((Parrot_pcc_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 Sun Aug 30 08:58:32 2009 (r40860)
+++ branches/context_pmc3/include/parrot/register.h Sun Aug 30 09:24:34 2009 (r40861)
@@ -43,7 +43,7 @@
#define REGNO_STR 2
#define REGNO_PMC 3
-#define __CTX Parrot_cx_get_context(interp, interp->ctx)
+#define __CTX Parrot_pcc_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 Sun Aug 30 08:58:32 2009 (r40860)
+++ branches/context_pmc3/lib/Parrot/OpTrans/C.pm Sun Aug 30 09:24:34 2009 (r40861)
@@ -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_cx_constants(interp, interp->ctx)[cur_opcode[i]]
+#define CONST(i) Parrot_pcc_constants(interp, interp->ctx)[cur_opcode[i]]
END
}
Modified: branches/context_pmc3/lib/Parrot/OpTrans/CGP.pm
==============================================================================
--- branches/context_pmc3/lib/Parrot/OpTrans/CGP.pm Sun Aug 30 08:58:32 2009 (r40860)
+++ branches/context_pmc3/lib/Parrot/OpTrans/CGP.pm Sun Aug 30 09:24:34 2009 (r40861)
@@ -68,7 +68,7 @@
return $pred_def . <<END;
/* defines - $0 -> $type */
# define opcode_to_prederef(i, op) \\
- (opcode_t *) (op - Parrot_cx_get_pred_offset(interp, i->ctx))
+ (opcode_t *) (op - Parrot_pcc_get_pred_offset(interp, i->ctx))
END
}
@@ -107,7 +107,7 @@
my ( $self, $offset ) = @_;
# this must be a single expression, in case it's in a single-statement if
- return "do {\nParrot_cx_set_pc(interp, CONTEXT(interp), CUR_OPCODE + $offset);\n"
+ return "do {\nParrot_pcc_set_pc(interp, CONTEXT(interp), CUR_OPCODE + $offset);\n"
. "goto **(void **)(cur_opcode += $offset);\n} while (1)";
}
Modified: branches/context_pmc3/lib/Parrot/OpTrans/CGoto.pm
==============================================================================
--- branches/context_pmc3/lib/Parrot/OpTrans/CGoto.pm Sun Aug 30 08:58:32 2009 (r40860)
+++ branches/context_pmc3/lib/Parrot/OpTrans/CGoto.pm Sun Aug 30 09:24:34 2009 (r40861)
@@ -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_cx_constants(interp, interp->ctx)[i]
+#define CONST(i) Parrot_pcc_constants(interp, interp->ctx)[i]
END
}
Modified: branches/context_pmc3/lib/Parrot/OpTrans/CPrederef.pm
==============================================================================
--- branches/context_pmc3/lib/Parrot/OpTrans/CPrederef.pm Sun Aug 30 08:58:32 2009 (r40860)
+++ branches/context_pmc3/lib/Parrot/OpTrans/CPrederef.pm Sun Aug 30 09:24:34 2009 (r40861)
@@ -38,7 +38,7 @@
/* defines - $0 -> $type */
#define REL_PC ((size_t)(cur_opcode - (opcode_t*)interp->code->prederef.code))
#define CUR_OPCODE \\
- ((opcode_t*)cur_opcode + Parrot_cx_get_pred_offset(interp, CONTEXT(interp)))
+ ((opcode_t*)cur_opcode + Parrot_pcc_get_pred_offset(interp, CONTEXT(interp)))
#define OP_AS_OFFS(o) (_reg_base + ((opcode_t*)cur_opcode)[o])
END
Modified: branches/context_pmc3/lib/Parrot/OpTrans/CSwitch.pm
==============================================================================
--- branches/context_pmc3/lib/Parrot/OpTrans/CSwitch.pm Sun Aug 30 08:58:32 2009 (r40860)
+++ branches/context_pmc3/lib/Parrot/OpTrans/CSwitch.pm Sun Aug 30 09:24:34 2009 (r40861)
@@ -76,7 +76,7 @@
return $pred_def . <<END;
/* defines - $0 -> $type */
# define opcode_to_prederef(i, op) (op ? \\
- (opcode_t*) (op - Parrot_cx_get_pred_offset(interp, i->ctx)) : (opcode_t*)NULL)
+ (opcode_t*) (op - Parrot_pcc_get_pred_offset(interp, i->ctx)) : (opcode_t*)NULL)
END
}
Modified: branches/context_pmc3/lib/Parrot/Pmc2c/PCCMETHOD.pm
==============================================================================
--- branches/context_pmc3/lib/Parrot/Pmc2c/PCCMETHOD.pm Sun Aug 30 08:58:32 2009 (r40860)
+++ branches/context_pmc3/lib/Parrot/Pmc2c/PCCMETHOD.pm Sun Aug 30 09:24:34 2009 (r40861)
@@ -403,7 +403,7 @@
UNUSED(_return_indexes);
if (_caller_ctx) {
- _ccont = Parrot_cx_get_continuation(interp, _caller_ctx);
+ _ccont = Parrot_pcc_get_continuation(interp, _caller_ctx);
}
else {
/* there is no point calling Parrot_ex_throw_from_c_args here, because
@@ -411,7 +411,7 @@
exit_fatal(1, "No caller_ctx for continuation \%p.", _ccont);
}
- Parrot_cx_set_continuation(interp, _ctx, _ret_cont);
+ Parrot_pcc_set_continuation(interp, _ctx, _ret_cont);
PMC_cont(_ret_cont)->from_ctx = _ctx;
_current_args = interp->current_args;
@@ -429,7 +429,7 @@
if (PObj_get_FLAGS(_ccont) & SUB_FLAG_TAILCALL) {
PObj_get_FLAGS(_ccont) &= ~SUB_FLAG_TAILCALL;
- Parrot_cx_dec_recursion_depth(interp, _ctx);
+ Parrot_pcc_dec_recursion_depth(interp, _ctx);
CONTEXT_FIELD(interp, _ctx, caller_ctx) = CONTEXT_FIELD(interp, _caller_ctx, caller_ctx);
interp->current_args = NULL;
}
Modified: branches/context_pmc3/src/call/context.c
==============================================================================
--- branches/context_pmc3/src/call/context.c Sun Aug 30 08:58:32 2009 (r40860)
+++ branches/context_pmc3/src/call/context.c Sun Aug 30 09:24:34 2009 (r40861)
@@ -31,7 +31,7 @@
/*
-=item C<STRING* Parrot_cx_get_string_constant(PARROT_INTERP, PMC *ctx, INTVAL
+=item C<STRING* Parrot_pcc_get_string_constant(PARROT_INTERP, PMC *ctx, INTVAL
idx)>
Get string constant from context.
@@ -43,17 +43,17 @@
PARROT_EXPORT
PARROT_CAN_RETURN_NULL
STRING*
-Parrot_cx_get_string_constant(PARROT_INTERP, ARGIN(PMC *ctx), INTVAL idx)
+Parrot_pcc_get_string_constant(PARROT_INTERP, ARGIN(PMC *ctx), INTVAL idx)
{
- ASSERT_ARGS(Parrot_cx_get_string_constant)
- Parrot_Context const * c = Parrot_cx_get_context(interp, ctx);
+ ASSERT_ARGS(Parrot_pcc_get_string_constant)
+ Parrot_Context const * c = Parrot_pcc_get_context(interp, ctx);
return c->constants[idx]->u.string;
}
/*
-=item C<PMC* Parrot_cx_get_pmc_constant(PARROT_INTERP, PMC *ctx, INTVAL idx)>
+=item C<PMC* Parrot_pcc_get_pmc_constant(PARROT_INTERP, PMC *ctx, INTVAL idx)>
Get PMC constant from context.
@@ -64,17 +64,17 @@
PARROT_EXPORT
PARROT_CAN_RETURN_NULL
PMC*
-Parrot_cx_get_pmc_constant(PARROT_INTERP, ARGIN(PMC *ctx), INTVAL idx)
+Parrot_pcc_get_pmc_constant(PARROT_INTERP, ARGIN(PMC *ctx), INTVAL idx)
{
- ASSERT_ARGS(Parrot_cx_get_pmc_constant)
- Parrot_Context const * c = Parrot_cx_get_context(interp, ctx);
+ ASSERT_ARGS(Parrot_pcc_get_pmc_constant)
+ Parrot_Context const * c = Parrot_pcc_get_context(interp, ctx);
return c->constants[idx]->u.key;
}
/*
-=item C<struct PackFile_Constant ** Parrot_cx_constants(PARROT_INTERP, PMC
+=item C<struct PackFile_Constant ** Parrot_pcc_constants(PARROT_INTERP, PMC
*ctx)>
Get reference to constants.
@@ -85,9 +85,9 @@
PARROT_EXPORT
PARROT_CANNOT_RETURN_NULL
struct PackFile_Constant **
-Parrot_cx_constants(PARROT_INTERP, ARGIN(PMC *ctx))
+Parrot_pcc_constants(PARROT_INTERP, ARGIN(PMC *ctx))
{
- ASSERT_ARGS(Parrot_cx_constants)
+ ASSERT_ARGS(Parrot_pcc_constants)
return ((Parrot_Context*)(VTABLE_get_pointer(interp, ctx)))->constants;
}
@@ -95,7 +95,7 @@
/*
-=item C<Parrot_Context* Parrot_cx_get_context(PARROT_INTERP, PMC *ctx)>
+=item C<Parrot_Context* Parrot_pcc_get_context(PARROT_INTERP, PMC *ctx)>
Fetch Parrot_Context from Context PMC.
@@ -105,9 +105,9 @@
PARROT_EXPORT
PARROT_CAN_RETURN_NULL
Parrot_Context*
-Parrot_cx_get_context(PARROT_INTERP, ARGIN_NULLOK(PMC *ctx))
+Parrot_pcc_get_context(PARROT_INTERP, ARGIN_NULLOK(PMC *ctx))
{
- ASSERT_ARGS(Parrot_cx_get_context)
+ ASSERT_ARGS(Parrot_pcc_get_context)
if (PMC_IS_NULL(ctx))
return NULL;
@@ -116,7 +116,7 @@
/*
-=item C<UINTVAL Parrot_cx_get_recursion_depth(PARROT_INTERP, PMC *ctx)>
+=item C<UINTVAL Parrot_pcc_get_recursion_depth(PARROT_INTERP, PMC *ctx)>
Get recursion depth from context.
@@ -126,16 +126,16 @@
PARROT_EXPORT
UINTVAL
-Parrot_cx_get_recursion_depth(PARROT_INTERP, ARGIN(PMC *ctx))
+Parrot_pcc_get_recursion_depth(PARROT_INTERP, ARGIN(PMC *ctx))
{
- ASSERT_ARGS(Parrot_cx_get_recursion_depth)
- Parrot_Context *c = Parrot_cx_get_context(interp, ctx);
+ ASSERT_ARGS(Parrot_pcc_get_recursion_depth)
+ Parrot_Context *c = Parrot_pcc_get_context(interp, ctx);
return c->recursion_depth;
}
/*
-=item C<UINTVAL Parrot_cx_inc_recursion_depth(PARROT_INTERP, PMC *ctx)>
+=item C<UINTVAL Parrot_pcc_inc_recursion_depth(PARROT_INTERP, PMC *ctx)>
Increase recurtion depth. Returns new recursion_depth value.
@@ -145,16 +145,16 @@
PARROT_EXPORT
UINTVAL
-Parrot_cx_inc_recursion_depth(PARROT_INTERP, ARGIN(PMC *ctx))
+Parrot_pcc_inc_recursion_depth(PARROT_INTERP, ARGIN(PMC *ctx))
{
- ASSERT_ARGS(Parrot_cx_inc_recursion_depth)
- Parrot_Context *c = Parrot_cx_get_context(interp, ctx);
+ ASSERT_ARGS(Parrot_pcc_inc_recursion_depth)
+ Parrot_Context *c = Parrot_pcc_get_context(interp, ctx);
return ++c->recursion_depth;
}
/*
-=item C<UINTVAL Parrot_cx_dec_recursion_depth(PARROT_INTERP, PMC *ctx)>
+=item C<UINTVAL Parrot_pcc_dec_recursion_depth(PARROT_INTERP, PMC *ctx)>
Decrease recurtion depth. Returns new recursion_depth value.
@@ -164,16 +164,16 @@
PARROT_EXPORT
UINTVAL
-Parrot_cx_dec_recursion_depth(PARROT_INTERP, ARGIN(PMC *ctx))
+Parrot_pcc_dec_recursion_depth(PARROT_INTERP, ARGIN(PMC *ctx))
{
- ASSERT_ARGS(Parrot_cx_dec_recursion_depth)
- Parrot_Context *c = Parrot_cx_get_context(interp, ctx);
+ ASSERT_ARGS(Parrot_pcc_dec_recursion_depth)
+ Parrot_Context *c = Parrot_pcc_get_context(interp, ctx);
return --c->recursion_depth;
}
/*
-=item C<PMC* Parrot_cx_get_caller_ctx(PARROT_INTERP, PMC *ctx)>
+=item C<PMC* Parrot_pcc_get_caller_ctx(PARROT_INTERP, PMC *ctx)>
Get caller Context.
@@ -183,17 +183,18 @@
PARROT_EXPORT
PMC*
-Parrot_cx_get_caller_ctx(PARROT_INTERP, ARGIN(PMC *ctx))
+Parrot_pcc_get_caller_ctx(PARROT_INTERP, ARGIN(PMC *ctx))
{
- ASSERT_ARGS(Parrot_cx_get_caller_ctx)
- Parrot_Context *c = Parrot_cx_get_context(interp, ctx);
+ ASSERT_ARGS(Parrot_pcc_get_caller_ctx)
+ Parrot_Context *c = Parrot_pcc_get_context(interp, ctx);
return c->caller_ctx;
}
/*
-=item C<void Parrot_cx_set_caller_ctx(PARROT_INTERP, PMC *ctx, PMC *caller_ctx)>
+=item C<void Parrot_pcc_set_caller_ctx(PARROT_INTERP, PMC *ctx, PMC
+*caller_ctx)>
Set caller Context.
@@ -203,16 +204,16 @@
PARROT_EXPORT
void
-Parrot_cx_set_caller_ctx(PARROT_INTERP, ARGIN(PMC *ctx), ARGIN(PMC *caller_ctx))
+Parrot_pcc_set_caller_ctx(PARROT_INTERP, ARGIN(PMC *ctx), ARGIN(PMC *caller_ctx))
{
- ASSERT_ARGS(Parrot_cx_set_caller_ctx)
- Parrot_Context *c = Parrot_cx_get_context(interp, ctx);
+ ASSERT_ARGS(Parrot_pcc_set_caller_ctx)
+ Parrot_Context *c = Parrot_pcc_get_context(interp, ctx);
c->caller_ctx = caller_ctx;
}
/*
-=item C<PMC* Parrot_cx_get_outer_ctx(PARROT_INTERP, PMC *ctx)>
+=item C<PMC* Parrot_pcc_get_outer_ctx(PARROT_INTERP, PMC *ctx)>
Get outer Context.
@@ -222,17 +223,17 @@
PARROT_EXPORT
PMC*
-Parrot_cx_get_outer_ctx(PARROT_INTERP, ARGIN(PMC *ctx))
+Parrot_pcc_get_outer_ctx(PARROT_INTERP, ARGIN(PMC *ctx))
{
- ASSERT_ARGS(Parrot_cx_get_outer_ctx)
- Parrot_Context *c = Parrot_cx_get_context(interp, ctx);
+ ASSERT_ARGS(Parrot_pcc_get_outer_ctx)
+ Parrot_Context *c = Parrot_pcc_get_context(interp, ctx);
return c->outer_ctx;
}
/*
-=item C<void Parrot_cx_set_outer_ctx(PARROT_INTERP, PMC *ctx, PMC *outer_ctx)>
+=item C<void Parrot_pcc_set_outer_ctx(PARROT_INTERP, PMC *ctx, PMC *outer_ctx)>
Set outer Context.
@@ -242,16 +243,16 @@
PARROT_EXPORT
void
-Parrot_cx_set_outer_ctx(PARROT_INTERP, ARGIN(PMC *ctx), ARGIN(PMC *outer_ctx))
+Parrot_pcc_set_outer_ctx(PARROT_INTERP, ARGIN(PMC *ctx), ARGIN(PMC *outer_ctx))
{
- ASSERT_ARGS(Parrot_cx_set_outer_ctx)
- Parrot_Context *c = Parrot_cx_get_context(interp, ctx);
+ ASSERT_ARGS(Parrot_pcc_set_outer_ctx)
+ Parrot_Context *c = Parrot_pcc_get_context(interp, ctx);
c->outer_ctx = outer_ctx;
}
/*
-=item C<PMC* Parrot_cx_get_lex_pad(PARROT_INTERP, PMC *ctx)>
+=item C<PMC* Parrot_pcc_get_lex_pad(PARROT_INTERP, PMC *ctx)>
Get LexPad.
@@ -261,17 +262,17 @@
PARROT_EXPORT
PMC*
-Parrot_cx_get_lex_pad(PARROT_INTERP, ARGIN(PMC *ctx))
+Parrot_pcc_get_lex_pad(PARROT_INTERP, ARGIN(PMC *ctx))
{
- ASSERT_ARGS(Parrot_cx_get_lex_pad)
- Parrot_Context *c = Parrot_cx_get_context(interp, ctx);
+ ASSERT_ARGS(Parrot_pcc_get_lex_pad)
+ Parrot_Context *c = Parrot_pcc_get_context(interp, ctx);
return c->lex_pad;
}
/*
-=item C<void Parrot_cx_set_lex_pad(PARROT_INTERP, PMC *ctx, PMC *lex_pad)>
+=item C<void Parrot_pcc_set_lex_pad(PARROT_INTERP, PMC *ctx, PMC *lex_pad)>
Set LexPad.
@@ -281,16 +282,16 @@
PARROT_EXPORT
void
-Parrot_cx_set_lex_pad(PARROT_INTERP, ARGIN(PMC *ctx), ARGIN(PMC *lex_pad))
+Parrot_pcc_set_lex_pad(PARROT_INTERP, ARGIN(PMC *ctx), ARGIN(PMC *lex_pad))
{
- ASSERT_ARGS(Parrot_cx_set_lex_pad)
- Parrot_Context *c = Parrot_cx_get_context(interp, ctx);
+ ASSERT_ARGS(Parrot_pcc_set_lex_pad)
+ Parrot_Context *c = Parrot_pcc_get_context(interp, ctx);
c->lex_pad = lex_pad;
}
/*
-=item C<PMC* Parrot_cx_get_namespace(PARROT_INTERP, PMC *ctx)>
+=item C<PMC* Parrot_pcc_get_namespace(PARROT_INTERP, PMC *ctx)>
Get namespace of Context.
@@ -300,17 +301,17 @@
PARROT_EXPORT
PMC*
-Parrot_cx_get_namespace(PARROT_INTERP, ARGIN(PMC *ctx))
+Parrot_pcc_get_namespace(PARROT_INTERP, ARGIN(PMC *ctx))
{
- ASSERT_ARGS(Parrot_cx_get_namespace)
- Parrot_Context *c = Parrot_cx_get_context(interp, ctx);
+ ASSERT_ARGS(Parrot_pcc_get_namespace)
+ Parrot_Context *c = Parrot_pcc_get_context(interp, ctx);
return c->current_namespace;
}
/*
-=item C<void Parrot_cx_set_namespace(PARROT_INTERP, PMC *ctx, PMC *_namespace)>
+=item C<void Parrot_pcc_set_namespace(PARROT_INTERP, PMC *ctx, PMC *_namespace)>
Set namespace of Context.
@@ -320,16 +321,16 @@
PARROT_EXPORT
void
-Parrot_cx_set_namespace(PARROT_INTERP, ARGIN(PMC *ctx), ARGIN_NULLOK(PMC *_namespace))
+Parrot_pcc_set_namespace(PARROT_INTERP, ARGIN(PMC *ctx), ARGIN_NULLOK(PMC *_namespace))
{
- ASSERT_ARGS(Parrot_cx_set_namespace)
- Parrot_Context *c = Parrot_cx_get_context(interp, ctx);
+ ASSERT_ARGS(Parrot_pcc_set_namespace)
+ Parrot_Context *c = Parrot_pcc_get_context(interp, ctx);
c->current_namespace = _namespace;
}
/*
-=item C<INTVAL Parrot_cx_get_HLL(PARROT_INTERP, PMC *ctx)>
+=item C<INTVAL Parrot_pcc_get_HLL(PARROT_INTERP, PMC *ctx)>
Get HLL of Context.
@@ -339,17 +340,17 @@
PARROT_EXPORT
INTVAL
-Parrot_cx_get_HLL(PARROT_INTERP, ARGIN(PMC *ctx))
+Parrot_pcc_get_HLL(PARROT_INTERP, ARGIN(PMC *ctx))
{
- ASSERT_ARGS(Parrot_cx_get_HLL)
- Parrot_Context *c = Parrot_cx_get_context(interp, ctx);
+ ASSERT_ARGS(Parrot_pcc_get_HLL)
+ Parrot_Context *c = Parrot_pcc_get_context(interp, ctx);
return c->current_HLL;
}
/*
-=item C<void Parrot_cx_set_HLL(PARROT_INTERP, PMC *ctx, INTVAL hll)>
+=item C<void Parrot_pcc_set_HLL(PARROT_INTERP, PMC *ctx, INTVAL hll)>
Set HLL of Context.
@@ -359,16 +360,16 @@
PARROT_EXPORT
void
-Parrot_cx_set_HLL(PARROT_INTERP, ARGIN(PMC *ctx), INTVAL hll)
+Parrot_pcc_set_HLL(PARROT_INTERP, ARGIN(PMC *ctx), INTVAL hll)
{
- ASSERT_ARGS(Parrot_cx_set_HLL)
- Parrot_Context *c = Parrot_cx_get_context(interp, ctx);
+ ASSERT_ARGS(Parrot_pcc_set_HLL)
+ Parrot_Context *c = Parrot_pcc_get_context(interp, ctx);
c->current_HLL = hll;
}
/*
-=item C<PMC* Parrot_cx_get_continuation(PARROT_INTERP, PMC *ctx)>
+=item C<PMC* Parrot_pcc_get_continuation(PARROT_INTERP, PMC *ctx)>
Get continuation of Context.
@@ -378,17 +379,17 @@
PARROT_EXPORT
PMC*
-Parrot_cx_get_continuation(PARROT_INTERP, ARGIN(PMC *ctx))
+Parrot_pcc_get_continuation(PARROT_INTERP, ARGIN(PMC *ctx))
{
- ASSERT_ARGS(Parrot_cx_get_continuation)
- Parrot_Context *c = Parrot_cx_get_context(interp, ctx);
+ ASSERT_ARGS(Parrot_pcc_get_continuation)
+ Parrot_Context *c = Parrot_pcc_get_context(interp, ctx);
return c->current_cont;
}
/*
-=item C<void Parrot_cx_set_continuation(PARROT_INTERP, PMC *ctx, PMC
+=item C<void Parrot_pcc_set_continuation(PARROT_INTERP, PMC *ctx, PMC
*_continuation)>
Set continuation of Context.
@@ -399,16 +400,16 @@
PARROT_EXPORT
void
-Parrot_cx_set_continuation(PARROT_INTERP, ARGIN(PMC *ctx), ARGIN_NULLOK(PMC *_continuation))
+Parrot_pcc_set_continuation(PARROT_INTERP, ARGIN(PMC *ctx), ARGIN_NULLOK(PMC *_continuation))
{
- ASSERT_ARGS(Parrot_cx_set_continuation)
- Parrot_Context *c = Parrot_cx_get_context(interp, ctx);
+ ASSERT_ARGS(Parrot_pcc_set_continuation)
+ Parrot_Context *c = Parrot_pcc_get_context(interp, ctx);
c->current_cont = _continuation;
}
/*
-=item C<PMC* Parrot_cx_get_object(PARROT_INTERP, PMC *ctx)>
+=item C<PMC* Parrot_pcc_get_object(PARROT_INTERP, PMC *ctx)>
Get object of Context (in method call).
@@ -418,17 +419,17 @@
PARROT_EXPORT
PMC*
-Parrot_cx_get_object(PARROT_INTERP, ARGIN(PMC *ctx))
+Parrot_pcc_get_object(PARROT_INTERP, ARGIN(PMC *ctx))
{
- ASSERT_ARGS(Parrot_cx_get_object)
- Parrot_Context *c = Parrot_cx_get_context(interp, ctx);
+ ASSERT_ARGS(Parrot_pcc_get_object)
+ Parrot_Context *c = Parrot_pcc_get_context(interp, ctx);
return c->current_object;
}
/*
-=item C<void Parrot_cx_set_object(PARROT_INTERP, PMC *ctx, PMC *object)>
+=item C<void Parrot_pcc_set_object(PARROT_INTERP, PMC *ctx, PMC *object)>
Set object of Context (in method call).
@@ -438,16 +439,16 @@
PARROT_EXPORT
void
-Parrot_cx_set_object(PARROT_INTERP, ARGIN(PMC *ctx), ARGIN_NULLOK(PMC *object))
+Parrot_pcc_set_object(PARROT_INTERP, ARGIN(PMC *ctx), ARGIN_NULLOK(PMC *object))
{
- ASSERT_ARGS(Parrot_cx_set_object)
- Parrot_Context *c = Parrot_cx_get_context(interp, ctx);
+ ASSERT_ARGS(Parrot_pcc_set_object)
+ Parrot_Context *c = Parrot_pcc_get_context(interp, ctx);
c->current_object = object;
}
/*
-=item C<PMC* Parrot_cx_get_sub(PARROT_INTERP, PMC *ctx)>
+=item C<PMC* Parrot_pcc_get_sub(PARROT_INTERP, PMC *ctx)>
Get Sub executed inside Context.
@@ -457,17 +458,17 @@
PARROT_EXPORT
PMC*
-Parrot_cx_get_sub(PARROT_INTERP, ARGIN(PMC *ctx))
+Parrot_pcc_get_sub(PARROT_INTERP, ARGIN(PMC *ctx))
{
- ASSERT_ARGS(Parrot_cx_get_sub)
- Parrot_Context *c = Parrot_cx_get_context(interp, ctx);
+ ASSERT_ARGS(Parrot_pcc_get_sub)
+ Parrot_Context *c = Parrot_pcc_get_context(interp, ctx);
return c->current_sub;
}
/*
-=item C<void Parrot_cx_set_sub(PARROT_INTERP, PMC *ctx, PMC *sub)>
+=item C<void Parrot_pcc_set_sub(PARROT_INTERP, PMC *ctx, PMC *sub)>
Set Sub executed inside Context.
@@ -477,16 +478,16 @@
PARROT_EXPORT
void
-Parrot_cx_set_sub(PARROT_INTERP, ARGIN(PMC *ctx), ARGIN_NULLOK(PMC *sub))
+Parrot_pcc_set_sub(PARROT_INTERP, ARGIN(PMC *ctx), ARGIN_NULLOK(PMC *sub))
{
- ASSERT_ARGS(Parrot_cx_set_sub)
- Parrot_Context *c = Parrot_cx_get_context(interp, ctx);
+ ASSERT_ARGS(Parrot_pcc_set_sub)
+ Parrot_Context *c = Parrot_pcc_get_context(interp, ctx);
c->current_sub = sub;
}
/*
-=item C<opcode_t* Parrot_cx_get_pc(PARROT_INTERP, PMC *ctx)>
+=item C<opcode_t* Parrot_pcc_get_pc(PARROT_INTERP, PMC *ctx)>
Get program counter of Sub invocation.
@@ -496,17 +497,17 @@
PARROT_EXPORT
opcode_t*
-Parrot_cx_get_pc(PARROT_INTERP, ARGIN(PMC *ctx))
+Parrot_pcc_get_pc(PARROT_INTERP, ARGIN(PMC *ctx))
{
- ASSERT_ARGS(Parrot_cx_get_pc)
- Parrot_Context *c = Parrot_cx_get_context(interp, ctx);
+ ASSERT_ARGS(Parrot_pcc_get_pc)
+ Parrot_Context *c = Parrot_pcc_get_context(interp, ctx);
return c->current_pc;
}
/*
-=item C<void Parrot_cx_set_pc(PARROT_INTERP, PMC *ctx, opcode_t *pc)>
+=item C<void Parrot_pcc_set_pc(PARROT_INTERP, PMC *ctx, opcode_t *pc)>
Set program counter of Sub invocation.
@@ -516,16 +517,16 @@
PARROT_EXPORT
void
-Parrot_cx_set_pc(PARROT_INTERP, ARGIN(PMC *ctx), ARGIN_NULLOK(opcode_t *pc))
+Parrot_pcc_set_pc(PARROT_INTERP, ARGIN(PMC *ctx), ARGIN_NULLOK(opcode_t *pc))
{
- ASSERT_ARGS(Parrot_cx_set_pc)
- Parrot_Context *c = Parrot_cx_get_context(interp, ctx);
+ ASSERT_ARGS(Parrot_pcc_set_pc)
+ Parrot_Context *c = Parrot_pcc_get_context(interp, ctx);
c->current_pc = pc;
}
/*
-=item C<opcode_t* Parrot_cx_get_results(PARROT_INTERP, PMC *ctx)>
+=item C<opcode_t* Parrot_pcc_get_results(PARROT_INTERP, PMC *ctx)>
Set ptr into code with get_results opcode.
@@ -535,17 +536,17 @@
PARROT_EXPORT
opcode_t*
-Parrot_cx_get_results(PARROT_INTERP, ARGIN(PMC *ctx))
+Parrot_pcc_get_results(PARROT_INTERP, ARGIN(PMC *ctx))
{
- ASSERT_ARGS(Parrot_cx_get_results)
- Parrot_Context *c = Parrot_cx_get_context(interp, ctx);
+ ASSERT_ARGS(Parrot_pcc_get_results)
+ Parrot_Context *c = Parrot_pcc_get_context(interp, ctx);
return c->current_results;
}
/*
-=item C<void Parrot_cx_set_results(PARROT_INTERP, PMC *ctx, opcode_t *pc)>
+=item C<void Parrot_pcc_set_results(PARROT_INTERP, PMC *ctx, opcode_t *pc)>
Set ptr into code with get_results opcode.
@@ -555,17 +556,17 @@
PARROT_EXPORT
void
-Parrot_cx_set_results(PARROT_INTERP, ARGIN(PMC *ctx), ARGIN_NULLOK(opcode_t *pc))
+Parrot_pcc_set_results(PARROT_INTERP, ARGIN(PMC *ctx), ARGIN_NULLOK(opcode_t *pc))
{
- ASSERT_ARGS(Parrot_cx_set_results)
- Parrot_Context *c = Parrot_cx_get_context(interp, ctx);
+ ASSERT_ARGS(Parrot_pcc_set_results)
+ Parrot_Context *c = Parrot_pcc_get_context(interp, ctx);
c->current_results = pc;
}
/*
-=item C<size_t Parrot_cx_get_pred_offset(PARROT_INTERP, PMC *ctx)>
+=item C<size_t Parrot_pcc_get_pred_offset(PARROT_INTERP, PMC *ctx)>
Get pred_offset
@@ -575,17 +576,17 @@
PARROT_EXPORT
size_t
-Parrot_cx_get_pred_offset(PARROT_INTERP, ARGIN(PMC *ctx))
+Parrot_pcc_get_pred_offset(PARROT_INTERP, ARGIN(PMC *ctx))
{
- ASSERT_ARGS(Parrot_cx_get_pred_offset)
- Parrot_Context *c = Parrot_cx_get_context(interp, ctx);
+ ASSERT_ARGS(Parrot_pcc_get_pred_offset)
+ Parrot_Context *c = Parrot_pcc_get_context(interp, ctx);
return c->pred_offset;
}
/*
-=item C<void Parrot_cx_set_pred_offset(PARROT_INTERP, PMC *ctx, size_t
+=item C<void Parrot_pcc_set_pred_offset(PARROT_INTERP, PMC *ctx, size_t
pred_offset)>
Set pred_offset
@@ -596,10 +597,10 @@
PARROT_EXPORT
void
-Parrot_cx_set_pred_offset(PARROT_INTERP, ARGIN(PMC *ctx), size_t pred_offset)
+Parrot_pcc_set_pred_offset(PARROT_INTERP, ARGIN(PMC *ctx), size_t pred_offset)
{
- ASSERT_ARGS(Parrot_cx_set_pred_offset)
- Parrot_Context *c = Parrot_cx_get_context(interp, ctx);
+ ASSERT_ARGS(Parrot_pcc_set_pred_offset)
+ Parrot_Context *c = Parrot_pcc_get_context(interp, ctx);
c->pred_offset = pred_offset;
}
Modified: branches/context_pmc3/src/call/pcc.c
==============================================================================
--- branches/context_pmc3/src/call/pcc.c Sun Aug 30 08:58:32 2009 (r40860)
+++ branches/context_pmc3/src/call/pcc.c Sun Aug 30 09:24:34 2009 (r40861)
@@ -516,7 +516,7 @@
{
ASSERT_ARGS(Parrot_init_ret_nci)
PMC *ctx = CONTEXT(interp);
- PMC * const current_cont = Parrot_cx_get_continuation(interp, ctx);
+ PMC * const current_cont = Parrot_pcc_get_continuation(interp, ctx);
/* if this NCI call was a taicall, return results to caller's get_results
* this also means that we pass the caller's register base pointer */
@@ -530,10 +530,10 @@
* in the constants table. */
if (CONTEXT_FIELD(interp, ctx, results_signature))
Parrot_init_arg_indexes_and_sig_pmc(interp, ctx,
- Parrot_cx_get_results(interp, ctx),
+ Parrot_pcc_get_results(interp, ctx),
CONTEXT_FIELD(interp, ctx, results_signature), &st->dest);
else
- Parrot_init_arg_op(interp, ctx, Parrot_cx_get_results(interp, ctx), &st->dest);
+ Parrot_init_arg_op(interp, ctx, Parrot_pcc_get_results(interp, ctx), &st->dest);
}
@@ -780,7 +780,7 @@
break;
case PARROT_ARG_PMC:
if (st->src.u.sig.sig[st->src.i] == 'O')
- UVal_pmc(st->val) = Parrot_cx_get_object(interp, CONTEXT(interp));
+ UVal_pmc(st->val) = Parrot_pcc_get_object(interp, CONTEXT(interp));
else {
UVal_pmc(st->val) = va_arg(*ap, PMC *);
}
@@ -836,7 +836,7 @@
/* ensure that callees don't modify constant caller strings */
if (constant)
UVal_str(st->val) = Parrot_str_new_COW(interp,
- Parrot_cx_get_string_constant(interp, st->src.ctx, idx));
+ Parrot_pcc_get_string_constant(interp, st->src.ctx, idx));
else
UVal_str(st->val) = CTX_REG_STR(st->src.ctx, idx);
@@ -847,7 +847,7 @@
: CTX_REG_NUM(st->src.ctx, idx);
break;
case PARROT_ARG_PMC:
- UVal_pmc(st->val) = constant ? Parrot_cx_get_pmc_constant(interp, st->src.ctx, idx)
+ UVal_pmc(st->val) = constant ? Parrot_pcc_get_pmc_constant(interp, st->src.ctx, idx)
: CTX_REG_PMC(st->src.ctx, idx);
if (st->src.sig & PARROT_ARG_FLATTEN) {
@@ -1321,7 +1321,7 @@
n_named++;
idx = st->dest.u.op.pc[i];
param = PARROT_ARG_CONSTANT_ISSET(st->dest.sig)
- ? Parrot_cx_get_string_constant(interp, st->dest.ctx, idx)
+ ? Parrot_pcc_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)) {
@@ -1574,7 +1574,7 @@
else {
const INTVAL idx = st->dest.u.op.pc[last_name_pos];
STRING * const param = PARROT_ARG_CONSTANT_ISSET(sig)
- ? Parrot_cx_get_string_constant(interp, st->dest.ctx, idx)
+ ? Parrot_pcc_get_string_constant(interp, st->dest.ctx, idx)
: CTX_REG_STR(st->dest.ctx, idx);
Parrot_ex_throw_from_c_args(interp, NULL,
@@ -2631,7 +2631,7 @@
interp->current_args = indexes[0];
interp->args_signature = sigs[0];
- Parrot_cx_set_results(interp, ctx, indexes[1]);
+ Parrot_pcc_set_results(interp, ctx, indexes[1]);
CONTEXT_FIELD(interp, ctx, results_signature) = sigs[1];
return ret_x;
}
@@ -2866,14 +2866,14 @@
interp->current_args = arg_indexes;
interp->args_signature = args_sig;
- Parrot_cx_set_results(interp, ctx, result_indexes);
+ Parrot_pcc_set_results(interp, ctx, result_indexes);
CONTEXT_FIELD(interp, ctx, results_signature) = results_sig;
/* arg_accessors assigned in loop above */
interp->current_object = pmc;
interp->current_cont = NEED_CONTINUATION;
- Parrot_cx_set_continuation(interp, ctx, ret_cont);
+ Parrot_pcc_set_continuation(interp, ctx, ret_cont);
PMC_cont(ret_cont)->from_ctx = ctx;
pccinvoke_meth = VTABLE_find_method(interp, pmc, method_name);
@@ -3016,7 +3016,7 @@
interp->current_object = PMCNULL;
}
interp->current_cont = NEED_CONTINUATION;
- Parrot_cx_set_continuation(interp, ctx, ret_cont);
+ Parrot_pcc_set_continuation(interp, ctx, ret_cont);
PMC_cont(ret_cont)->from_ctx = ctx;
/* Invoke the function */
Modified: branches/context_pmc3/src/debug.c
==============================================================================
--- branches/context_pmc3/src/debug.c Sun Aug 30 08:58:32 2009 (r40860)
+++ branches/context_pmc3/src/debug.c Sun Aug 30 09:24:34 2009 (r40861)
@@ -3520,7 +3520,7 @@
Parrot_io_eprintf(interp, "%Ss", str);
if (interp->code->annotations) {
PMC *annot = PackFile_Annotations_lookup(interp, interp->code->annotations,
- Parrot_cx_get_pc(interp, ctx) - interp->code->base.data + 1, NULL);
+ Parrot_pcc_get_pc(interp, ctx) - interp->code->base.data + 1, NULL);
if (!PMC_IS_NULL(annot)) {
PMC *pfile = VTABLE_get_pmc_keyed_str(interp, annot,
Parrot_str_new_constant(interp, "file"));
@@ -3540,7 +3540,7 @@
/* backtrace: follow the continuation chain */
while (1) {
Parrot_cont *sub_cont;
- sub = Parrot_cx_get_continuation(interp, ctx);
+ sub = Parrot_pcc_get_continuation(interp, ctx);
if (PMC_IS_NULL(sub))
break;
@@ -3557,10 +3557,10 @@
/* recursion detection */
if (!PMC_IS_NULL(old) && PMC_cont(old) &&
- Parrot_cx_get_pc(interp, PMC_cont(old)->to_ctx) ==
- Parrot_cx_get_pc(interp, PMC_cont(sub)->to_ctx) &&
- Parrot_cx_get_sub(interp, PMC_cont(old)->to_ctx) ==
- Parrot_cx_get_sub(interp, PMC_cont(sub)->to_ctx)) {
+ Parrot_pcc_get_pc(interp, PMC_cont(old)->to_ctx) ==
+ Parrot_pcc_get_pc(interp, PMC_cont(sub)->to_ctx) &&
+ Parrot_pcc_get_sub(interp, PMC_cont(old)->to_ctx) ==
+ Parrot_pcc_get_sub(interp, PMC_cont(sub)->to_ctx)) {
++rec_level;
}
else if (rec_level != 0) {
@@ -3573,7 +3573,7 @@
Parrot_io_eprintf(interp, "%Ss", str);
if (interp->code->annotations) {
PMC *annot = PackFile_Annotations_lookup(interp, interp->code->annotations,
- Parrot_cx_get_pc(interp, sub_cont->to_ctx) - interp->code->base.data + 1,
+ Parrot_pcc_get_pc(interp, sub_cont->to_ctx) - interp->code->base.data + 1,
NULL);
if (!PMC_IS_NULL(annot)) {
Modified: branches/context_pmc3/src/embed.c
==============================================================================
--- branches/context_pmc3/src/embed.c Sun Aug 30 08:58:32 2009 (r40860)
+++ branches/context_pmc3/src/embed.c Sun Aug 30 09:24:34 2009 (r40861)
@@ -910,8 +910,8 @@
const size_t offs = sub->start_offs;
if (offs == interp->resume_offset) {
- Parrot_cx_set_sub(interp, CONTEXT(interp), sub_pmc);
- Parrot_cx_set_HLL(interp, CONTEXT(interp), sub->HLL_id);
+ Parrot_pcc_set_sub(interp, CONTEXT(interp), sub_pmc);
+ Parrot_pcc_set_HLL(interp, CONTEXT(interp), sub->HLL_id);
return sub_pmc;
}
@@ -925,7 +925,7 @@
sub_pmc = pmc_new(interp, enum_class_Sub);
PMC_get_sub(interp, sub_pmc, sub_pmc_sub);
sub_pmc_sub->start_offs = 0;
- Parrot_cx_set_sub(interp, CONTEXT(interp), sub_pmc);
+ Parrot_pcc_set_sub(interp, CONTEXT(interp), sub_pmc);
return sub_pmc;
}
@@ -970,14 +970,14 @@
Parrot_on_exit(interp, print_profile, NULL);
/* Let's kick the tires and light the fires--call interpreter.c:runops. */
- main_sub = Parrot_cx_get_sub(interp, CONTEXT(interp));
+ main_sub = Parrot_pcc_get_sub(interp, CONTEXT(interp));
/* if no sub was marked being :main, we create a dummy sub with offset 0 */
if (!main_sub)
main_sub = set_current_sub(interp);
- Parrot_cx_set_sub(interp, CONTEXT(interp), NULL);
+ Parrot_pcc_set_sub(interp, CONTEXT(interp), NULL);
CURRENT_CONTEXT_FIELD(interp, constants) = interp->code->const_table->constants;
Parrot_runops_fromc_args(interp, main_sub, "vP", userargv);
Modified: branches/context_pmc3/src/exceptions.c
==============================================================================
--- branches/context_pmc3/src/exceptions.c Sun Aug 30 08:58:32 2009 (r40860)
+++ branches/context_pmc3/src/exceptions.c Sun Aug 30 09:24:34 2009 (r40861)
@@ -390,7 +390,7 @@
/* Note the thrower.
* XXX TT#596 - pass in current context instead when we have context PMCs. */
/* Don't split line. It will break CONST_STRING handling */
- VTABLE_set_attr_str(interp, exception, CONST_STRING(interp, "thrower"), Parrot_cx_get_continuation(interp, CONTEXT(interp)));
+ VTABLE_set_attr_str(interp, exception, CONST_STRING(interp, "thrower"), Parrot_pcc_get_continuation(interp, CONTEXT(interp)));
/* it's a C exception handler */
if (PObj_get_FLAGS(handler) & SUB_FLAG_C_HANDLER) {
Modified: branches/context_pmc3/src/gc/alloc_register.c
==============================================================================
--- branches/context_pmc3/src/gc/alloc_register.c Sun Aug 30 08:58:32 2009 (r40860)
+++ branches/context_pmc3/src/gc/alloc_register.c Sun Aug 30 09:24:34 2009 (r40861)
@@ -219,7 +219,7 @@
{
ASSERT_ARGS(clear_regs)
int i;
- Parrot_Context *ctx = Parrot_cx_get_context(interp, pmcctx);
+ Parrot_Context *ctx = Parrot_pcc_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_cx_get_context(interp, pmcctx);
- Parrot_Context *old = Parrot_cx_get_context(interp, pmcold);
+ Parrot_Context *ctx = Parrot_pcc_get_context(interp, pmcctx);
+ Parrot_Context *old = Parrot_pcc_get_context(interp, pmcold);
ctx->current_results = NULL;
ctx->results_signature = NULL;
@@ -322,10 +322,10 @@
PMC * const old = CONTEXT(interp);
PMC * const ctx = Parrot_set_new_context(interp, n_regs_used);
- Parrot_cx_set_caller_ctx(interp, ctx, old);
+ Parrot_pcc_set_caller_ctx(interp, ctx, old);
/* doesn't change */
- Parrot_cx_set_sub(interp, ctx, Parrot_cx_get_sub(interp, old));
+ Parrot_pcc_set_sub(interp, ctx, Parrot_pcc_get_sub(interp, old));
/* copy more ? */
return ctx;
@@ -349,7 +349,7 @@
{
ASSERT_ARGS(Parrot_pop_context)
PMC * const ctx = CONTEXT(interp);
- PMC * const old = Parrot_cx_get_caller_ctx(interp, ctx);
+ PMC * const old = Parrot_pcc_get_caller_ctx(interp, ctx);
/* restore old, set cached interpreter base pointers */
CONTEXT(interp) = old;
Modified: branches/context_pmc3/src/global.c
==============================================================================
--- branches/context_pmc3/src/global.c Sun Aug 30 08:58:32 2009 (r40860)
+++ branches/context_pmc3/src/global.c Sun Aug 30 09:24:34 2009 (r40861)
@@ -375,10 +375,10 @@
ASSERT_ARGS(Parrot_make_namespace_autobase)
PMC *base_ns;
if (VTABLE_isa(interp, key, CONST_STRING(interp, "String")))
- base_ns = Parrot_cx_get_namespace(interp, CONTEXT(interp));
+ base_ns = Parrot_pcc_get_namespace(interp, CONTEXT(interp));
else
base_ns = VTABLE_get_pmc_keyed_int(interp, interp->HLL_namespace,
- Parrot_cx_get_HLL(interp, CONTEXT(interp)));
+ Parrot_pcc_get_HLL(interp, CONTEXT(interp)));
return Parrot_make_namespace_keyed(interp, base_ns, key);
}
@@ -531,7 +531,7 @@
Parrot_find_global_cur(PARROT_INTERP, ARGIN_NULLOK(STRING *globalname))
{
ASSERT_ARGS(Parrot_find_global_cur)
- PMC * const ns = Parrot_cx_get_namespace(interp, CONTEXT(interp));
+ PMC * const ns = Parrot_pcc_get_namespace(interp, CONTEXT(interp));
return Parrot_find_global_n(interp, ns, globalname);
}
@@ -788,7 +788,7 @@
Parrot_store_sub_in_namespace(PARROT_INTERP, ARGIN(PMC *sub_pmc))
{
ASSERT_ARGS(Parrot_store_sub_in_namespace)
- const INTVAL cur_id = Parrot_cx_get_HLL(interp, CONTEXT(interp));
+ const INTVAL cur_id = Parrot_pcc_get_HLL(interp, CONTEXT(interp));
PMC *ns;
Parrot_Sub_attributes *sub;
@@ -798,7 +798,7 @@
/* store relative to HLL namespace */
PMC_get_sub(interp, sub_pmc, sub);
- Parrot_cx_set_HLL(interp, CONTEXT(interp), sub->HLL_id);
+ Parrot_pcc_set_HLL(interp, CONTEXT(interp), sub->HLL_id);
ns = get_namespace_pmc(interp, sub_pmc);
@@ -824,7 +824,7 @@
}
/* restore HLL_id */
- Parrot_cx_set_HLL(interp, CONTEXT(interp), cur_id);
+ Parrot_pcc_set_HLL(interp, CONTEXT(interp), cur_id);
Parrot_unblock_GC_mark(interp);
}
Modified: branches/context_pmc3/src/global_setup.c
==============================================================================
--- branches/context_pmc3/src/global_setup.c Sun Aug 30 08:58:32 2009 (r40860)
+++ branches/context_pmc3/src/global_setup.c Sun Aug 30 09:24:34 2009 (r40861)
@@ -215,7 +215,7 @@
interp->root_namespace = pmc_new(interp, enum_class_NameSpace);
Parrot_init_HLL(interp);
- Parrot_cx_set_namespace(interp, CONTEXT(interp),
+ Parrot_pcc_set_namespace(interp, CONTEXT(interp),
VTABLE_get_pmc_keyed_int(interp, interp->HLL_namespace, 0));
/* We need a class hash */
Modified: branches/context_pmc3/src/hll.c
==============================================================================
--- branches/context_pmc3/src/hll.c Sun Aug 30 08:58:32 2009 (r40860)
+++ branches/context_pmc3/src/hll.c Sun Aug 30 09:24:34 2009 (r40861)
@@ -446,7 +446,7 @@
Parrot_get_ctx_HLL_type(PARROT_INTERP, INTVAL core_type)
{
ASSERT_ARGS(Parrot_get_ctx_HLL_type)
- const INTVAL hll_id = Parrot_cx_get_HLL(interp, CONTEXT(interp));
+ const INTVAL hll_id = Parrot_pcc_get_HLL(interp, CONTEXT(interp));
return Parrot_get_HLL_type(interp, hll_id, core_type);
}
@@ -468,7 +468,7 @@
Parrot_get_ctx_HLL_namespace(PARROT_INTERP)
{
ASSERT_ARGS(Parrot_get_ctx_HLL_namespace)
- return Parrot_get_HLL_namespace(interp, Parrot_cx_get_HLL(interp, CONTEXT(interp)));
+ return Parrot_get_HLL_namespace(interp, Parrot_pcc_get_HLL(interp, CONTEXT(interp)));
}
/*
Modified: branches/context_pmc3/src/interp/inter_create.c
==============================================================================
--- branches/context_pmc3/src/interp/inter_create.c Sun Aug 30 08:58:32 2009 (r40860)
+++ branches/context_pmc3/src/interp/inter_create.c Sun Aug 30 09:24:34 2009 (r40861)
@@ -215,9 +215,9 @@
CURRENT_CONTEXT_FIELD(interp, recursion_depth) = (UINTVAL)-1;
/* clear context introspection vars */
- Parrot_cx_set_sub(interp, CONTEXT(interp), NULL);
- Parrot_cx_set_continuation(interp, CONTEXT(interp), NULL); /* TODO Use PMCNULL */
- Parrot_cx_set_object(interp, CONTEXT(interp), NULL);
+ Parrot_pcc_set_sub(interp, CONTEXT(interp), NULL);
+ Parrot_pcc_set_continuation(interp, CONTEXT(interp), NULL); /* TODO Use PMCNULL */
+ Parrot_pcc_set_object(interp, CONTEXT(interp), NULL);
/* Load the core op func and info tables */
interp->op_lib = PARROT_CORE_OPLIB_INIT(1);
Modified: branches/context_pmc3/src/interp/inter_misc.c
==============================================================================
--- branches/context_pmc3/src/interp/inter_misc.c Sun Aug 30 08:58:32 2009 (r40860)
+++ branches/context_pmc3/src/interp/inter_misc.c Sun Aug 30 09:24:34 2009 (r40861)
@@ -282,19 +282,19 @@
ASSERT_ARGS(interpinfo_p)
switch (what) {
case CURRENT_SUB:
- return Parrot_cx_get_sub(interp, CONTEXT(interp));
+ return Parrot_pcc_get_sub(interp, CONTEXT(interp));
case CURRENT_CONT:
{
- PMC * const cont = Parrot_cx_get_continuation(interp, CONTEXT(interp));
+ PMC * const cont = Parrot_pcc_get_continuation(interp, CONTEXT(interp));
if (!PMC_IS_NULL(cont) && cont->vtable->base_type ==
enum_class_RetContinuation)
return VTABLE_clone(interp, cont);
return cont;
}
case CURRENT_OBJECT:
- return Parrot_cx_get_object(interp, CONTEXT(interp));
+ return Parrot_pcc_get_object(interp, CONTEXT(interp));
case CURRENT_LEXPAD:
- return Parrot_cx_get_lex_pad(interp, CONTEXT(interp));
+ return Parrot_pcc_get_lex_pad(interp, CONTEXT(interp));
default: /* or a warning only? */
Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_UNIMPLEMENTED,
"illegal argument in interpinfo");
Modified: branches/context_pmc3/src/jit.c
==============================================================================
--- branches/context_pmc3/src/jit.c Sun Aug 30 08:58:32 2009 (r40860)
+++ branches/context_pmc3/src/jit.c Sun Aug 30 09:24:34 2009 (r40861)
@@ -287,7 +287,7 @@
int arg_type;
PMC *sig;
if (argn >= args) {
- sig = Parrot_cx_get_pmc_constant(interp, CONTEXT(interp), cur_op[1]);
+ sig = Parrot_pcc_get_pmc_constant(interp, 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 Sun Aug 30 08:58:32 2009 (r40860)
+++ branches/context_pmc3/src/jit/i386/jit_defs.c Sun Aug 30 09:24:34 2009 (r40861)
@@ -1232,7 +1232,7 @@
PMC *sig_pmc;
INTVAL *sig_bits, i, n;
- sig_pmc = Parrot_cx_get_pmc_constant(interp, CONTEXT(interp), CUR_OPCODE[1]);
+ sig_pmc = Parrot_pcc_get_pmc_constant(interp, 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_cx_get_pmc_constant(interp, CONTEXT(interp), CUR_OPCODE[1]);
+ sig_pmc = Parrot_pcc_get_pmc_constant(interp, CONTEXT(interp), CUR_OPCODE[1]);
if (!VTABLE_elements(interp, sig_pmc))
return;
GETATTR_FixedIntegerArray_int_array(interp, sig_pmc, sig_bits);
@@ -1747,8 +1747,8 @@
L1 = NATIVECODE;
emitm_calll(NATIVECODE, 0);
/* check type of return value */
- result = Parrot_cx_get_results(interp, CONTEXT(interp));
- sig_result = Parrot_cx_get_pmc_constant(interp, CONTEXT(interp), result[1]);
+ result = Parrot_pcc_get_results(interp, CONTEXT(interp));
+ sig_result = Parrot_pcc_get_pmc_constant(interp, CONTEXT(interp), result[1]);
if (!VTABLE_elements(interp, sig_result))
goto no_result;
/* fetch args to %edx */
Modified: branches/context_pmc3/src/multidispatch.c
==============================================================================
--- branches/context_pmc3/src/multidispatch.c Sun Aug 30 08:58:32 2009 (r40860)
+++ branches/context_pmc3/src/multidispatch.c Sun Aug 30 09:24:34 2009 (r40861)
@@ -1229,7 +1229,7 @@
{
ASSERT_ARGS(mmd_add_multi_to_namespace)
PMC * const hll_ns = VTABLE_get_pmc_keyed_int(interp,
- interp->HLL_namespace, Parrot_cx_get_HLL(interp, CONTEXT(interp)));
+ interp->HLL_namespace, Parrot_pcc_get_HLL(interp, CONTEXT(interp)));
PMC * const ns = Parrot_make_namespace_keyed_str(interp, hll_ns, ns_name);
PMC *multi_sub = Parrot_get_global(interp, ns, sub_name);
Modified: branches/context_pmc3/src/oo.c
==============================================================================
--- branches/context_pmc3/src/oo.c Sun Aug 30 08:58:32 2009 (r40860)
+++ branches/context_pmc3/src/oo.c Sun Aug 30 09:24:34 2009 (r40861)
@@ -209,7 +209,7 @@
{
PMC * const hll_ns = VTABLE_get_pmc_keyed_int(interp,
interp->HLL_namespace,
- Parrot_cx_get_HLL(interp, CONTEXT(interp)));
+ Parrot_pcc_get_HLL(interp, CONTEXT(interp)));
PMC * const ns = Parrot_get_namespace_keyed(interp,
hll_ns, key);
@@ -291,8 +291,9 @@
/* Flag that it is an object */
PObj_is_object_SET(cloned);
- /* Now clone attributes list.class. */
- cloned_guts = (Parrot_Object_attributes *) PMC_data(cloned);
+ /* Now create the underlying structure, and clone attributes list.class. */
+ cloned_guts = mem_allocate_typed(Parrot_Object_attributes);
+ PMC_data(cloned) = cloned_guts;
cloned_guts->_class = obj->_class;
cloned_guts->attrib_store = NULL;
cloned_guts->attrib_store = VTABLE_clone(interp, obj->attrib_store);
@@ -421,7 +422,7 @@
/* First check in current HLL namespace */
PMC * const hll_ns = VTABLE_get_pmc_keyed_int(interp, interp->HLL_namespace,
- Parrot_cx_get_HLL(interp, CONTEXT(interp)));
+ Parrot_pcc_get_HLL(interp, CONTEXT(interp)));
PMC * const ns = Parrot_get_namespace_keyed_str(interp, hll_ns, name);
PMC * const _class = PMC_IS_NULL(ns)
? PMCNULL : VTABLE_get_class(interp, ns);
Modified: branches/context_pmc3/src/ops/core.ops
==============================================================================
--- branches/context_pmc3/src/ops/core.ops Sun Aug 30 08:58:32 2009 (r40860)
+++ branches/context_pmc3/src/ops/core.ops Sun Aug 30 09:24:34 2009 (r40861)
@@ -447,7 +447,7 @@
inline op yield() :flow {
opcode_t *dest = expr NEXT();
- PMC * const p = Parrot_cx_get_sub(interp, CONTEXT(interp));
+ PMC * const p = Parrot_pcc_get_sub(interp, CONTEXT(interp));
dest = (opcode_t *)p->vtable->invoke(interp, p, dest);
goto ADDRESS(dest);
}
@@ -456,14 +456,14 @@
opcode_t *dest;
PMC * const p = $1;
dest = expr NEXT();
- interp->current_cont = Parrot_cx_get_continuation(interp, CONTEXT(interp));
+ interp->current_cont = Parrot_pcc_get_continuation(interp, CONTEXT(interp));
PObj_get_FLAGS(interp->current_cont) |= SUB_FLAG_TAILCALL;
dest = (opcode_t *)p->vtable->invoke(interp, p, dest);
goto ADDRESS(dest);
}
inline op returncc() :flow {
- PMC * const p = Parrot_cx_get_continuation(interp, CONTEXT(interp));
+ PMC * const p = Parrot_pcc_get_continuation(interp, CONTEXT(interp));
opcode_t * const dest = (opcode_t *)p->vtable->invoke(interp,
p, expr NEXT());
goto ADDRESS(dest);
@@ -527,7 +527,7 @@
PMC * const signature = $1;
INTVAL argc;
- Parrot_cx_set_results(interp, CONTEXT(interp), _this);
+ Parrot_pcc_set_results(interp, CONTEXT(interp), _this);
argc = VTABLE_elements(interp, signature);
goto OFFSET(argc + 2);
}
@@ -542,9 +542,9 @@
interp->current_params = _this;
ctx = CONTEXT(interp);
- ccont = Parrot_cx_get_continuation(interp, ctx);
+ ccont = Parrot_pcc_get_continuation(interp, ctx);
- caller_ctx = Parrot_cx_get_caller_ctx(interp, ctx);
+ caller_ctx = Parrot_pcc_get_caller_ctx(interp, ctx);
src_indexes = interp->current_args;
dst_indexes = interp->current_params;
@@ -556,8 +556,8 @@
/* TODO Factor out with Sub.invoke */
if (PObj_get_FLAGS(ccont) & SUB_FLAG_TAILCALL) {
PObj_get_FLAGS(ccont) &= ~SUB_FLAG_TAILCALL;
- Parrot_cx_dec_recursion_depth(interp, ctx);
- Parrot_cx_set_caller_ctx(interp, ctx, Parrot_cx_get_caller_ctx(interp, caller_ctx));
+ Parrot_pcc_dec_recursion_depth(interp, ctx);
+ Parrot_pcc_set_caller_ctx(interp, ctx, Parrot_pcc_get_caller_ctx(interp, caller_ctx));
interp->current_args = NULL;
}
argc = VTABLE_elements(interp, signature);
@@ -574,8 +574,8 @@
interp->current_returns = _this;
ctx = CONTEXT(interp);
- caller_ctx = Parrot_cx_get_caller_ctx(interp, ctx);
- ccont = Parrot_cx_get_continuation(interp, ctx);
+ caller_ctx = Parrot_pcc_get_caller_ctx(interp, ctx);
+ ccont = Parrot_pcc_get_continuation(interp, ctx);
if (PMC_cont(ccont)->address) {
/* Call is from runops_fromc */
@@ -587,7 +587,7 @@
}
src_indexes = interp->current_returns;
- dest_indexes = Parrot_cx_get_results(interp, caller_ctx);
+ dest_indexes = Parrot_pcc_get_results(interp, caller_ctx);
interp->current_returns = NULL;
/* does this need to be here */
interp->current_args = NULL;
@@ -597,7 +597,7 @@
else if (CONTEXT_FIELD(interp, caller_ctx, results_signature)) {
/* We have a dynamic result signature, from pcc_invoke */
parrot_pass_args(interp, ctx, caller_ctx, interp->current_returns,
- Parrot_cx_get_results(interp, caller_ctx), PARROT_PASS_RESULTS);
+ Parrot_pcc_get_results(interp, caller_ctx), PARROT_PASS_RESULTS);
}
argc = VTABLE_elements(interp, signature);
goto OFFSET(argc + 2);
@@ -614,11 +614,11 @@
inline op result_info(out PMC) {
/* Get context of callee from return continuation. */
- PMC * const cc = Parrot_cx_get_continuation(interp, CONTEXT(interp));
+ PMC * const cc = Parrot_pcc_get_continuation(interp, CONTEXT(interp));
PMC *sig = NULL;
if (cc && PMC_cont(cc)->to_ctx) {
/* caller context has results */
- opcode_t * const results = Parrot_cx_get_results(interp, PMC_cont(cc)->to_ctx);
+ opcode_t * const results = Parrot_pcc_get_results(interp, PMC_cont(cc)->to_ctx);
if (results) {
/* get results PMC index and get PMC. */
sig = PF_CONST(PMC_cont(cc)->seg, results[1])->u.key;
Modified: branches/context_pmc3/src/ops/object.ops
==============================================================================
--- branches/context_pmc3/src/ops/object.ops Sun Aug 30 08:58:32 2009 (r40860)
+++ branches/context_pmc3/src/ops/object.ops Sun Aug 30 09:24:34 2009 (r40861)
@@ -142,7 +142,7 @@
VTABLE_get_string(interp, VTABLE_get_class(interp, object)));
}
else {
- interp->current_cont = Parrot_cx_get_continuation(interp, CONTEXT(interp));
+ interp->current_cont = Parrot_pcc_get_continuation(interp, CONTEXT(interp));
PObj_get_FLAGS(interp->current_cont) |= SUB_FLAG_TAILCALL;
interp->current_object = object;
dest = (opcode_t *)VTABLE_invoke(interp, method_pmc, next);
@@ -157,7 +157,7 @@
opcode_t *dest;
- interp->current_cont = Parrot_cx_get_continuation(interp, CONTEXT(interp));
+ interp->current_cont = Parrot_pcc_get_continuation(interp, CONTEXT(interp));
PObj_get_FLAGS(interp->current_cont) |= SUB_FLAG_TAILCALL;
interp->current_object = object;
dest = (opcode_t *)VTABLE_invoke(interp, method_pmc, next);
Modified: branches/context_pmc3/src/ops/pic.ops
==============================================================================
--- branches/context_pmc3/src/ops/pic.ops Sun Aug 30 08:58:32 2009 (r40860)
+++ branches/context_pmc3/src/ops/pic.ops Sun Aug 30 09:24:34 2009 (r40861)
@@ -141,9 +141,9 @@
ctx = CONTEXT(interp);
src_pc = interp->current_args;
mic = (Parrot_MIC *) cur_opcode[1];
- caller_ctx = Parrot_cx_get_caller_ctx(interp, ctx);
+ caller_ctx = Parrot_pcc_get_caller_ctx(interp, ctx);
if (src_pc) {
- src_pred = (void**) src_pc - Parrot_cx_get_pred_offset(interp, caller_ctx);
+ src_pred = (void**) src_pc - Parrot_pcc_get_pred_offset(interp, caller_ctx);
sig = (PMC*)(src_pred[1]);
}
else {
@@ -159,12 +159,12 @@
}
else
n = 2;
- ccont = Parrot_cx_get_continuation(interp, ctx);
+ ccont = Parrot_pcc_get_continuation(interp, ctx);
if (PObj_get_FLAGS(ccont) & SUB_FLAG_TAILCALL) {
PObj_get_FLAGS(ccont) &= ~SUB_FLAG_TAILCALL;
- Parrot_cx_dec_recursion_depth(interp, ctx);
- Parrot_cx_set_caller_ctx(interp, ctx,
- Parrot_cx_get_caller_ctx(interp, caller_ctx));
+ Parrot_pcc_dec_recursion_depth(interp, ctx);
+ Parrot_pcc_set_caller_ctx(interp, ctx,
+ Parrot_pcc_get_caller_ctx(interp, caller_ctx));
interp->current_args = NULL;
}
@@ -189,7 +189,7 @@
ctx = CONTEXT(interp);
mic = (Parrot_MIC *) cur_opcode[1];
- ccont = Parrot_cx_get_continuation(interp, ctx);
+ ccont = Parrot_pcc_get_continuation(interp, ctx);
cc = PMC_cont(ccont);
if (!cc->address) {
interp->current_returns = CUR_OPCODE;
@@ -198,9 +198,9 @@
}
caller_ctx = cc->to_ctx;
interp->current_args = NULL;
- dest_pc = Parrot_cx_get_results(interp, caller_ctx);
+ dest_pc = Parrot_pcc_get_results(interp, caller_ctx);
if (dest_pc) {
- dest_pred = (void**) dest_pc - Parrot_cx_get_pred_offset(interp, caller_ctx);
+ dest_pred = (void**) dest_pc - Parrot_pcc_get_pred_offset(interp, caller_ctx);
sig = (PMC*)(dest_pred[1]);
}
else {
@@ -248,9 +248,9 @@
ctx = CONTEXT(interp);
mic = (Parrot_MIC *) cur_opcode[1];
/* get_results */
- pc = Parrot_cx_get_results(interp, ctx);
+ pc = Parrot_pcc_get_results(interp, ctx);
if (pc) {
- pred_pc = (void**) pc - Parrot_cx_get_pred_offset(interp, ctx);
+ pred_pc = (void**) pc - Parrot_pcc_get_pred_offset(interp, ctx);
sig = (PMC*)(pred_pc[1]);
ASSERT_SIG_PMC(sig);
PARROT_ASSERT(VTABLE_elements(interp, sig) <= 1);
Modified: branches/context_pmc3/src/ops/var.ops
==============================================================================
--- branches/context_pmc3/src/ops/var.ops Sun Aug 30 08:58:32 2009 (r40860)
+++ branches/context_pmc3/src/ops/var.ops Sun Aug 30 09:24:34 2009 (r40861)
@@ -95,9 +95,9 @@
PMC * ctx = CONTEXT(interp);
PMC * result = PMCNULL;
- for (ctx = Parrot_cx_get_caller_ctx(interp, ctx);
+ for (ctx = Parrot_pcc_get_caller_ctx(interp, ctx);
!PMC_IS_NULL(ctx) && PMC_IS_NULL(result);
- ctx = Parrot_cx_get_caller_ctx(interp, ctx))
+ ctx = Parrot_pcc_get_caller_ctx(interp, ctx))
{
PMC * const lex_pad = Parrot_find_pad(interp, lex_name, ctx);
if (!PMC_IS_NULL(lex_pad)) {
@@ -130,12 +130,12 @@
=cut
op get_namespace(out PMC) {
- PMC * const cur_ns = Parrot_cx_get_namespace(interp, CONTEXT(interp));
+ PMC * const cur_ns = Parrot_pcc_get_namespace(interp, CONTEXT(interp));
$1 = cur_ns;
}
op get_namespace(out PMC, in PMC) {
- PMC * const cur_ns = Parrot_cx_get_namespace(interp, CONTEXT(interp));
+ PMC * const cur_ns = Parrot_pcc_get_namespace(interp, CONTEXT(interp));
PMC * const ns = Parrot_get_namespace_keyed(interp, cur_ns, $2);
$1 = PMC_IS_NULL(ns) ? PMCNULL : ns;
@@ -218,12 +218,12 @@
=cut
op get_global(out PMC, in STR) {
- PMC * const cur_ns = Parrot_cx_get_namespace(interp, CONTEXT(interp));
+ PMC * const cur_ns = Parrot_pcc_get_namespace(interp, CONTEXT(interp));
$1 = Parrot_find_global_op(interp, cur_ns, $2, expr NEXT());
}
op get_global(out PMC, in PMC, in STR) {
- PMC * const cur_ns = Parrot_cx_get_namespace(interp, CONTEXT(interp));
+ PMC * const cur_ns = Parrot_pcc_get_namespace(interp, CONTEXT(interp));
if (PMC_IS_NULL(cur_ns)) {
$1 = PMCNULL;
}
@@ -322,12 +322,12 @@
=cut
op set_global(in STR, invar PMC) {
- PMC * const cur_ns = Parrot_cx_get_namespace(interp, CONTEXT(interp));
+ PMC * const cur_ns = Parrot_pcc_get_namespace(interp, CONTEXT(interp));
Parrot_set_global(interp, cur_ns, $1, $2);
}
op set_global(in PMC, in STR, invar PMC) {
- PMC * const cur_ns = Parrot_cx_get_namespace(interp, CONTEXT(interp));
+ PMC * const cur_ns = Parrot_pcc_get_namespace(interp, CONTEXT(interp));
PMC * const ns = Parrot_make_namespace_keyed(interp, cur_ns, $1);
Parrot_set_global(interp, ns, $2, $3);
Modified: branches/context_pmc3/src/packfile.c
==============================================================================
--- branches/context_pmc3/src/packfile.c Sun Aug 30 08:58:32 2009 (r40860)
+++ branches/context_pmc3/src/packfile.c Sun Aug 30 09:24:34 2009 (r40861)
@@ -759,7 +759,7 @@
/ sizeof (opcode_t *);
PObj_get_FLAGS(sub_pmc) &= ~SUB_FLAG_PF_MAIN;
- Parrot_cx_set_sub(interp, CONTEXT(interp), sub_pmc);
+ Parrot_pcc_set_sub(interp, CONTEXT(interp), sub_pmc);
}
else {
Parrot_warn(interp, PARROT_WARNINGS_ALL_FLAG,
@@ -3088,7 +3088,7 @@
: new_cs->const_table->constants;
/* new_cs->const_table->constants; */
- Parrot_cx_set_pred_offset(interp, CONTEXT(interp),
+ Parrot_pcc_set_pred_offset(interp, CONTEXT(interp),
new_cs->base.data - (opcode_t*) new_cs->prederef.code);
if (really)
Modified: branches/context_pmc3/src/pic.c
==============================================================================
--- branches/context_pmc3/src/pic.c Sun Aug 30 08:58:32 2009 (r40860)
+++ branches/context_pmc3/src/pic.c Sun Aug 30 09:24:34 2009 (r40861)
@@ -704,14 +704,14 @@
/* check params */
if (op == PARROT_OP_set_returns_pc) {
- PMC * const ccont = Parrot_cx_get_continuation(interp, ctx);
+ PMC * const ccont = Parrot_pcc_get_continuation(interp, ctx);
if (!PMC_cont(ccont)->address)
return 0;
caller_ctx = PMC_cont(ccont)->to_ctx;
- args = Parrot_cx_get_results(interp, caller_ctx);
+ args = Parrot_pcc_get_results(interp, caller_ctx);
}
else {
- caller_ctx = Parrot_cx_get_caller_ctx(interp, ctx);
+ caller_ctx = Parrot_pcc_get_caller_ctx(interp, ctx);
args = interp->current_args;
}
@@ -720,7 +720,7 @@
int n;
/* check current_args signature */
- sig2 = Parrot_cx_get_pmc_constant(interp, caller_ctx, const_nr);
+ sig2 = Parrot_pcc_get_pmc_constant(interp, caller_ctx, const_nr);
n = parrot_pic_check_sig(interp, sig1, sig2, &type);
if (n == -1)
@@ -804,9 +804,9 @@
ASSERT_SIG_PMC(sig_args);
n = VTABLE_elements(interp, sig_args);
- interp->current_args = (opcode_t*)pc + Parrot_cx_get_pred_offset(interp, ctx);
+ interp->current_args = (opcode_t*)pc + Parrot_pcc_get_pred_offset(interp, ctx);
pc += 2 + n;
- op = (opcode_t*)pc + Parrot_cx_get_pred_offset(interp, ctx);
+ op = (opcode_t*)pc + Parrot_pcc_get_pred_offset(interp, ctx);
if (*op != PARROT_OP_set_p_pc)
return 0;
@@ -820,7 +820,7 @@
return 0;
pc += 3; /* results */
- op = (opcode_t *)pc + Parrot_cx_get_pred_offset(interp, ctx);
+ op = (opcode_t *)pc + Parrot_pcc_get_pred_offset(interp, ctx);
if (*op != PARROT_OP_get_results_pc)
return 0;
@@ -829,7 +829,7 @@
sig_results = (PMC *)(pc[1]);
ASSERT_SIG_PMC(sig_results);
- Parrot_cx_set_results(interp, ctx, (opcode_t *)pc + Parrot_cx_get_pred_offset(interp, ctx));
+ Parrot_pcc_set_results(interp, ctx, (opcode_t *)pc + Parrot_pcc_get_pred_offset(interp, ctx));
if (!parrot_pic_is_safe_to_jit(interp, sub, sig_args, sig_results, &flags))
return 0;
Modified: branches/context_pmc3/src/pmc.c
==============================================================================
--- branches/context_pmc3/src/pmc.c Sun Aug 30 08:58:32 2009 (r40860)
+++ branches/context_pmc3/src/pmc.c Sun Aug 30 09:24:34 2009 (r40861)
@@ -889,7 +889,7 @@
/* anchor at parent, aka current_namespace, that is 'parrot' */
VTABLE_set_pmc_keyed_str(interp,
- Parrot_cx_get_namespace(interp, CONTEXT(interp)), class_name, ns);
+ Parrot_pcc_get_namespace(interp, CONTEXT(interp)), class_name, ns);
}
_class = vtable->pmc_class;
Modified: branches/context_pmc3/src/pmc/class.pmc
==============================================================================
--- branches/context_pmc3/src/pmc/class.pmc Sun Aug 30 08:58:32 2009 (r40860)
+++ branches/context_pmc3/src/pmc/class.pmc Sun Aug 30 09:24:34 2009 (r40861)
@@ -197,7 +197,7 @@
}
else {
PMC * const hll_ns = VTABLE_get_pmc_keyed_int(interp,
- interp->HLL_namespace, Parrot_cx_get_HLL(interp, CONTEXT(interp)));
+ interp->HLL_namespace, Parrot_pcc_get_HLL(interp, CONTEXT(interp)));
new_namespace = Parrot_make_namespace_keyed(interp, hll_ns, name_arg);
}
@@ -1168,13 +1168,13 @@
/* Check that we have all methods listed in resolve list. */
const int resolve_count = VTABLE_elements(interp,
_class->resolve_method);
- const INTVAL cur_hll = Parrot_cx_get_HLL(interp, CONTEXT(interp));
+ const INTVAL cur_hll = Parrot_pcc_get_HLL(interp, CONTEXT(interp));
const INTVAL num_parents = VTABLE_elements(interp, _class->parents);
INTVAL mro_length;
int i;
/* don't use HLL mappings for internal-only data */
- Parrot_cx_set_HLL(interp, CONTEXT(interp), 0);
+ Parrot_pcc_set_HLL(interp, CONTEXT(interp), 0);
for (i = 0; i < resolve_count; i++) {
STRING * const check_meth =
@@ -1211,7 +1211,7 @@
}
}
- Parrot_cx_set_HLL(interp, CONTEXT(interp), cur_hll);
+ Parrot_pcc_set_HLL(interp, CONTEXT(interp), cur_hll);
}
/* Set instantiated flag. */
Modified: branches/context_pmc3/src/pmc/continuation.pmc
==============================================================================
--- branches/context_pmc3/src/pmc/continuation.pmc Sun Aug 30 08:58:32 2009 (r40860)
+++ branches/context_pmc3/src/pmc/continuation.pmc Sun Aug 30 09:24:34 2009 (r40861)
@@ -231,9 +231,9 @@
/* pass args to where caller wants result */
if (cc->current_results)
- Parrot_cx_set_results(interp, to_ctx, cc->current_results);
+ Parrot_pcc_set_results(interp, to_ctx, cc->current_results);
- if (Parrot_cx_get_results(interp, to_ctx) && INTERP->current_args) {
+ if (Parrot_pcc_get_results(interp, to_ctx) && INTERP->current_args) {
/*
* the register pointer is already switched back
* to the caller, therefore the registers of the
@@ -242,7 +242,7 @@
* therefore we have to block GC
*/
opcode_t *src_indexes = interp->current_args;
- opcode_t *dest_indexes = Parrot_cx_get_results(interp, to_ctx);
+ opcode_t *dest_indexes = Parrot_pcc_get_results(interp, to_ctx);
interp->current_args = NULL;
Parrot_block_GC_mark(INTERP);
@@ -286,7 +286,7 @@
METHOD caller() {
Parrot_cont *cc = PMC_cont(SELF);
- PMC *caller = Parrot_cx_get_sub(interp, cc->to_ctx);
+ PMC *caller = Parrot_pcc_get_sub(interp, cc->to_ctx);
Parrot_Sub_attributes *sub;
if (!caller)
@@ -312,7 +312,7 @@
METHOD continuation() {
Parrot_cont *cc = PMC_cont(SELF);
- PMC *cont = Parrot_cx_get_continuation(interp, cc->to_ctx);
+ PMC *cont = Parrot_pcc_get_continuation(interp, cc->to_ctx);
if (cont)
RETURN(PMC *cont);
Modified: branches/context_pmc3/src/pmc/coroutine.pmc
==============================================================================
--- branches/context_pmc3/src/pmc/coroutine.pmc Sun Aug 30 08:58:32 2009 (r40860)
+++ branches/context_pmc3/src/pmc/coroutine.pmc Sun Aug 30 09:24:34 2009 (r40861)
@@ -49,7 +49,7 @@
if (co->ctx && (PObj_get_FLAGS(sub_pmc) & SUB_FLAG_CORO_FF)) {
Parrot_io_eprintf(tracer, " to '%Ss'",
Parrot_full_sub_name(interp,
- Parrot_cx_get_sub(interp, Parrot_cx_get_caller_ctx(interp, co->ctx))));
+ Parrot_pcc_get_sub(interp, Parrot_pcc_get_caller_ctx(interp, co->ctx))));
}
Parrot_io_eprintf(tracer, "\n# ");
@@ -150,20 +150,20 @@
CONTEXT_FIELD(INTERP, ctx, caller_ctx) = caller_ctx;
PMC_cont(ccont)->from_ctx = ctx;
- Parrot_cx_set_sub(INTERP, ctx, SELF);
- Parrot_cx_set_HLL(interp, ctx, co->HLL_id);
- Parrot_cx_set_namespace(INTERP, ctx, co->namespace_stash);
- Parrot_cx_set_continuation(INTERP, ctx, ccont);
- Parrot_cx_set_object(interp, ctx, NULL);
+ Parrot_pcc_set_sub(INTERP, ctx, SELF);
+ Parrot_pcc_set_HLL(interp, ctx, co->HLL_id);
+ Parrot_pcc_set_namespace(INTERP, ctx, co->namespace_stash);
+ Parrot_pcc_set_continuation(INTERP, ctx, ccont);
+ Parrot_pcc_set_object(interp, ctx, NULL);
INTERP->current_object = NULL;
INTERP->current_cont = NULL;
/* create pad if needed */
if (!PMC_IS_NULL(co->lex_info)) {
- Parrot_cx_set_lex_pad(INTERP, ctx, pmc_new_init(INTERP,
+ Parrot_pcc_set_lex_pad(INTERP, ctx, pmc_new_init(INTERP,
Parrot_get_ctx_HLL_type(interp, enum_class_LexPad),
co->lex_info));
- VTABLE_set_pointer(INTERP, Parrot_cx_get_lex_pad(INTERP, ctx), ctx);
+ VTABLE_set_pointer(INTERP, Parrot_pcc_get_lex_pad(INTERP, ctx), ctx);
}
PObj_get_FLAGS(SELF) |= SUB_FLAG_CORO_FF;
@@ -185,9 +185,9 @@
ctx = co->ctx;
/* and the recent call context */
- ccont = Parrot_cx_get_continuation(INTERP, ctx);
+ ccont = Parrot_pcc_get_continuation(INTERP, ctx);
PMC_cont(ccont)->to_ctx = CONTEXT(interp);
- Parrot_cx_set_caller_ctx(interp, ctx, CONTEXT(interp));
+ Parrot_pcc_set_caller_ctx(interp, ctx, CONTEXT(interp));
/* set context to coro context */
CONTEXT(interp) = ctx;
@@ -200,7 +200,7 @@
/* switch back to last remembered code seg and context */
wanted_seg = co->caller_seg;
- ccont = Parrot_cx_get_continuation(INTERP, co->ctx);
+ ccont = Parrot_pcc_get_continuation(INTERP, co->ctx);
ctx = PMC_cont(ccont)->to_ctx;
if (! ctx) {
Modified: branches/context_pmc3/src/pmc/exception.pmc
==============================================================================
--- branches/context_pmc3/src/pmc/exception.pmc Sun Aug 30 08:58:32 2009 (r40860)
+++ branches/context_pmc3/src/pmc/exception.pmc Sun Aug 30 09:24:34 2009 (r40861)
@@ -767,7 +767,7 @@
Parrot_Sub_attributes *sub;
/* Get sub and put it in the hash. */
- PMC *sub_pmc = Parrot_cx_get_sub(interp, cur_ctx);
+ PMC *sub_pmc = Parrot_pcc_get_sub(interp, cur_ctx);
if (!sub_pmc)
sub_pmc = PMCNULL;
@@ -782,7 +782,7 @@
PackFile_ByteCode *seg = sub->seg;
opcode_t *pc = cont && cur_ctx == cont->to_ctx
? cont->address
- : Parrot_cx_get_pc(interp, cur_ctx);
+ : Parrot_pcc_get_pc(interp, cur_ctx);
annotations = PackFile_Annotations_lookup(interp,
seg->annotations, pc - seg->base.data,
@@ -797,7 +797,7 @@
/* Push frame and go to next caller. */
VTABLE_push_pmc(interp, result, frame);
- cur_ctx = Parrot_cx_get_caller_ctx(interp, cur_ctx);
+ cur_ctx = Parrot_pcc_get_caller_ctx(interp, cur_ctx);
}
}
Modified: branches/context_pmc3/src/pmc/exporter.pmc
==============================================================================
--- branches/context_pmc3/src/pmc/exporter.pmc Sun Aug 30 08:58:32 2009 (r40860)
+++ branches/context_pmc3/src/pmc/exporter.pmc Sun Aug 30 09:24:34 2009 (r40861)
@@ -109,7 +109,7 @@
VTABLE void init() {
/* Set up the object. */
SET_ATTR_ns_src(INTERP, SELF, PMCNULL);
- SET_ATTR_ns_dest(INTERP, SELF, Parrot_cx_get_namespace(INTERP, CONTEXT(INTERP)));
+ SET_ATTR_ns_dest(INTERP, SELF, Parrot_pcc_get_namespace(INTERP, CONTEXT(INTERP)));
SET_ATTR_globals(INTERP, SELF, PMCNULL);
/* Set flags for custom GC mark and destroy. */
Modified: branches/context_pmc3/src/pmc/nci.pmc
==============================================================================
--- branches/context_pmc3/src/pmc/nci.pmc Sun Aug 30 08:58:32 2009 (r40860)
+++ branches/context_pmc3/src/pmc/nci.pmc Sun Aug 30 09:24:34 2009 (r40861)
@@ -346,7 +346,7 @@
*/
if (cont && cont != NEED_CONTINUATION
&& (PObj_get_FLAGS(cont) & SUB_FLAG_TAILCALL)) {
- cont = Parrot_cx_get_continuation(interp, CONTEXT(interp));
+ cont = Parrot_pcc_get_continuation(interp, CONTEXT(interp));
next = VTABLE_invoke(INTERP, cont, next);
}
Modified: branches/context_pmc3/src/pmc/object.pmc
==============================================================================
--- branches/context_pmc3/src/pmc/object.pmc Sun Aug 30 08:58:32 2009 (r40860)
+++ branches/context_pmc3/src/pmc/object.pmc Sun Aug 30 09:24:34 2009 (r40861)
@@ -27,11 +27,11 @@
get_attrib_index(PARROT_INTERP, PMC *self, STRING *name)
{
Parrot_Class_attributes * const _class = PARROT_CLASS(self);
- const INTVAL cur_hll = Parrot_cx_get_HLL(interp, CONTEXT(interp));
+ const INTVAL cur_hll = Parrot_pcc_get_HLL(interp, CONTEXT(interp));
int num_classes, i;
INTVAL retval;
- Parrot_cx_set_HLL(interp, CONTEXT(interp), 0);
+ Parrot_pcc_set_HLL(interp, CONTEXT(interp), 0);
/* First see if we can find it in the cache. */
retval = VTABLE_get_integer_keyed_str(interp,
@@ -40,7 +40,7 @@
/* there's a semi-predicate problem with a retval of 0 */
if (retval
|| VTABLE_exists_keyed_str(interp, _class->attrib_cache, name)) {
- Parrot_cx_set_HLL(interp, CONTEXT(interp), cur_hll);
+ Parrot_pcc_set_HLL(interp, CONTEXT(interp), cur_hll);
return retval;
}
@@ -65,12 +65,12 @@
VTABLE_set_integer_keyed_str(interp, _class->attrib_cache, name,
index);
- Parrot_cx_set_HLL(interp, CONTEXT(interp), cur_hll);
+ Parrot_pcc_set_HLL(interp, CONTEXT(interp), cur_hll);
return index;
}
}
- Parrot_cx_set_HLL(interp, CONTEXT(interp), cur_hll);
+ Parrot_pcc_set_HLL(interp, CONTEXT(interp), cur_hll);
return -1;
}
Modified: branches/context_pmc3/src/pmc/parrotinterpreter.pmc
==============================================================================
--- branches/context_pmc3/src/pmc/parrotinterpreter.pmc Sun Aug 30 08:58:32 2009 (r40860)
+++ branches/context_pmc3/src/pmc/parrotinterpreter.pmc Sun Aug 30 09:24:34 2009 (r40861)
@@ -482,7 +482,7 @@
if (outer) {
for (; level; --level) {
- ctx = Parrot_cx_get_outer_ctx(interp, ctx);
+ ctx = Parrot_pcc_get_outer_ctx(interp, ctx);
if (PMC_IS_NULL(ctx))
Parrot_ex_throw_from_c_args(interp, NULL,
CONTROL_ERROR, "No such outer depth");
@@ -490,7 +490,7 @@
}
else {
for (; level; --level) {
- cont = Parrot_cx_get_continuation(interp, ctx);
+ cont = Parrot_pcc_get_continuation(interp, ctx);
if (PMC_IS_NULL(cont) || !PMC_cont(cont)->seg)
Parrot_ex_throw_from_c_args(interp, NULL,
@@ -498,39 +498,39 @@
ctx = PMC_cont(cont)->to_ctx;
- if (PMC_IS_NULL(Parrot_cx_get_sub(interp, ctx)))
+ if (PMC_IS_NULL(Parrot_pcc_get_sub(interp, ctx)))
Parrot_ex_throw_from_c_args(interp, NULL,
CONTROL_ERROR, "No such caller depth");
}
}
if (item == outer)
- return Parrot_cx_get_sub(interp, ctx);
+ return Parrot_pcc_get_sub(interp, ctx);
s = CONST_STRING(interp, "sub");
if (Parrot_str_equal(interp, item, s))
- return Parrot_cx_get_sub(interp, ctx);
+ return Parrot_pcc_get_sub(interp, ctx);
s = CONST_STRING(interp, "lexpad");
if (Parrot_str_equal(interp, item, s))
- return Parrot_cx_get_lex_pad(interp, ctx);
+ return Parrot_pcc_get_lex_pad(interp, ctx);
s = CONST_STRING(interp, "namespace");
if (Parrot_str_equal(interp, item, s))
- return Parrot_cx_get_namespace(interp, ctx);
+ return Parrot_pcc_get_namespace(interp, ctx);
s = CONST_STRING(interp, "continuation");
if (Parrot_str_equal(interp, item, s))
- return VTABLE_clone(interp, Parrot_cx_get_continuation(interp, ctx));
+ return VTABLE_clone(interp, Parrot_pcc_get_continuation(interp, ctx));
s = CONST_STRING(interp, "annotations");
if (Parrot_str_equal(interp, item, s)) {
- PMC *sub_pmc = Parrot_cx_get_sub(interp, ctx);
+ PMC *sub_pmc = Parrot_pcc_get_sub(interp, ctx);
if (ctx == CONTEXT(interp)) {
/* We can't know the current program counter for the currently
* executing sub, so can't return annotations for that. */
@@ -541,7 +541,7 @@
&& sub_pmc->vtable->base_type == enum_class_Sub) {
Parrot_Sub_attributes *sub;
PackFile_ByteCode *seg;
- opcode_t *pc = Parrot_cx_get_pc(interp, ctx);
+ opcode_t *pc = Parrot_pcc_get_pc(interp, ctx);
PMC_get_sub(interp, sub_pmc, sub);
seg = sub->seg;
@@ -802,7 +802,7 @@
METHOD hll_map(PMC *core_type, PMC *hll_type) {
INTVAL core_type_id = VTABLE_type(INTERP, core_type);
INTVAL hll_type_id = VTABLE_type(INTERP, hll_type);
- INTVAL hll_id = Parrot_cx_get_HLL(interp, CONTEXT(interp));
+ INTVAL hll_id = Parrot_pcc_get_HLL(interp, CONTEXT(interp));
Parrot_register_HLL_type(INTERP, hll_id, core_type_id, hll_type_id);
}
Modified: branches/context_pmc3/src/pmc/role.pmc
==============================================================================
--- branches/context_pmc3/src/pmc/role.pmc Sun Aug 30 08:58:32 2009 (r40860)
+++ branches/context_pmc3/src/pmc/role.pmc Sun Aug 30 09:24:34 2009 (r40861)
@@ -102,7 +102,7 @@
/* Namespace is nested in the current namespace and with the name of
* the role. */
role->_namespace = Parrot_make_namespace_keyed_str(interp,
- Parrot_cx_get_namespace(interp, CONTEXT(interp)), role->name);
+ Parrot_pcc_get_namespace(interp, CONTEXT(interp)), role->name);
}
/* Otherwise, we may just have a namespace. */
Modified: branches/context_pmc3/src/pmc/sub.pmc
==============================================================================
--- branches/context_pmc3/src/pmc/sub.pmc Sun Aug 30 08:58:32 2009 (r40860)
+++ branches/context_pmc3/src/pmc/sub.pmc Sun Aug 30 09:24:34 2009 (r40861)
@@ -277,13 +277,13 @@
/* plain subroutine call
* create new context, place it in interpreter */
context = Parrot_set_new_context(INTERP, sub->n_regs_used);
- Parrot_cx_set_sub(interp, context, SELF);
- Parrot_cx_set_caller_ctx(interp, context, caller_ctx);
- Parrot_cx_set_pc(interp, context, pc);
- Parrot_cx_set_continuation(interp, context, ccont);
+ Parrot_pcc_set_sub(interp, context, SELF);
+ Parrot_pcc_set_caller_ctx(interp, context, caller_ctx);
+ Parrot_pcc_set_pc(interp, context, pc);
+ Parrot_pcc_set_continuation(interp, context, ccont);
/* check recursion/call depth */
- if (Parrot_cx_inc_recursion_depth(INTERP, context) > INTERP->recursion_limit)
+ if (Parrot_pcc_inc_recursion_depth(INTERP, context) > INTERP->recursion_limit)
Parrot_ex_throw_from_c_args(INTERP, next, CONTROL_ERROR,
"maximum recursion depth exceeded");
@@ -300,37 +300,37 @@
}
if (!PMC_IS_NULL(INTERP->current_object)) {
- Parrot_cx_set_object(interp, context, INTERP->current_object);
+ Parrot_pcc_set_object(interp, context, INTERP->current_object);
INTERP->current_object = NULL;
}
- Parrot_cx_set_HLL(interp, context, sub->HLL_id);
- Parrot_cx_set_namespace(interp, context, sub->namespace_stash);
+ Parrot_pcc_set_HLL(interp, context, sub->HLL_id);
+ Parrot_pcc_set_namespace(interp, context, sub->namespace_stash);
/* create pad if needed
* TODO move this up in front of argument passing
* and factor out common code with coroutine pmc
*/
if (!PMC_IS_NULL(sub->lex_info)) {
- Parrot_cx_set_lex_pad(interp, context, pmc_new_init(INTERP,
+ Parrot_pcc_set_lex_pad(interp, context, pmc_new_init(INTERP,
Parrot_get_ctx_HLL_type(interp, enum_class_LexPad),
sub->lex_info));
- VTABLE_set_pointer(INTERP, Parrot_cx_get_lex_pad(interp, context), context);
+ VTABLE_set_pointer(INTERP, Parrot_pcc_get_lex_pad(interp, context), context);
}
if (sub->outer_ctx) {
/* set outer context */
- Parrot_cx_set_outer_ctx(interp, context, sub->outer_ctx);
+ Parrot_pcc_set_outer_ctx(interp, context, sub->outer_ctx);
}
else {
/* autoclose */
PMC *c;
- for (c = context; PMC_IS_NULL(Parrot_cx_get_outer_ctx(interp, c)); c = Parrot_cx_get_outer_ctx(interp, c)) {
+ for (c = context; PMC_IS_NULL(Parrot_pcc_get_outer_ctx(interp, c)); c = Parrot_pcc_get_outer_ctx(interp, c)) {
PMC *outer_pmc;
Parrot_Sub_attributes *current_sub, *outer_sub;
- PMC_get_sub(INTERP, Parrot_cx_get_sub(interp, c), current_sub);
+ PMC_get_sub(INTERP, Parrot_pcc_get_sub(interp, c), current_sub);
outer_pmc = current_sub->outer_sub;
if (PMC_IS_NULL(outer_pmc))
@@ -341,21 +341,21 @@
if (!outer_sub->ctx) {
PMC * const dummy = Parrot_alloc_context(INTERP,
outer_sub->n_regs_used, NULL);
- Parrot_cx_set_sub(interp, dummy, outer_pmc);
+ Parrot_pcc_set_sub(interp, dummy, outer_pmc);
if (!PMC_IS_NULL(outer_sub->lex_info)) {
- Parrot_cx_set_lex_pad(interp, dummy, pmc_new_init(INTERP,
+ Parrot_pcc_set_lex_pad(interp, dummy, pmc_new_init(INTERP,
Parrot_get_ctx_HLL_type(interp, enum_class_LexPad),
outer_sub->lex_info));
- VTABLE_set_pointer(INTERP, Parrot_cx_get_lex_pad(interp, dummy), dummy);
+ VTABLE_set_pointer(INTERP, Parrot_pcc_get_lex_pad(interp, dummy), dummy);
}
if (!PMC_IS_NULL(outer_sub->outer_ctx))
- Parrot_cx_set_outer_ctx(interp, dummy, outer_sub->outer_ctx);
+ Parrot_pcc_set_outer_ctx(interp, dummy, outer_sub->outer_ctx);
outer_sub->ctx = dummy;
}
- Parrot_cx_set_outer_ctx(interp, c, outer_sub->ctx);
+ Parrot_pcc_set_outer_ctx(interp, c, outer_sub->ctx);
}
}
@@ -369,11 +369,11 @@
&& pc[2] == PARROT_OP_get_params_pc))) {
/* TODO keep it or resize it */
- Parrot_cx_dec_recursion_depth(INTERP, context);
+ Parrot_pcc_dec_recursion_depth(INTERP, context);
PObj_get_FLAGS(ccont) &= ~SUB_FLAG_TAILCALL;
- Parrot_cx_set_caller_ctx(interp, context,
- Parrot_cx_get_caller_ctx(interp, caller_ctx));
+ Parrot_pcc_set_caller_ctx(interp, context,
+ Parrot_pcc_get_caller_ctx(interp, caller_ctx));
//Parrot_free_context(INTERP, caller_ctx, 1);
}
@@ -962,12 +962,12 @@
/* XXX This code looks very suspicious. */
/* (CONTEXT(interp)->caller_ctx->caller_ctx->current_sub */
- tmp1 = Parrot_cx_get_caller_ctx(interp, CONTEXT(interp));
- tmp2 = Parrot_cx_get_caller_ctx(interp, tmp1);
- if (Parrot_cx_get_sub(interp, tmp2) == outer)
+ tmp1 = Parrot_pcc_get_caller_ctx(interp, CONTEXT(interp));
+ tmp2 = Parrot_pcc_get_caller_ctx(interp, tmp1);
+ if (Parrot_pcc_get_sub(interp, tmp2) == outer)
sub->outer_ctx = tmp2;
/* else if (CONTEXT(interp)->caller_ctx->current_sub == outer) */
- else if (Parrot_cx_get_sub(interp, tmp1) == outer)
+ else if (Parrot_pcc_get_sub(interp, tmp1) == outer)
sub->outer_ctx = tmp1;
}
Modified: branches/context_pmc3/src/runcore/cores.c
==============================================================================
--- branches/context_pmc3/src/runcore/cores.c Sun Aug 30 08:58:32 2009 (r40860)
+++ branches/context_pmc3/src/runcore/cores.c Sun Aug 30 09:24:34 2009 (r40861)
@@ -292,7 +292,7 @@
ASSERT_ARGS(runops_fast_core)
/* disable pc */
- Parrot_cx_set_pc(interp, CONTEXT(interp), NULL);
+ Parrot_pcc_set_pc(interp, CONTEXT(interp), NULL);
while (pc) {
if (pc < code_start || pc >= code_end)
@@ -328,7 +328,7 @@
ASSERT_ARGS(runops_cgoto_core)
/* disable pc */
- Parrot_cx_set_pc(interp, CONTEXT(interp), NULL);
+ Parrot_pcc_set_pc(interp, CONTEXT(interp), NULL);
#ifdef HAVE_COMPUTED_GOTO
pc = cg_core(pc, interp);
@@ -407,7 +407,7 @@
Parrot_ex_throw_from_c_args(interp, NULL, 1,
"attempt to access code outside of current code segment");
- Parrot_cx_set_pc(interp, CONTEXT(interp), pc);
+ Parrot_pcc_set_pc(interp, CONTEXT(interp), pc);
DO_OP(pc, interp);
trace_op(interp, code_start, code_end, pc);
@@ -461,7 +461,7 @@
Parrot_ex_throw_from_c_args(interp, NULL, 1,
"attempt to access code outside of current code segment");
- Parrot_cx_set_pc(interp, CONTEXT(interp), pc);
+ Parrot_pcc_set_pc(interp, CONTEXT(interp), pc);
DO_OP(pc, interp);
}
@@ -494,7 +494,7 @@
"attempt to access code outside of current code segment");
Parrot_gc_mark_and_sweep(interp, GC_TRACE_FULL);
- Parrot_cx_set_pc(interp, CONTEXT(interp), pc);
+ Parrot_pcc_set_pc(interp, CONTEXT(interp), pc);
DO_OP(pc, interp);
}
@@ -534,7 +534,7 @@
while (pc) {/* && pc >= code_start && pc < code_end) */
opcode_t cur_op;
- Parrot_cx_set_pc(interp, CONTEXT(interp), pc);
+ Parrot_pcc_set_pc(interp, CONTEXT(interp), pc);
profile->cur_op = cur_op = *pc + PARROT_PROF_EXTRA;
profile->starttime = Parrot_floatval_time();
profile->data[cur_op].numcalls++;
@@ -595,7 +595,7 @@
pc);
}
- Parrot_cx_set_pc(interp, CONTEXT(interp), pc);
+ Parrot_pcc_set_pc(interp, CONTEXT(interp), pc);
DO_OP(pc, interp);
if (interp->pdb->state & PDB_STOPPED) {
Modified: branches/context_pmc3/src/runcore/main.c
==============================================================================
--- branches/context_pmc3/src/runcore/main.c Sun Aug 30 08:58:32 2009 (r40860)
+++ branches/context_pmc3/src/runcore/main.c Sun Aug 30 09:24:34 2009 (r40861)
@@ -541,7 +541,7 @@
N * sizeof (void *));
#endif
/* calc and remember pred_offset */
- Parrot_cx_set_pred_offset(interp, CONTEXT(interp), pc - (opcode_t *)temp);
+ Parrot_pcc_set_pred_offset(interp, CONTEXT(interp), pc - (opcode_t *)temp);
/* fill with the prederef__ opcode function */
if (which == PARROT_SWITCH_CORE || which == PARROT_SWITCH_JIT_CORE)
Modified: branches/context_pmc3/src/scheduler.c
==============================================================================
--- branches/context_pmc3/src/scheduler.c Sun Aug 30 08:58:32 2009 (r40860)
+++ branches/context_pmc3/src/scheduler.c Sun Aug 30 09:24:34 2009 (r40861)
@@ -865,7 +865,7 @@
* Note that we are now trying to handle the new exception,
* not the initial task argument (exception or whatever).
*/
- context = Parrot_cx_get_caller_ctx(interp, keep_context);
+ context = Parrot_pcc_get_caller_ctx(interp, keep_context);
keep_context = NULL;
if (context && !PMC_IS_NULL(CONTEXT_FIELD(interp, context, handlers)))
iter = VTABLE_get_iter(interp, CONTEXT_FIELD(interp, context, handlers));
@@ -918,7 +918,7 @@
}
/* Continue the search in the next context up the chain. */
- context = Parrot_cx_get_caller_ctx(interp, context);
+ context = Parrot_pcc_get_caller_ctx(interp, context);
if (context && !PMC_IS_NULL(CONTEXT_FIELD(interp, context, handlers)))
iter = VTABLE_get_iter(interp, CONTEXT_FIELD(interp, context, handlers));
else
Modified: branches/context_pmc3/src/sub.c
==============================================================================
--- branches/context_pmc3/src/sub.c Sun Aug 30 08:58:32 2009 (r40860)
+++ branches/context_pmc3/src/sub.c Sun Aug 30 09:24:34 2009 (r40861)
@@ -80,7 +80,7 @@
cc->address = NULL;
}
- cc->current_results = Parrot_cx_get_results(interp, to_ctx);
+ cc->current_results = Parrot_pcc_get_results(interp, to_ctx);
return cc;
}
@@ -149,7 +149,7 @@
{
ASSERT_ARGS(invalidate_retc_context)
PMC *ctx = PMC_cont(cont)->from_ctx;
- cont = Parrot_cx_get_continuation(interp, ctx);
+ cont = Parrot_pcc_get_continuation(interp, ctx);
while (1) {
/*
@@ -160,8 +160,8 @@
if (!cont || cont->vtable != interp->vtables[enum_class_RetContinuation])
break;
cont->vtable = interp->vtables[enum_class_Continuation];
- ctx = Parrot_cx_get_caller_ctx(interp, ctx);
- cont = Parrot_cx_get_continuation(interp, ctx);
+ ctx = Parrot_pcc_get_caller_ctx(interp, ctx);
+ cont = Parrot_pcc_get_continuation(interp, ctx);
}
}
@@ -264,7 +264,7 @@
info->fullname = NULL;
/* is the current sub of the specified context valid? */
- if (PMC_IS_NULL(Parrot_cx_get_sub(interp, ctx))) {
+ if (PMC_IS_NULL(Parrot_pcc_get_sub(interp, ctx))) {
info->subname = Parrot_str_new(interp, "???", 3);
info->nsname = info->subname;
info->fullname = Parrot_str_new(interp, "??? :: ???", 10);
@@ -273,10 +273,10 @@
}
/* fetch Parrot_sub of the current sub in the given context */
- if (!VTABLE_isa(interp, Parrot_cx_get_sub(interp, ctx), CONST_STRING(interp, "Sub")))
+ if (!VTABLE_isa(interp, Parrot_pcc_get_sub(interp, ctx), CONST_STRING(interp, "Sub")))
return 1;
- PMC_get_sub(interp, Parrot_cx_get_sub(interp, ctx), sub);
+ PMC_get_sub(interp, Parrot_pcc_get_sub(interp, ctx), sub);
/* set the sub name */
info->subname = sub->name;
@@ -287,18 +287,18 @@
}
else {
info->nsname = VTABLE_get_string(interp, sub->namespace_name);
- info->fullname = Parrot_full_sub_name(interp, Parrot_cx_get_sub(interp, ctx));
+ info->fullname = Parrot_full_sub_name(interp, Parrot_pcc_get_sub(interp, ctx));
}
/* return here if there is no current pc */
- if (Parrot_cx_get_pc(interp, ctx) == NULL)
+ if (Parrot_pcc_get_pc(interp, ctx) == NULL)
return 1;
/* calculate the current pc */
- info->pc = Parrot_cx_get_pc(interp, ctx) - sub->seg->base.data;
+ info->pc = Parrot_pcc_get_pc(interp, ctx) - sub->seg->base.data;
/* determine the current source file/line */
- if (Parrot_cx_get_pc(interp, ctx)) {
+ if (Parrot_pcc_get_pc(interp, ctx)) {
const size_t offs = info->pc;
size_t i, n;
opcode_t *pc = sub->seg->base.data;
@@ -379,8 +379,8 @@
{
ASSERT_ARGS(Parrot_find_pad)
while (1) {
- PMC * const lex_pad = Parrot_cx_get_lex_pad(interp, ctx);
- PMC *outer = Parrot_cx_get_outer_ctx(interp, ctx);
+ PMC * const lex_pad = Parrot_pcc_get_lex_pad(interp, ctx);
+ PMC *outer = Parrot_pcc_get_outer_ctx(interp, ctx);
if (!outer)
return lex_pad;
@@ -412,7 +412,7 @@
Parrot_Sub_attributes *current_sub;
Parrot_Sub_attributes *sub;
- PMC_get_sub(interp, Parrot_cx_get_sub(interp, ctx), current_sub);
+ PMC_get_sub(interp, Parrot_pcc_get_sub(interp, ctx), current_sub);
/* MultiSub gets special treatment */
if (VTABLE_isa(interp, sub_pmc, CONST_STRING(interp, "MultiSub"))) {
@@ -532,7 +532,7 @@
/* debug print before context is switched */
if (Interp_trace_TEST(interp, PARROT_TRACE_SUB_CALL_FLAG)) {
- PMC * const sub = Parrot_cx_get_sub(interp, to_ctx);
+ PMC * const sub = Parrot_pcc_get_sub(interp, to_ctx);
Parrot_io_eprintf(interp, "# Back in sub '%Ss', env %p\n",
Parrot_full_sub_name(interp, sub),
More information about the parrot-commits
mailing list