Skip to content

Commit

Permalink
Remove CallContext.results_signature. It's not used anymore
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.parrot.org/parrot/branches/pcc_hackathon_6Mar10@45080 d31e2699-5ff4-0310-a27c-f18f2fbe73fe
  • Loading branch information
bacek committed Mar 21, 2010
1 parent 6648c7d commit a2676d2
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 69 deletions.
27 changes: 0 additions & 27 deletions include/parrot/context.h
Expand Up @@ -223,12 +223,6 @@ UINTVAL Parrot_pcc_get_recursion_depth_func(PARROT_INTERP, ARGIN(PMC *ctx))
__attribute__nonnull__(1)
__attribute__nonnull__(2);

PARROT_EXPORT
PARROT_CAN_RETURN_NULL
PMC* Parrot_pcc_get_results_signature_func(PARROT_INTERP, ARGIN(PMC *ctx))
__attribute__nonnull__(1)
__attribute__nonnull__(2);

PARROT_EXPORT
PARROT_CAN_RETURN_NULL
PMC* Parrot_pcc_get_signature_func(PARROT_INTERP, ARGIN(PMC *ctx))
Expand Down Expand Up @@ -328,13 +322,6 @@ void Parrot_pcc_set_pred_offset_func(PARROT_INTERP,
__attribute__nonnull__(1)
__attribute__nonnull__(2);

PARROT_EXPORT
void Parrot_pcc_set_results_signature_func(PARROT_INTERP,
ARGIN(PMC *ctx),
ARGIN_NULLOK(PMC *sig))
__attribute__nonnull__(1)
__attribute__nonnull__(2);

PARROT_EXPORT
void Parrot_pcc_set_signature_func(PARROT_INTERP,
ARGIN(PMC *ctx),
Expand Down Expand Up @@ -452,10 +439,6 @@ UINTVAL Parrot_pcc_warnings_test_func(PARROT_INTERP,
__attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp) \
, PARROT_ASSERT_ARG(ctx))
#define ASSERT_ARGS_Parrot_pcc_get_results_signature_func \
__attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp) \
, PARROT_ASSERT_ARG(ctx))
#define ASSERT_ARGS_Parrot_pcc_get_signature_func __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp) \
, PARROT_ASSERT_ARG(ctx))
Expand Down Expand Up @@ -507,10 +490,6 @@ UINTVAL Parrot_pcc_warnings_test_func(PARROT_INTERP,
__attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp) \
, PARROT_ASSERT_ARG(ctx))
#define ASSERT_ARGS_Parrot_pcc_set_results_signature_func \
__attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp) \
, PARROT_ASSERT_ARG(ctx))
#define ASSERT_ARGS_Parrot_pcc_set_signature_func __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp) \
, PARROT_ASSERT_ARG(ctx))
Expand Down Expand Up @@ -551,9 +530,6 @@ UINTVAL Parrot_pcc_warnings_test_func(PARROT_INTERP,
# define Parrot_pcc_get_caller_ctx(i, c) (__C(c)->caller_ctx)
# define Parrot_pcc_set_caller_ctx(i, c, value) (__C(c)->caller_ctx = (value))

# define Parrot_pcc_get_results_signature(i, c) (__C(c)->results_signature)
# define Parrot_pcc_set_results_signature(i, c, value) (__C(c)->results_signature = (value))

# define Parrot_pcc_get_namespace(i, c) (__C(c)->current_namespace)
# define Parrot_pcc_set_namespace(i, c, value) (__C(c)->current_namespace = (value))

Expand Down Expand Up @@ -615,9 +591,6 @@ UINTVAL Parrot_pcc_warnings_test_func(PARROT_INTERP,
# define Parrot_pcc_get_caller_ctx(i, c) Parrot_pcc_get_caller_ctx_func((i), (c))
# define Parrot_pcc_set_caller_ctx(i, c, value) Parrot_pcc_set_caller_ctx_func((i), (c), (value))

# define Parrot_pcc_get_results_signature(i, c) Parrot_pcc_get_results_signature_func((i), (c))
# define Parrot_pcc_set_results_signature(i, c, value) Parrot_pcc_set_results_signature_func((i), (c), (value))

# define Parrot_pcc_get_namespace(i, c) Parrot_pcc_get_namespace_func((i), (c))
# define Parrot_pcc_set_namespace(i, c, value) Parrot_pcc_set_namespace_func((i), (c), (value))

Expand Down
1 change: 0 additions & 1 deletion src/call/context.c
Expand Up @@ -315,7 +315,6 @@ init_context(PARROT_INTERP, ARGMOD(PMC *pmcctx), ARGIN_NULLOK(PMC *pmcold))
if (!PMC_IS_NULL(ctx->current_sub))
return;

ctx->results_signature = NULL;
ctx->lex_pad = PMCNULL;
ctx->outer_ctx = NULL;
ctx->current_cont = NULL;
Expand Down
34 changes: 0 additions & 34 deletions src/call/context_accessors.c
Expand Up @@ -469,40 +469,6 @@ Parrot_pcc_set_pc_func(PARROT_INTERP, ARGIN(PMC *ctx), ARGIN_NULLOK(opcode_t *pc
c->current_pc = pc;
}

/*
=item C<PMC* Parrot_pcc_get_results_signature_func(PARROT_INTERP, PMC *ctx)>
=item C<void Parrot_pcc_set_results_signature_func(PARROT_INTERP, PMC *ctx, PMC
*sig)>
Get/set ptr into code with get_results opcode.
=cut
*/

PARROT_EXPORT
PARROT_CAN_RETURN_NULL
PMC*
Parrot_pcc_get_results_signature_func(PARROT_INTERP, ARGIN(PMC *ctx))
{
ASSERT_ARGS(Parrot_pcc_get_results_signature_func)
Parrot_Context const *c = get_context_struct_fast(interp, ctx);
return c->results_signature;
}

PARROT_EXPORT
void
Parrot_pcc_set_results_signature_func(PARROT_INTERP, ARGIN(PMC *ctx), ARGIN_NULLOK(PMC *sig))
{
ASSERT_ARGS(Parrot_pcc_set_results_signature_func)
Parrot_Context *c = get_context_struct_fast(interp, ctx);
PARROT_ASSERT(PMC_IS_NULL(sig) || PObj_is_PMC_TEST(sig));
c->results_signature = sig;
}


/*
=item C<size_t Parrot_pcc_get_pred_offset_func(PARROT_INTERP, PMC *ctx)>
Expand Down
3 changes: 2 additions & 1 deletion src/call/pcc.c
Expand Up @@ -182,7 +182,8 @@ Parrot_PCCINVOKE(PARROT_INTERP, ARGIN(PMC* pmc), ARGMOD(STRING *method_name),

/*
=item C<void Parrot_pcc_add_invocant(PARROT_INTERP, PMC *call_obj, PMC *pmc)>
=item C<static void Parrot_pcc_add_invocant(PARROT_INTERP, PMC *call_obj, PMC
*pmc)>
Adds the given PMC as an invocant to the given CallContext PMC. You should
never have to use this, and it should go away with interp->current_object.
Expand Down
6 changes: 0 additions & 6 deletions src/pmc/callcontext.pmc
Expand Up @@ -315,7 +315,6 @@ pmclass CallContext provides array provides hash auto_attrs {
ATTR PMC *current_cont; /* the return continuation PMC */
ATTR PMC *current_object; /* current object if a method call */
ATTR PMC *current_namespace; /* The namespace we're currently in */
ATTR PMC *results_signature; /* non-const results signature PMC */
ATTR opcode_t *current_pc; /* program counter of Sub invocation */
ATTR PMC *current_sig; /* temporary CallContext PMC for active call */

Expand Down Expand Up @@ -428,9 +427,6 @@ Mark any referenced strings and PMCs.
GET_ATTR_current_namespace(INTERP, SELF, tmp);
Parrot_gc_mark_PMC_alive(INTERP, tmp);

GET_ATTR_results_signature(INTERP, SELF, tmp);
Parrot_gc_mark_PMC_alive(INTERP, tmp);

GET_ATTR_current_sig(INTERP, SELF, tmp);
Parrot_gc_mark_PMC_alive(INTERP, tmp);

Expand Down Expand Up @@ -803,8 +799,6 @@ return current Namespace
GET_ATTR_current_namespace(INTERP, SELF, value);
else if (Parrot_str_equal(INTERP, key, CONST_STRING(INTERP, "handlers")))
GET_ATTR_handlers(INTERP, SELF, value);
else if (Parrot_str_equal(INTERP, key, CONST_STRING(INTERP, "results_signature")))
GET_ATTR_results_signature(INTERP, SELF, value);
else if (Parrot_str_equal(INTERP, key, CONST_STRING(INTERP, "current_HLL"))) {
/* This function from src/hash.c. */
/* We probably have to move it to more suitable place */
Expand Down

0 comments on commit a2676d2

Please sign in to comment.