Skip to content

Commit

Permalink
Finished sub.c function renaming
Browse files Browse the repository at this point in the history
Signed-off-by: Jonathan "Duke" Leto <jonathan@leto.net>
  • Loading branch information
schallert authored and leto committed Dec 4, 2010
1 parent 6233b6e commit 6aa336c
Show file tree
Hide file tree
Showing 8 changed files with 26 additions and 26 deletions.
2 changes: 1 addition & 1 deletion docs/embed.pod
Expand Up @@ -658,7 +658,7 @@ The list may also be augmented if additional functionality is required.

=item C<Parrot_freeze_at_destruct>

=item C<Parrot_full_sub_name>
=item C<Parrot_sub_full_sub_name>

=item C<parrot_gc_context>

Expand Down
12 changes: 6 additions & 6 deletions include/parrot/sub.h
Expand Up @@ -168,7 +168,7 @@ void Parrot_sub_capture_lex(PARROT_INTERP, ARGMOD(PMC *sub_pmc))
FUNC_MODIFIES(*sub_pmc);

PARROT_EXPORT
int Parrot_Context_get_info(PARROT_INTERP,
int Parrot_sub_context_get_info(PARROT_INTERP,
ARGIN(PMC *ctx),
ARGOUT(Parrot_Context_info *info))
__attribute__nonnull__(1)
Expand All @@ -186,7 +186,7 @@ STRING* Parrot_sub_Context_infostr(PARROT_INTERP, ARGIN(PMC *ctx))
PARROT_EXPORT
PARROT_CAN_RETURN_NULL
PARROT_WARN_UNUSED_RESULT
STRING* Parrot_full_sub_name(PARROT_INTERP, ARGIN_NULLOK(PMC* sub_pmc))
STRING* Parrot_sub_full_sub_name(PARROT_INTERP, ARGIN_NULLOK(PMC* sub_pmc))
__attribute__nonnull__(1);

PARROT_EXPORT
Expand All @@ -202,7 +202,7 @@ PMC* Parrot_sub_new_closure(PARROT_INTERP, ARGIN(PMC *sub_pmc))
__attribute__nonnull__(1)
__attribute__nonnull__(2);

void mark_context_start(void);
void Parrot_sub_mark_context_start(void);
void Parrot_sub_continuation_check(PARROT_INTERP, ARGIN(const PMC *pmc))
__attribute__nonnull__(1)
__attribute__nonnull__(2);
Expand Down Expand Up @@ -243,14 +243,14 @@ INTVAL Parrot_sub_get_line_from_pc(PARROT_INTERP,
#define ASSERT_ARGS_Parrot_sub_capture_lex __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp) \
, PARROT_ASSERT_ARG(sub_pmc))
#define ASSERT_ARGS_Parrot_Context_get_info __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
#define ASSERT_ARGS_Parrot_sub_context_get_info __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp) \
, PARROT_ASSERT_ARG(ctx) \
, PARROT_ASSERT_ARG(info))
#define ASSERT_ARGS_Parrot_sub_Context_infostr __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp) \
, PARROT_ASSERT_ARG(ctx))
#define ASSERT_ARGS_Parrot_full_sub_name __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
#define ASSERT_ARGS_Parrot_sub_full_sub_name __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp))
#define ASSERT_ARGS_Parrot_get_sub_pmc_from_subclass \
__attribute__unused__ int _ASSERT_ARGS_CHECK = (\
Expand All @@ -259,7 +259,7 @@ INTVAL Parrot_sub_get_line_from_pc(PARROT_INTERP,
#define ASSERT_ARGS_Parrot_sub_new_closure __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp) \
, PARROT_ASSERT_ARG(sub_pmc))
#define ASSERT_ARGS_mark_context_start __attribute__unused__ int _ASSERT_ARGS_CHECK = (0)
#define ASSERT_ARGS_Parrot_sub_mark_context_start __attribute__unused__ int _ASSERT_ARGS_CHECK = (0)
#define ASSERT_ARGS_Parrot_sub_continuation_check __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp) \
, PARROT_ASSERT_ARG(pmc))
Expand Down
4 changes: 2 additions & 2 deletions src/dynoplibs/debug.ops
Expand Up @@ -117,7 +117,7 @@ Get the current line number.

inline op getline(out INT) {
Parrot_Context_info info;
Parrot_Context_get_info(interp, CURRENT_CONTEXT(interp), &info);
Parrot_sub_context_get_info(interp, CURRENT_CONTEXT(interp), &info);
$1 = info.line;
}

Expand All @@ -129,7 +129,7 @@ Get the name of the current file.

inline op getfile(out STR) {
Parrot_Context_info info;
Parrot_Context_get_info(interp, CURRENT_CONTEXT(interp), &info);
Parrot_sub_context_get_info(interp, CURRENT_CONTEXT(interp), &info);
$1 = info.file;
}

Expand Down
2 changes: 1 addition & 1 deletion src/gc/mark_sweep.c
Expand Up @@ -161,7 +161,7 @@ Parrot_gc_trace_root(PARROT_INTERP,
PObj *obj;

/* note: adding locals here did cause increased GC runs */
mark_context_start();
Parrot_sub_mark_context_start();

if (trace == GC_TRACE_SYSTEM_ONLY) {
trace_system_areas(interp, mem_pools);
Expand Down
4 changes: 2 additions & 2 deletions src/pmc/coroutine.pmc
Expand Up @@ -67,11 +67,11 @@ print_sub_name(PARROT_INTERP, ARGIN(PMC *sub_pmc))
Parrot_io_eprintf(tracer, "# %s coroutine '%Ss'",
!(PObj_get_FLAGS(sub_pmc) & SUB_FLAG_CORO_FF) ?
"Calling" : "yielding from",
Parrot_full_sub_name(interp, sub_pmc));
Parrot_sub_full_sub_name(interp, sub_pmc));

if (!PMC_IS_NULL(ctx) && (PObj_get_FLAGS(sub_pmc) & SUB_FLAG_CORO_FF)) {
Parrot_io_eprintf(tracer, " to '%Ss'",
Parrot_full_sub_name(interp,
Parrot_sub_full_sub_name(interp,
Parrot_pcc_get_sub(interp, Parrot_pcc_get_caller_ctx(interp, ctx))));
}

Expand Down
2 changes: 1 addition & 1 deletion src/pmc/sub.pmc
Expand Up @@ -51,7 +51,7 @@ print_sub_name(PARROT_INTERP, ARGIN_NULLOK(PMC *sub))

/* sub was located via globals */
Parrot_io_eprintf(tracer, "# Calling sub '%Ss'\n# ",
Parrot_full_sub_name(interp, sub));
Parrot_sub_full_sub_name(interp, sub));

print_pbc_location(interp);
}
Expand Down
24 changes: 12 additions & 12 deletions src/sub.c
Expand Up @@ -29,7 +29,7 @@ Subroutines, continuations, co-routines and other fun stuff...

/*
=item C<void mark_context_start(void)>
=item C<void Parrot_sub_mark_context_start(void)>
Indicate that a new round of context marking is about to take place.
Expand All @@ -40,16 +40,16 @@ Indicate that a new round of context marking is about to take place.
static int context_gc_mark = 0;

void
mark_context_start(void)
Parrot_sub_mark_context_start(void)
{
ASSERT_ARGS(mark_context_start)
ASSERT_ARGS(Parrot_sub_mark_context_start)
if (++context_gc_mark == 0) context_gc_mark = 1;
}


/*
=item C<STRING* Parrot_full_sub_name(PARROT_INTERP, PMC* sub_pmc)>
=item C<STRING* Parrot_sub_full_sub_name(PARROT_INTERP, PMC* sub_pmc)>
Return namespace, name, and location of subroutine.
Expand All @@ -61,9 +61,9 @@ PARROT_EXPORT
PARROT_CAN_RETURN_NULL
PARROT_WARN_UNUSED_RESULT
STRING*
Parrot_full_sub_name(PARROT_INTERP, ARGIN_NULLOK(PMC* sub_pmc))
Parrot_sub_full_sub_name(PARROT_INTERP, ARGIN_NULLOK(PMC* sub_pmc))
{
ASSERT_ARGS(Parrot_full_sub_name)
ASSERT_ARGS(Parrot_sub_full_sub_name)
if (sub_pmc && VTABLE_defined(interp, sub_pmc)) {
Parrot_Sub_attributes *sub;

Expand Down Expand Up @@ -105,7 +105,7 @@ Parrot_full_sub_name(PARROT_INTERP, ARGIN_NULLOK(PMC* sub_pmc))

/*
=item C<int Parrot_Context_get_info(PARROT_INTERP, PMC *ctx, Parrot_Context_info
=item C<int Parrot_sub_context_get_info(PARROT_INTERP, PMC *ctx, Parrot_Context_info
*info)>
Takes pointers to a context and its information table.
Expand All @@ -118,10 +118,10 @@ Used by Parrot_sub_Context_infostr.

PARROT_EXPORT
int
Parrot_Context_get_info(PARROT_INTERP, ARGIN(PMC *ctx),
Parrot_sub_context_get_info(PARROT_INTERP, ARGIN(PMC *ctx),
ARGOUT(Parrot_Context_info *info))
{
ASSERT_ARGS(Parrot_Context_get_info)
ASSERT_ARGS(Parrot_sub_context_get_info)
PMC *subpmc;
Parrot_Sub_attributes *sub;
opcode_t *pc;
Expand Down Expand Up @@ -160,7 +160,7 @@ Parrot_Context_get_info(PARROT_INTERP, ARGIN(PMC *ctx),
}
else {
info->nsname = VTABLE_get_string(interp, sub->namespace_name);
info->fullname = Parrot_full_sub_name(interp, subpmc);
info->fullname = Parrot_sub_full_sub_name(interp, subpmc);
}

pc = Parrot_pcc_get_pc(interp, ctx);
Expand Down Expand Up @@ -313,7 +313,7 @@ Parrot_sub_Context_infostr(PARROT_INTERP, ARGIN(PMC *ctx))
: "called from Sub";

Parrot_block_GC_mark(interp);
if (Parrot_Context_get_info(interp, ctx, &info)) {
if (Parrot_sub_context_get_info(interp, ctx, &info)) {

res = Parrot_sprintf_c(interp,
"%s '%Ss' pc %d (%Ss:%d)", msg,
Expand Down Expand Up @@ -514,7 +514,7 @@ Parrot_sub_continuation_rewind_environment(PARROT_INTERP, ARGIN(PMC *pmc))
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),
Parrot_sub_full_sub_name(interp, sub),
interp->dynamic_env);
}

Expand Down
2 changes: 1 addition & 1 deletion src/thread.c
Expand Up @@ -695,7 +695,7 @@ pt_transfer_sub(ARGOUT(Parrot_Interp d), ARGIN(Parrot_Interp s), ARGIN(PMC *sub)
ASSERT_ARGS(pt_transfer_sub)
#if defined THREAD_DEBUG && THREAD_DEBUG
Parrot_io_eprintf(s, "copying over subroutine [%Ss]\n",
Parrot_full_sub_name(s, sub));
Parrot_sub_full_sub_name(s, sub));
#endif
return make_local_copy(d, s, sub);
}
Expand Down

0 comments on commit 6aa336c

Please sign in to comment.