[svn:parrot] r46426 - trunk/src/call
jimmy at svn.parrot.org
jimmy at svn.parrot.org
Sun May 9 04:37:36 UTC 2010
Author: jimmy
Date: Sun May 9 04:37:35 2010
New Revision: 46426
URL: https://trac.parrot.org/parrot/changeset/46426
Log:
random consting
Modified:
trunk/src/call/context.c
trunk/src/call/context_accessors.c
Modified: trunk/src/call/context.c
==============================================================================
--- trunk/src/call/context.c Sun May 9 04:24:52 2010 (r46425)
+++ trunk/src/call/context.c Sun May 9 04:37:35 2010 (r46426)
@@ -146,7 +146,7 @@
Parrot_pcc_get_sub(PARROT_INTERP, ARGIN(PMC *ctx))
{
ASSERT_ARGS(Parrot_pcc_get_sub)
- Parrot_Context const *c = get_context_struct_fast(interp, ctx);
+ const Parrot_Context *c = get_context_struct_fast(interp, ctx);
return c->current_sub;
}
@@ -166,7 +166,7 @@
Parrot_pcc_set_sub(PARROT_INTERP, ARGIN(PMC *ctx), ARGIN_NULLOK(PMC *sub))
{
ASSERT_ARGS(Parrot_pcc_set_sub)
- Parrot_Context *c = get_context_struct_fast(interp, ctx);
+ Parrot_Context * const c = get_context_struct_fast(interp, ctx);
c->current_sub = sub;
if (sub && !PMC_IS_NULL(sub)) {
@@ -298,7 +298,7 @@
init_context(PARROT_INTERP, ARGMOD(PMC *pmcctx), ARGIN_NULLOK(PMC *pmcold))
{
ASSERT_ARGS(init_context)
- Parrot_Context *ctx = get_context_struct_fast(interp, pmcctx);
+ Parrot_Context * const ctx = get_context_struct_fast(interp, pmcctx);
/* pmcold may be null */
Parrot_Context *old = PMC_IS_NULL(pmcold)
Modified: trunk/src/call/context_accessors.c
==============================================================================
--- trunk/src/call/context_accessors.c Sun May 9 04:24:52 2010 (r46425)
+++ trunk/src/call/context_accessors.c Sun May 9 04:37:35 2010 (r46426)
@@ -92,7 +92,7 @@
ARGIN_NULLOK(struct PackFile_Constant **constants))
{
ASSERT_ARGS(Parrot_pcc_set_constants_func)
- Parrot_Context * c = get_context_struct_fast(interp, ctx);
+ Parrot_Context * const c = get_context_struct_fast(interp, ctx);
c->constants = constants;
}
@@ -111,7 +111,7 @@
Parrot_pcc_get_recursion_depth_func(PARROT_INTERP, ARGIN(PMC *ctx))
{
ASSERT_ARGS(Parrot_pcc_get_recursion_depth_func)
- Parrot_Context const *c = get_context_struct_fast(interp, ctx);
+ const Parrot_Context *c = get_context_struct_fast(interp, ctx);
return c->recursion_depth;
}
@@ -130,7 +130,7 @@
Parrot_pcc_inc_recursion_depth_func(PARROT_INTERP, ARGIN(PMC *ctx))
{
ASSERT_ARGS(Parrot_pcc_inc_recursion_depth_func)
- Parrot_Context *c = get_context_struct_fast(interp, ctx);
+ Parrot_Context * const c = get_context_struct_fast(interp, ctx);
return c->recursion_depth++;
}
@@ -149,7 +149,7 @@
Parrot_pcc_dec_recursion_depth_func(PARROT_INTERP, ARGIN(PMC *ctx))
{
ASSERT_ARGS(Parrot_pcc_dec_recursion_depth_func)
- Parrot_Context *c = get_context_struct_fast(interp, ctx);
+ Parrot_Context * const c = get_context_struct_fast(interp, ctx);
return --c->recursion_depth;
}
@@ -172,7 +172,7 @@
Parrot_pcc_get_caller_ctx_func(PARROT_INTERP, ARGIN(PMC *ctx))
{
ASSERT_ARGS(Parrot_pcc_get_caller_ctx_func)
- Parrot_Context const *c = get_context_struct_fast(interp, ctx);
+ const Parrot_Context *c = get_context_struct_fast(interp, ctx);
return c->caller_ctx;
}
@@ -181,7 +181,7 @@
Parrot_pcc_set_caller_ctx_func(PARROT_INTERP, ARGIN(PMC *ctx), ARGIN(PMC *caller_ctx))
{
ASSERT_ARGS(Parrot_pcc_set_caller_ctx_func)
- Parrot_Context *c = get_context_struct_fast(interp, ctx);
+ Parrot_Context * const c = get_context_struct_fast(interp, ctx);
c->caller_ctx = caller_ctx;
}
@@ -204,7 +204,7 @@
Parrot_pcc_get_outer_ctx_func(PARROT_INTERP, ARGIN(PMC *ctx))
{
ASSERT_ARGS(Parrot_pcc_get_outer_ctx_func)
- Parrot_Context const *c = get_context_struct_fast(interp, ctx);
+ const Parrot_Context *c = get_context_struct_fast(interp, ctx);
return c->outer_ctx;
}
@@ -213,7 +213,7 @@
Parrot_pcc_set_outer_ctx_func(PARROT_INTERP, ARGIN(PMC *ctx), ARGIN(PMC *outer_ctx))
{
ASSERT_ARGS(Parrot_pcc_set_outer_ctx_func)
- Parrot_Context *c = get_context_struct_fast(interp, ctx);
+ Parrot_Context * const c = get_context_struct_fast(interp, ctx);
c->outer_ctx = outer_ctx;
}
@@ -235,7 +235,7 @@
Parrot_pcc_get_lex_pad_func(PARROT_INTERP, ARGIN(PMC *ctx))
{
ASSERT_ARGS(Parrot_pcc_get_lex_pad_func)
- Parrot_Context const *c = get_context_struct_fast(interp, ctx);
+ const Parrot_Context *c = get_context_struct_fast(interp, ctx);
return c->lex_pad;
}
@@ -244,7 +244,7 @@
Parrot_pcc_set_lex_pad_func(PARROT_INTERP, ARGIN(PMC *ctx), ARGIN(PMC *lex_pad))
{
ASSERT_ARGS(Parrot_pcc_set_lex_pad_func)
- Parrot_Context *c = get_context_struct_fast(interp, ctx);
+ Parrot_Context * const c = get_context_struct_fast(interp, ctx);
c->lex_pad = lex_pad;
}
@@ -267,7 +267,7 @@
Parrot_pcc_get_namespace_func(PARROT_INTERP, ARGIN(PMC *ctx))
{
ASSERT_ARGS(Parrot_pcc_get_namespace_func)
- Parrot_Context const *c = get_context_struct_fast(interp, ctx);
+ const Parrot_Context *c = get_context_struct_fast(interp, ctx);
return c->current_namespace;
}
@@ -276,7 +276,7 @@
Parrot_pcc_set_namespace_func(PARROT_INTERP, ARGIN(PMC *ctx), ARGIN_NULLOK(PMC *_namespace))
{
ASSERT_ARGS(Parrot_pcc_set_namespace_func)
- Parrot_Context *c = get_context_struct_fast(interp, ctx);
+ Parrot_Context * const c = get_context_struct_fast(interp, ctx);
c->current_namespace = _namespace;
}
@@ -297,7 +297,7 @@
Parrot_pcc_get_HLL_func(PARROT_INTERP, ARGIN(PMC *ctx))
{
ASSERT_ARGS(Parrot_pcc_get_HLL_func)
- Parrot_Context const *c = get_context_struct_fast(interp, ctx);
+ const Parrot_Context *c = get_context_struct_fast(interp, ctx);
return c->current_HLL;
}
@@ -306,7 +306,7 @@
Parrot_pcc_set_HLL_func(PARROT_INTERP, ARGIN(PMC *ctx), INTVAL hll)
{
ASSERT_ARGS(Parrot_pcc_set_HLL_func)
- Parrot_Context *c = get_context_struct_fast(interp, ctx);
+ Parrot_Context * const c = get_context_struct_fast(interp, ctx);
c->current_HLL = hll;
}
@@ -329,7 +329,7 @@
Parrot_pcc_get_handlers_func(PARROT_INTERP, ARGIN(PMC *ctx))
{
ASSERT_ARGS(Parrot_pcc_get_handlers_func)
- Parrot_Context const *c = get_context_struct_fast(interp, ctx);
+ const Parrot_Context *c = get_context_struct_fast(interp, ctx);
return c->handlers;
}
@@ -339,7 +339,7 @@
Parrot_pcc_set_handlers_func(PARROT_INTERP, ARGIN(PMC *ctx), ARGIN(PMC *handlers))
{
ASSERT_ARGS(Parrot_pcc_set_handlers_func)
- Parrot_Context *c = get_context_struct_fast(interp, ctx);
+ Parrot_Context * const c = get_context_struct_fast(interp, ctx);
c->handlers = handlers;
}
@@ -362,7 +362,7 @@
Parrot_pcc_get_continuation_func(PARROT_INTERP, ARGIN(PMC *ctx))
{
ASSERT_ARGS(Parrot_pcc_get_continuation_func)
- Parrot_Context const *c = get_context_struct_fast(interp, ctx);
+ const Parrot_Context *c = get_context_struct_fast(interp, ctx);
return c->current_cont;
}
@@ -371,7 +371,7 @@
Parrot_pcc_set_continuation_func(PARROT_INTERP, ARGIN(PMC *ctx), ARGIN_NULLOK(PMC *_continuation))
{
ASSERT_ARGS(Parrot_pcc_set_continuation_func)
- Parrot_Context *c = get_context_struct_fast(interp, ctx);
+ Parrot_Context * const c = get_context_struct_fast(interp, ctx);
c->current_cont = _continuation;
}
@@ -394,7 +394,7 @@
Parrot_pcc_get_signature_func(PARROT_INTERP, ARGIN(PMC *ctx))
{
ASSERT_ARGS(Parrot_pcc_get_signature_func)
- Parrot_Context const *c = get_context_struct_fast(interp, ctx);
+ const Parrot_Context *c = get_context_struct_fast(interp, ctx);
return c->current_sig;
}
@@ -403,7 +403,7 @@
Parrot_pcc_set_signature_func(PARROT_INTERP, ARGIN(PMC *ctx), ARGIN_NULLOK(PMC *sig_object))
{
ASSERT_ARGS(Parrot_pcc_set_signature_func)
- Parrot_Context *c = get_context_struct_fast(interp, ctx);
+ Parrot_Context * const c = get_context_struct_fast(interp, ctx);
c->current_sig = sig_object;
}
@@ -425,7 +425,7 @@
Parrot_pcc_get_object_func(PARROT_INTERP, ARGIN(PMC *ctx))
{
ASSERT_ARGS(Parrot_pcc_get_object_func)
- Parrot_Context const *c = get_context_struct_fast(interp, ctx);
+ const Parrot_Context *c = get_context_struct_fast(interp, ctx);
return c->current_object;
}
@@ -434,7 +434,7 @@
Parrot_pcc_set_object_func(PARROT_INTERP, ARGIN(PMC *ctx), ARGIN_NULLOK(PMC *object))
{
ASSERT_ARGS(Parrot_pcc_set_object_func)
- Parrot_Context *c = get_context_struct_fast(interp, ctx);
+ Parrot_Context * const c = get_context_struct_fast(interp, ctx);
c->current_object = object;
}
@@ -456,7 +456,7 @@
Parrot_pcc_get_pc_func(PARROT_INTERP, ARGIN(PMC *ctx))
{
ASSERT_ARGS(Parrot_pcc_get_pc_func)
- Parrot_Context const *c = get_context_struct_fast(interp, ctx);
+ const Parrot_Context *c = get_context_struct_fast(interp, ctx);
return c->current_pc;
}
@@ -465,7 +465,7 @@
Parrot_pcc_set_pc_func(PARROT_INTERP, ARGIN(PMC *ctx), ARGIN_NULLOK(opcode_t *pc))
{
ASSERT_ARGS(Parrot_pcc_set_pc_func)
- Parrot_Context *c = get_context_struct_fast(interp, ctx);
+ Parrot_Context * const c = get_context_struct_fast(interp, ctx);
c->current_pc = pc;
}
@@ -485,7 +485,7 @@
Parrot_pcc_warnings_on_func(PARROT_INTERP, ARGIN(PMC *ctx), UINTVAL flags)
{
ASSERT_ARGS(Parrot_pcc_warnings_on_func)
- Parrot_Context *c = get_context_struct_fast(interp, ctx);
+ Parrot_Context * const c = get_context_struct_fast(interp, ctx);
c->warns |= flags;
return c->warns;
}
@@ -507,7 +507,7 @@
Parrot_pcc_warnings_off_func(PARROT_INTERP, ARGIN(PMC *ctx), UINTVAL flags)
{
ASSERT_ARGS(Parrot_pcc_warnings_off_func)
- Parrot_Context *c = get_context_struct_fast(interp, ctx);
+ Parrot_Context * const c = get_context_struct_fast(interp, ctx);
c->warns &= ~flags;
}
@@ -528,7 +528,7 @@
Parrot_pcc_warnings_test_func(PARROT_INTERP, ARGIN(PMC *ctx), UINTVAL flags)
{
ASSERT_ARGS(Parrot_pcc_warnings_test_func)
- Parrot_Context *c = get_context_struct_fast(interp, ctx);
+ Parrot_Context * const c = get_context_struct_fast(interp, ctx);
return c->warns & flags;
}
@@ -547,7 +547,7 @@
Parrot_pcc_errors_on_func(PARROT_INTERP, ARGIN(PMC *ctx), UINTVAL flags)
{
ASSERT_ARGS(Parrot_pcc_errors_on_func)
- Parrot_Context *c = get_context_struct_fast(interp, ctx);
+ Parrot_Context * const c = get_context_struct_fast(interp, ctx);
c->errors |= flags;
}
@@ -567,7 +567,7 @@
Parrot_pcc_errors_off_func(PARROT_INTERP, ARGIN(PMC *ctx), UINTVAL flags)
{
ASSERT_ARGS(Parrot_pcc_errors_off_func)
- Parrot_Context *c = get_context_struct_fast(interp, ctx);
+ Parrot_Context * const c = get_context_struct_fast(interp, ctx);
c->errors &= ~flags;
}
@@ -587,7 +587,7 @@
Parrot_pcc_errors_test_func(PARROT_INTERP, ARGIN(PMC *ctx), UINTVAL flags)
{
ASSERT_ARGS(Parrot_pcc_errors_test_func)
- Parrot_Context *c = get_context_struct_fast(interp, ctx);
+ Parrot_Context * const c = get_context_struct_fast(interp, ctx);
return c->errors & flags;
}
@@ -607,7 +607,7 @@
Parrot_pcc_trace_flags_on_func(PARROT_INTERP, ARGIN(PMC *ctx), UINTVAL flags)
{
ASSERT_ARGS(Parrot_pcc_trace_flags_on_func)
- Parrot_Context *c = get_context_struct_fast(interp, ctx);
+ Parrot_Context * const c = get_context_struct_fast(interp, ctx);
c->trace_flags |= flags;
}
@@ -628,7 +628,7 @@
Parrot_pcc_trace_flags_off_func(PARROT_INTERP, ARGIN(PMC *ctx), UINTVAL flags)
{
ASSERT_ARGS(Parrot_pcc_trace_flags_off_func)
- Parrot_Context *c = get_context_struct_fast(interp, ctx);
+ Parrot_Context * const c = get_context_struct_fast(interp, ctx);
c->trace_flags &= ~flags;
}
@@ -648,7 +648,7 @@
Parrot_pcc_trace_flags_test_func(PARROT_INTERP, ARGIN(PMC *ctx), UINTVAL flags)
{
ASSERT_ARGS(Parrot_pcc_trace_flags_test_func)
- Parrot_Context *c = get_context_struct_fast(interp, ctx);
+ Parrot_Context * const c = get_context_struct_fast(interp, ctx);
return c->trace_flags & flags;
}
@@ -679,7 +679,7 @@
Parrot_pcc_get_int_constant_func(PARROT_INTERP, ARGIN(PMC *ctx), INTVAL idx)
{
ASSERT_ARGS(Parrot_pcc_get_int_constant_func)
- Parrot_Context const * c = get_context_struct_fast(interp, ctx);
+ const Parrot_Context * c = get_context_struct_fast(interp, ctx);
PARROT_ASSERT(c->constants[idx]->type == 'i');
return c->constants[idx]->u.integer;
}
@@ -690,7 +690,7 @@
Parrot_pcc_get_num_constant_func(PARROT_INTERP, ARGIN(PMC *ctx), INTVAL idx)
{
ASSERT_ARGS(Parrot_pcc_get_num_constant_func)
- Parrot_Context const * c = get_context_struct_fast(interp, ctx);
+ const Parrot_Context * c = get_context_struct_fast(interp, ctx);
PARROT_ASSERT(c->constants[idx]->type == 'n');
return c->constants[idx]->u.number;
}
@@ -701,7 +701,7 @@
Parrot_pcc_get_string_constant_func(PARROT_INTERP, ARGIN(PMC *ctx), INTVAL idx)
{
ASSERT_ARGS(Parrot_pcc_get_string_constant_func)
- Parrot_Context const * c = get_context_struct_fast(interp, ctx);
+ const Parrot_Context * c = get_context_struct_fast(interp, ctx);
PARROT_ASSERT(c->constants[idx]->type == 's');
return c->constants[idx]->u.string;
}
@@ -712,7 +712,7 @@
Parrot_pcc_get_pmc_constant_func(PARROT_INTERP, ARGIN(PMC *ctx), INTVAL idx)
{
ASSERT_ARGS(Parrot_pcc_get_pmc_constant_func)
- Parrot_Context const * c = get_context_struct_fast(interp, ctx);
+ const Parrot_Context * c = get_context_struct_fast(interp, ctx);
PARROT_ASSERT((c->constants[idx]->type == 'k')
|| (c->constants[idx]->type == 'p'));
return c->constants[idx]->u.key;
More information about the parrot-commits
mailing list