[svn:parrot] r41182 - trunk/src/call
chromatic at svn.parrot.org
chromatic at svn.parrot.org
Thu Sep 10 21:02:27 UTC 2009
Author: chromatic
Date: Thu Sep 10 21:02:26 2009
New Revision: 41182
URL: https://trac.parrot.org/parrot/changeset/41182
Log:
[pcc] Added static, inlineable get_context_struct_fast() for use only in this
file to avoid the function call overhead of calling the exportable
Parrot_pcc_get_context_struct(). Billions of calls to the latter (almost all
from within this file itself) add up; one Rakudo spectest shows a 4.55%
performance improvement.
Modified:
trunk/src/call/context.c
Modified: trunk/src/call/context.c
==============================================================================
--- trunk/src/call/context.c Thu Sep 10 19:36:40 2009 (r41181)
+++ trunk/src/call/context.c Thu Sep 10 21:02:26 2009 (r41182)
@@ -78,6 +78,13 @@
__attribute__nonnull__(2)
FUNC_MODIFIES(*pmcctx);
+PARROT_INLINE
+PARROT_CANNOT_RETURN_NULL
+static Parrot_Context * get_context_struct_fast(PARROT_INTERP,
+ ARGIN(PMC *ctx))
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2);
+
static void init_context(PARROT_INTERP,
ARGMOD(PMC *pmcctx),
ARGIN_NULLOK(PMC *pmcold))
@@ -88,6 +95,9 @@
#define ASSERT_ARGS_clear_regs __attribute__unused__ int _ASSERT_ARGS_CHECK = \
PARROT_ASSERT_ARG(interp) \
|| PARROT_ASSERT_ARG(pmcctx)
+#define ASSERT_ARGS_get_context_struct_fast __attribute__unused__ int _ASSERT_ARGS_CHECK = \
+ PARROT_ASSERT_ARG(interp) \
+ || PARROT_ASSERT_ARG(ctx)
#define ASSERT_ARGS_init_context __attribute__unused__ int _ASSERT_ARGS_CHECK = \
PARROT_ASSERT_ARG(interp) \
|| PARROT_ASSERT_ARG(pmcctx)
@@ -116,7 +126,7 @@
ARGIN_NULLOK(struct PackFile_Constant **constants))
{
ASSERT_ARGS(Parrot_pcc_set_constants)
- Parrot_Context * c = Parrot_pcc_get_context_struct(interp, ctx);
+ Parrot_Context * c = get_context_struct_fast(interp, ctx);
c->constants = constants;
}
@@ -136,7 +146,7 @@
Parrot_pcc_get_int_constant(PARROT_INTERP, ARGIN(PMC *ctx), INTVAL idx)
{
ASSERT_ARGS(Parrot_pcc_get_int_constant)
- Parrot_Context const * c = Parrot_pcc_get_context_struct(interp, ctx);
+ Parrot_Context const * c = get_context_struct_fast(interp, ctx);
return c->constants[idx]->u.integer;
}
@@ -157,7 +167,7 @@
Parrot_pcc_get_num_constant(PARROT_INTERP, ARGIN(PMC *ctx), INTVAL idx)
{
ASSERT_ARGS(Parrot_pcc_get_num_constant)
- Parrot_Context const * c = Parrot_pcc_get_context_struct(interp, ctx);
+ Parrot_Context const * c = get_context_struct_fast(interp, ctx);
return c->constants[idx]->u.number;
}
@@ -178,7 +188,7 @@
Parrot_pcc_get_string_constant(PARROT_INTERP, ARGIN(PMC *ctx), INTVAL idx)
{
ASSERT_ARGS(Parrot_pcc_get_string_constant)
- Parrot_Context const * c = Parrot_pcc_get_context_struct(interp, ctx);
+ Parrot_Context const * c = get_context_struct_fast(interp, ctx);
return c->constants[idx]->u.string;
}
@@ -199,7 +209,7 @@
Parrot_pcc_get_pmc_constant(PARROT_INTERP, ARGIN(PMC *ctx), INTVAL idx)
{
ASSERT_ARGS(Parrot_pcc_get_pmc_constant)
- Parrot_Context const * c = Parrot_pcc_get_context_struct(interp, ctx);
+ Parrot_Context const * c = get_context_struct_fast(interp, ctx);
return c->constants[idx]->u.key;
}
@@ -234,6 +244,7 @@
=cut
*/
+
PARROT_EXPORT
PARROT_CAN_RETURN_NULL
Parrot_Context*
@@ -263,7 +274,7 @@
Parrot_pcc_get_recursion_depth(PARROT_INTERP, ARGIN(PMC *ctx))
{
ASSERT_ARGS(Parrot_pcc_get_recursion_depth)
- Parrot_Context const *c = Parrot_pcc_get_context_struct(interp, ctx);
+ Parrot_Context const *c = get_context_struct_fast(interp, ctx);
return c->recursion_depth;
}
@@ -282,7 +293,7 @@
Parrot_pcc_inc_recursion_depth(PARROT_INTERP, ARGIN(PMC *ctx))
{
ASSERT_ARGS(Parrot_pcc_inc_recursion_depth)
- Parrot_Context *c = Parrot_pcc_get_context_struct(interp, ctx);
+ Parrot_Context *c = get_context_struct_fast(interp, ctx);
return c->recursion_depth++;
}
@@ -301,7 +312,7 @@
Parrot_pcc_dec_recursion_depth(PARROT_INTERP, ARGIN(PMC *ctx))
{
ASSERT_ARGS(Parrot_pcc_dec_recursion_depth)
- Parrot_Context *c = Parrot_pcc_get_context_struct(interp, ctx);
+ Parrot_Context *c = get_context_struct_fast(interp, ctx);
return --c->recursion_depth;
}
@@ -321,7 +332,7 @@
Parrot_pcc_get_caller_ctx(PARROT_INTERP, ARGIN(PMC *ctx))
{
ASSERT_ARGS(Parrot_pcc_get_caller_ctx)
- Parrot_Context const *c = Parrot_pcc_get_context_struct(interp, ctx);
+ Parrot_Context const *c = get_context_struct_fast(interp, ctx);
return c->caller_ctx;
}
@@ -342,7 +353,7 @@
Parrot_pcc_set_caller_ctx(PARROT_INTERP, ARGIN(PMC *ctx), ARGIN(PMC *caller_ctx))
{
ASSERT_ARGS(Parrot_pcc_set_caller_ctx)
- Parrot_Context *c = Parrot_pcc_get_context_struct(interp, ctx);
+ Parrot_Context *c = get_context_struct_fast(interp, ctx);
c->caller_ctx = caller_ctx;
}
@@ -362,7 +373,7 @@
Parrot_pcc_get_outer_ctx(PARROT_INTERP, ARGIN(PMC *ctx))
{
ASSERT_ARGS(Parrot_pcc_get_outer_ctx)
- Parrot_Context const *c = Parrot_pcc_get_context_struct(interp, ctx);
+ Parrot_Context const *c = get_context_struct_fast(interp, ctx);
return c->outer_ctx;
}
@@ -382,7 +393,7 @@
Parrot_pcc_set_outer_ctx(PARROT_INTERP, ARGIN(PMC *ctx), ARGIN(PMC *outer_ctx))
{
ASSERT_ARGS(Parrot_pcc_set_outer_ctx)
- Parrot_Context *c = Parrot_pcc_get_context_struct(interp, ctx);
+ Parrot_Context *c = get_context_struct_fast(interp, ctx);
c->outer_ctx = outer_ctx;
}
@@ -402,7 +413,7 @@
Parrot_pcc_get_lex_pad(PARROT_INTERP, ARGIN(PMC *ctx))
{
ASSERT_ARGS(Parrot_pcc_get_lex_pad)
- Parrot_Context const *c = Parrot_pcc_get_context_struct(interp, ctx);
+ Parrot_Context const *c = get_context_struct_fast(interp, ctx);
return c->lex_pad;
}
@@ -422,7 +433,7 @@
Parrot_pcc_set_lex_pad(PARROT_INTERP, ARGIN(PMC *ctx), ARGIN(PMC *lex_pad))
{
ASSERT_ARGS(Parrot_pcc_set_lex_pad)
- Parrot_Context *c = Parrot_pcc_get_context_struct(interp, ctx);
+ Parrot_Context *c = get_context_struct_fast(interp, ctx);
c->lex_pad = lex_pad;
}
@@ -442,7 +453,7 @@
Parrot_pcc_get_namespace(PARROT_INTERP, ARGIN(PMC *ctx))
{
ASSERT_ARGS(Parrot_pcc_get_namespace)
- Parrot_Context const *c = Parrot_pcc_get_context_struct(interp, ctx);
+ Parrot_Context const *c = get_context_struct_fast(interp, ctx);
return c->current_namespace;
}
@@ -462,7 +473,7 @@
Parrot_pcc_set_namespace(PARROT_INTERP, ARGIN(PMC *ctx), ARGIN_NULLOK(PMC *_namespace))
{
ASSERT_ARGS(Parrot_pcc_set_namespace)
- Parrot_Context *c = Parrot_pcc_get_context_struct(interp, ctx);
+ Parrot_Context *c = get_context_struct_fast(interp, ctx);
c->current_namespace = _namespace;
}
@@ -481,7 +492,7 @@
Parrot_pcc_get_HLL(PARROT_INTERP, ARGIN(PMC *ctx))
{
ASSERT_ARGS(Parrot_pcc_get_HLL)
- Parrot_Context const *c = Parrot_pcc_get_context_struct(interp, ctx);
+ Parrot_Context const *c = get_context_struct_fast(interp, ctx);
return c->current_HLL;
}
@@ -501,7 +512,7 @@
Parrot_pcc_set_HLL(PARROT_INTERP, ARGIN(PMC *ctx), INTVAL hll)
{
ASSERT_ARGS(Parrot_pcc_set_HLL)
- Parrot_Context *c = Parrot_pcc_get_context_struct(interp, ctx);
+ Parrot_Context *c = get_context_struct_fast(interp, ctx);
c->current_HLL = hll;
}
@@ -521,7 +532,7 @@
Parrot_pcc_get_handlers(PARROT_INTERP, ARGIN(PMC *ctx))
{
ASSERT_ARGS(Parrot_pcc_get_handlers)
- Parrot_Context const *c = Parrot_pcc_get_context_struct(interp, ctx);
+ Parrot_Context const *c = get_context_struct_fast(interp, ctx);
return c->handlers;
}
@@ -541,7 +552,7 @@
Parrot_pcc_set_handers(PARROT_INTERP, ARGIN(PMC *ctx), ARGIN(PMC *handlers))
{
ASSERT_ARGS(Parrot_pcc_set_handers)
- Parrot_Context *c = Parrot_pcc_get_context_struct(interp, ctx);
+ Parrot_Context *c = get_context_struct_fast(interp, ctx);
c->handlers = handlers;
}
@@ -561,7 +572,7 @@
Parrot_pcc_get_continuation(PARROT_INTERP, ARGIN(PMC *ctx))
{
ASSERT_ARGS(Parrot_pcc_get_continuation)
- Parrot_Context const *c = Parrot_pcc_get_context_struct(interp, ctx);
+ Parrot_Context const *c = get_context_struct_fast(interp, ctx);
return c->current_cont;
}
@@ -582,7 +593,7 @@
Parrot_pcc_set_continuation(PARROT_INTERP, ARGIN(PMC *ctx), ARGIN_NULLOK(PMC *_continuation))
{
ASSERT_ARGS(Parrot_pcc_set_continuation)
- Parrot_Context *c = Parrot_pcc_get_context_struct(interp, ctx);
+ Parrot_Context *c = get_context_struct_fast(interp, ctx);
c->current_cont = _continuation;
}
@@ -602,7 +613,7 @@
Parrot_pcc_get_object(PARROT_INTERP, ARGIN(PMC *ctx))
{
ASSERT_ARGS(Parrot_pcc_get_object)
- Parrot_Context const *c = Parrot_pcc_get_context_struct(interp, ctx);
+ Parrot_Context const *c = get_context_struct_fast(interp, ctx);
return c->current_object;
}
@@ -622,7 +633,7 @@
Parrot_pcc_set_object(PARROT_INTERP, ARGIN(PMC *ctx), ARGIN_NULLOK(PMC *object))
{
ASSERT_ARGS(Parrot_pcc_set_object)
- Parrot_Context *c = Parrot_pcc_get_context_struct(interp, ctx);
+ Parrot_Context *c = get_context_struct_fast(interp, ctx);
c->current_object = object;
}
@@ -642,7 +653,7 @@
Parrot_pcc_get_sub(PARROT_INTERP, ARGIN(PMC *ctx))
{
ASSERT_ARGS(Parrot_pcc_get_sub)
- Parrot_Context const *c = Parrot_pcc_get_context_struct(interp, ctx);
+ Parrot_Context const *c = get_context_struct_fast(interp, ctx);
return c->current_sub;
}
@@ -662,7 +673,7 @@
Parrot_pcc_set_sub(PARROT_INTERP, ARGIN(PMC *ctx), ARGIN_NULLOK(PMC *sub))
{
ASSERT_ARGS(Parrot_pcc_set_sub)
- Parrot_Context *c = Parrot_pcc_get_context_struct(interp, ctx);
+ Parrot_Context *c = get_context_struct_fast(interp, ctx);
c->current_sub = sub;
}
@@ -682,7 +693,7 @@
Parrot_pcc_get_pc(PARROT_INTERP, ARGIN(PMC *ctx))
{
ASSERT_ARGS(Parrot_pcc_get_pc)
- Parrot_Context const *c = Parrot_pcc_get_context_struct(interp, ctx);
+ Parrot_Context const *c = get_context_struct_fast(interp, ctx);
return c->current_pc;
}
@@ -702,7 +713,7 @@
Parrot_pcc_set_pc(PARROT_INTERP, ARGIN(PMC *ctx), ARGIN_NULLOK(opcode_t *pc))
{
ASSERT_ARGS(Parrot_pcc_set_pc)
- Parrot_Context *c = Parrot_pcc_get_context_struct(interp, ctx);
+ Parrot_Context *c = get_context_struct_fast(interp, ctx);
c->current_pc = pc;
}
@@ -722,7 +733,7 @@
Parrot_pcc_get_results(PARROT_INTERP, ARGIN(PMC *ctx))
{
ASSERT_ARGS(Parrot_pcc_get_results)
- Parrot_Context const *c = Parrot_pcc_get_context_struct(interp, ctx);
+ Parrot_Context const *c = get_context_struct_fast(interp, ctx);
return c->current_results;
}
@@ -742,7 +753,7 @@
Parrot_pcc_set_results(PARROT_INTERP, ARGIN(PMC *ctx), ARGIN_NULLOK(opcode_t *pc))
{
ASSERT_ARGS(Parrot_pcc_set_results)
- Parrot_Context *c = Parrot_pcc_get_context_struct(interp, ctx);
+ Parrot_Context *c = get_context_struct_fast(interp, ctx);
c->current_results = pc;
}
@@ -762,7 +773,7 @@
Parrot_pcc_get_results_signature(PARROT_INTERP, ARGIN(PMC *ctx))
{
ASSERT_ARGS(Parrot_pcc_get_results_signature)
- Parrot_Context const *c = Parrot_pcc_get_context_struct(interp, ctx);
+ Parrot_Context const *c = get_context_struct_fast(interp, ctx);
return c->results_signature;
}
@@ -783,7 +794,7 @@
Parrot_pcc_set_results_signature(PARROT_INTERP, ARGIN(PMC *ctx), ARGIN_NULLOK(PMC *sig))
{
ASSERT_ARGS(Parrot_pcc_set_results_signature)
- Parrot_Context *c = Parrot_pcc_get_context_struct(interp, ctx);
+ Parrot_Context *c = get_context_struct_fast(interp, ctx);
c->results_signature = sig;
}
@@ -803,7 +814,7 @@
Parrot_pcc_get_pred_offset(PARROT_INTERP, ARGIN(PMC *ctx))
{
ASSERT_ARGS(Parrot_pcc_get_pred_offset)
- Parrot_Context const *c = Parrot_pcc_get_context_struct(interp, ctx);
+ Parrot_Context const *c = get_context_struct_fast(interp, ctx);
return c->pred_offset;
}
@@ -824,7 +835,7 @@
Parrot_pcc_set_pred_offset(PARROT_INTERP, ARGIN(PMC *ctx), size_t pred_offset)
{
ASSERT_ARGS(Parrot_pcc_set_pred_offset)
- Parrot_Context *c = Parrot_pcc_get_context_struct(interp, ctx);
+ Parrot_Context *c = get_context_struct_fast(interp, ctx);
c->pred_offset = pred_offset;
}
@@ -844,7 +855,7 @@
Parrot_pcc_warnings_on(PARROT_INTERP, ARGIN(PMC *ctx), UINTVAL flags)
{
ASSERT_ARGS(Parrot_pcc_warnings_on)
- Parrot_Context *c = Parrot_pcc_get_context_struct(interp, ctx);
+ Parrot_Context *c = get_context_struct_fast(interp, ctx);
c->warns |= flags;
return c->warns;
}
@@ -865,7 +876,7 @@
Parrot_pcc_warnings_off(PARROT_INTERP, ARGIN(PMC *ctx), UINTVAL flags)
{
ASSERT_ARGS(Parrot_pcc_warnings_off)
- Parrot_Context *c = Parrot_pcc_get_context_struct(interp, ctx);
+ Parrot_Context *c = get_context_struct_fast(interp, ctx);
c->warns &= ~flags;
}
@@ -886,7 +897,7 @@
Parrot_pcc_warnings_test(PARROT_INTERP, ARGIN(PMC *ctx), UINTVAL flags)
{
ASSERT_ARGS(Parrot_pcc_warnings_test)
- Parrot_Context *c = Parrot_pcc_get_context_struct(interp, ctx);
+ Parrot_Context *c = get_context_struct_fast(interp, ctx);
return c->warns & flags;
}
@@ -905,7 +916,7 @@
Parrot_pcc_errors_on(PARROT_INTERP, ARGIN(PMC *ctx), UINTVAL flags)
{
ASSERT_ARGS(Parrot_pcc_errors_on)
- Parrot_Context *c = Parrot_pcc_get_context_struct(interp, ctx);
+ Parrot_Context *c = get_context_struct_fast(interp, ctx);
c->errors |= flags;
}
@@ -925,7 +936,7 @@
Parrot_pcc_errors_off(PARROT_INTERP, ARGIN(PMC *ctx), UINTVAL flags)
{
ASSERT_ARGS(Parrot_pcc_errors_off)
- Parrot_Context *c = Parrot_pcc_get_context_struct(interp, ctx);
+ Parrot_Context *c = get_context_struct_fast(interp, ctx);
c->errors &= ~flags;
}
@@ -945,7 +956,7 @@
Parrot_pcc_errors_test(PARROT_INTERP, ARGIN(PMC *ctx), UINTVAL flags)
{
ASSERT_ARGS(Parrot_pcc_errors_test)
- Parrot_Context *c = Parrot_pcc_get_context_struct(interp, ctx);
+ Parrot_Context *c = get_context_struct_fast(interp, ctx);
return c->errors & flags;
}
@@ -964,7 +975,7 @@
Parrot_pcc_trace_flags_on(PARROT_INTERP, ARGIN(PMC *ctx), UINTVAL flags)
{
ASSERT_ARGS(Parrot_pcc_trace_flags_on)
- Parrot_Context *c = Parrot_pcc_get_context_struct(interp, ctx);
+ Parrot_Context *c = get_context_struct_fast(interp, ctx);
c->trace_flags |= flags;
}
@@ -984,7 +995,7 @@
Parrot_pcc_trace_flags_off(PARROT_INTERP, ARGIN(PMC *ctx), UINTVAL flags)
{
ASSERT_ARGS(Parrot_pcc_trace_flags_off)
- Parrot_Context *c = Parrot_pcc_get_context_struct(interp, ctx);
+ Parrot_Context *c = get_context_struct_fast(interp, ctx);
c->trace_flags &= ~flags;
}
@@ -1005,7 +1016,7 @@
Parrot_pcc_trace_flags_test(PARROT_INTERP, ARGIN(PMC *ctx), UINTVAL flags)
{
ASSERT_ARGS(Parrot_pcc_trace_flags_test)
- Parrot_Context *c = Parrot_pcc_get_context_struct(interp, ctx);
+ Parrot_Context *c = get_context_struct_fast(interp, ctx);
return c->trace_flags & flags;
}
@@ -1041,6 +1052,31 @@
UNUSED(ignored);
}
+/*
+
+=item C<Parrot_Context* get_context_struct_fast(PARROT_INTERP, PMC *ctx)>
+
+Fetches Parrot_Context from Context PMC. This is a static, inlineable function
+so it only works within this file. It also only works if you *know* that ctx
+is a valid PMC, so be careful. This is an encapsulation-breaking optimization
+that improves performance measurably. Use responsibly. Never export this
+function.
+
+=cut
+
+
+*/
+
+PARROT_INLINE
+PARROT_CANNOT_RETURN_NULL
+static Parrot_Context *
+get_context_struct_fast(PARROT_INTERP, ARGIN(PMC *ctx))
+{
+ ASSERT_ARGS(get_context_struct_fast)
+
+ /* temporarily violate encapsulation; big speedup here */
+ return PMC_data_typed(ctx, Parrot_Context *);
+}
/*
@@ -1059,7 +1095,7 @@
{
ASSERT_ARGS(clear_regs)
UINTVAL i;
- Parrot_Context *ctx = Parrot_pcc_get_context_struct(interp, pmcctx);
+ Parrot_Context *ctx = get_context_struct_fast(interp, pmcctx);
/* NULL out registers - P/S have to be NULL for GC
*
@@ -1101,7 +1137,9 @@
init_context(PARROT_INTERP, ARGMOD(PMC *pmcctx), ARGIN_NULLOK(PMC *pmcold))
{
ASSERT_ARGS(init_context)
- Parrot_Context *ctx = Parrot_pcc_get_context_struct(interp, pmcctx);
+ Parrot_Context *ctx = get_context_struct_fast(interp, pmcctx);
+
+ /* pmcold may be null, so use the maybe null case */
Parrot_Context *old = Parrot_pcc_get_context_struct(interp, pmcold);
ctx->current_results = NULL;
@@ -1419,7 +1457,7 @@
{
ASSERT_ARGS(Parrot_pcc_get_INTVAL_reg)
PARROT_ASSERT(Parrot_pcc_get_regs_used(interp, ctx, REGNO_INT) > idx);
- return &(Parrot_pcc_get_context_struct(interp, ctx)->bp.regs_i[idx]);
+ return &(get_context_struct_fast(interp, ctx)->bp.regs_i[idx]);
}
/*
@@ -1440,7 +1478,7 @@
{
ASSERT_ARGS(Parrot_pcc_get_FLOATVAL_reg)
PARROT_ASSERT(Parrot_pcc_get_regs_used(interp, ctx, REGNO_NUM) > idx);
- return &(Parrot_pcc_get_context_struct(interp, ctx)->bp.regs_n[-1L - idx]);
+ return &(get_context_struct_fast(interp, ctx)->bp.regs_n[-1L - idx]);
}
/*
@@ -1461,7 +1499,7 @@
{
ASSERT_ARGS(Parrot_pcc_get_STRING_reg)
PARROT_ASSERT(Parrot_pcc_get_regs_used(interp, ctx, REGNO_STR) > idx);
- return &(Parrot_pcc_get_context_struct(interp, ctx)->bp_ps.regs_s[idx]);
+ return &(get_context_struct_fast(interp, ctx)->bp_ps.regs_s[idx]);
}
/*
@@ -1481,7 +1519,7 @@
{
ASSERT_ARGS(Parrot_pcc_get_PMC_reg)
PARROT_ASSERT(Parrot_pcc_get_regs_used(interp, ctx, REGNO_PMC) > idx);
- return &(Parrot_pcc_get_context_struct(interp, ctx)->bp_ps.regs_p[-1L - idx]);
+ return &(get_context_struct_fast(interp, ctx)->bp_ps.regs_p[-1L - idx]);
}
/*
@@ -1498,7 +1536,7 @@
Parrot_pcc_get_regs_used(PARROT_INTERP, ARGIN(PMC *ctx), int type)
{
ASSERT_ARGS(Parrot_pcc_get_regs_used)
- return Parrot_pcc_get_context_struct(interp, ctx)->n_regs_used[type];
+ return get_context_struct_fast(interp, ctx)->n_regs_used[type];
}
/*
@@ -1516,7 +1554,7 @@
Parrot_pcc_set_regs_used(PARROT_INTERP, ARGIN(PMC *ctx), int type, INTVAL num)
{
ASSERT_ARGS(Parrot_pcc_set_regs_used)
- Parrot_pcc_get_context_struct(interp, ctx)->n_regs_used[type] = num;
+ get_context_struct_fast(interp, ctx)->n_regs_used[type] = num;
}
/*
@@ -1534,7 +1572,7 @@
Parrot_pcc_get_regs_ni(PARROT_INTERP, ARGIN(PMC *ctx))
{
ASSERT_ARGS(Parrot_pcc_get_regs_ni)
- return &(Parrot_pcc_get_context_struct(interp, ctx)->bp);
+ return &(get_context_struct_fast(interp, ctx)->bp);
}
/*
@@ -1552,7 +1590,7 @@
Parrot_pcc_set_regs_ni(PARROT_INTERP, ARGIN(PMC *ctx), ARGIN(Regs_ni *bp))
{
ASSERT_ARGS(Parrot_pcc_set_regs_ni)
- Parrot_pcc_get_context_struct(interp, ctx)->bp = *bp;
+ get_context_struct_fast(interp, ctx)->bp = *bp;
}
/*
@@ -1570,7 +1608,7 @@
Parrot_pcc_get_regs_ps(PARROT_INTERP, ARGIN(PMC *ctx))
{
ASSERT_ARGS(Parrot_pcc_get_regs_ps)
- return &(Parrot_pcc_get_context_struct(interp, ctx)->bp_ps);
+ return &(get_context_struct_fast(interp, ctx)->bp_ps);
}
/*
@@ -1588,7 +1626,7 @@
Parrot_pcc_set_regs_ps(PARROT_INTERP, ARGIN(PMC *ctx), ARGIN(Regs_ps *bp_ps))
{
ASSERT_ARGS(Parrot_pcc_set_regs_ps)
- Parrot_pcc_get_context_struct(interp, ctx)->bp_ps = *bp_ps;
+ get_context_struct_fast(interp, ctx)->bp_ps = *bp_ps;
}
More information about the parrot-commits
mailing list