Permalink
Browse files

Merge remote branch 'origin/kill_current_object'

  • Loading branch information...
2 parents 6e92ffe + de3545f commit 5c81f3ea1cf2b5509c82f6cddd61ed04dc4da2a4 @moritz moritz committed Apr 29, 2012
View
@@ -145,12 +145,6 @@ FLOATVAL * Parrot_pcc_get_num_constants_func(PARROT_INTERP,
ARGIN(const PMC *ctx))
__attribute__nonnull__(2);
-PARROT_EXPORT
-PARROT_PURE_FUNCTION
-PARROT_CAN_RETURN_NULL
-PMC* Parrot_pcc_get_object_func(PARROT_INTERP, ARGIN(const PMC *ctx))
- __attribute__nonnull__(2);
-
PARROT_EXPORT
PARROT_PURE_FUNCTION
PARROT_CAN_RETURN_NULL
@@ -259,13 +253,6 @@ void Parrot_pcc_set_namespace_func(PARROT_INTERP,
__attribute__nonnull__(1)
__attribute__nonnull__(2);
-PARROT_EXPORT
-void Parrot_pcc_set_object_func(PARROT_INTERP,
- ARGIN(PMC *ctx),
- ARGIN_NULLOK(PMC *object))
- __attribute__nonnull__(1)
- __attribute__nonnull__(2);
-
PARROT_EXPORT
void Parrot_pcc_set_outer_ctx_func(PARROT_INTERP,
ARGIN(PMC *ctx),
@@ -363,8 +350,6 @@ UINTVAL Parrot_pcc_warnings_test_func(PARROT_INTERP,
#define ASSERT_ARGS_Parrot_pcc_get_num_constants_func \
__attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(ctx))
-#define ASSERT_ARGS_Parrot_pcc_get_object_func __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(ctx))
#define ASSERT_ARGS_Parrot_pcc_get_outer_ctx_func __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(ctx))
#define ASSERT_ARGS_Parrot_pcc_get_pc_func __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
@@ -414,9 +399,6 @@ UINTVAL Parrot_pcc_warnings_test_func(PARROT_INTERP,
#define ASSERT_ARGS_Parrot_pcc_set_namespace_func __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp) \
, PARROT_ASSERT_ARG(ctx))
-#define ASSERT_ARGS_Parrot_pcc_set_object_func __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp) \
- , PARROT_ASSERT_ARG(ctx))
#define ASSERT_ARGS_Parrot_pcc_set_outer_ctx_func __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp) \
, PARROT_ASSERT_ARG(ctx) \
@@ -464,7 +446,6 @@ UINTVAL Parrot_pcc_warnings_test_func(PARROT_INTERP,
# define Parrot_pcc_get_continuation(i, c) (CONTEXT_STRUCT(c)->current_cont)
# define Parrot_pcc_get_caller_ctx(i, c) (CONTEXT_STRUCT(c)->caller_ctx)
# define Parrot_pcc_get_namespace(i, c) (CONTEXT_STRUCT(c)->current_namespace)
-# define Parrot_pcc_get_object(i, c) (CONTEXT_STRUCT(c)->current_object)
# define Parrot_pcc_get_lex_pad(i, c) (CONTEXT_STRUCT(c)->lex_pad)
# define Parrot_pcc_get_handlers(i, c) (CONTEXT_STRUCT(c)->handlers)
@@ -567,10 +548,6 @@ UINTVAL Parrot_pcc_warnings_test_func(PARROT_INTERP,
CONTEXT_STRUCT(c)->current_namespace = (value); \
PARROT_GC_WRITE_BARRIER((i), (c)); \
} while (0)
-# define Parrot_pcc_set_object(i, c, value) do { \
- CONTEXT_STRUCT(c)->current_object = (value); \
- PARROT_GC_WRITE_BARRIER((i), (c)); \
- } while (0)
# define Parrot_pcc_set_lex_pad(i, c, value) do { \
CONTEXT_STRUCT(c)->lex_pad = (value); \
PARROT_GC_WRITE_BARRIER((i), (c)); \
View
@@ -99,7 +99,6 @@ typedef enum {
CURRENT_CTX,
CURRENT_SUB,
CURRENT_CONT,
- CURRENT_OBJECT,
CURRENT_LEXPAD,
CURRENT_TASK,
@@ -68,7 +68,6 @@ END:
# mark it as closed
.local pmc status
- interpinfo self, .INTERPINFO_CURRENT_OBJECT
getattribute status, self, 'status'
status = 0
.end
View
@@ -407,8 +407,6 @@ Parrot_pcc_build_sig_object_from_op(PARROT_INTERP, ARGIN_NULLOK(PMC *signature),
}
else {
VTABLE_push_pmc(interp, call_object, pmc_value);
- if (arg_flags & PARROT_ARG_INVOCANT)
- Parrot_pcc_set_object(interp, call_object, pmc_value);
}
break;
@@ -611,7 +609,6 @@ set_call_from_varargs(PARROT_INTERP,
else {
VTABLE_push_pmc(interp, signature, pmc_arg);
++i; /* skip 'i' */
- Parrot_pcc_set_object(interp, signature, pmc_arg);
}
}
else
View
@@ -244,7 +244,6 @@ init_context(ARGMOD(PMC *pmcctx), ARGIN_NULLOK(PMC *pmcold))
ctx->lex_pad = PMCNULL;
ctx->outer_ctx = NULL;
ctx->current_cont = NULL;
- ctx->current_object = NULL;
ctx->handlers = PMCNULL;
ctx->caller_ctx = NULL;
ctx->current_sig = PMCNULL;
@@ -461,38 +461,6 @@ Parrot_pcc_set_signature_func(PARROT_INTERP, ARGIN(PMC *ctx), ARGIN_NULLOK(PMC *
CONTEXT_STRUCT(ctx)->current_sig = sig_object;
}
-/*
-
-=item C<PMC* Parrot_pcc_get_object_func(PARROT_INTERP, const PMC *ctx)>
-
-=item C<void Parrot_pcc_set_object_func(PARROT_INTERP, PMC *ctx, PMC *object)>
-
-Get object of Context (in method call).
-
-=cut
-
-*/
-
-PARROT_EXPORT
-PARROT_PURE_FUNCTION
-PARROT_CAN_RETURN_NULL
-PMC*
-Parrot_pcc_get_object_func(SHIM_INTERP, ARGIN(const PMC *ctx))
-{
- ASSERT_ARGS(Parrot_pcc_get_object_func)
- PARROT_ASSERT(ctx->vtable->base_type == enum_class_CallContext);
- return CONTEXT_STRUCT(ctx)->current_object;
-}
-
-PARROT_EXPORT
-void
-Parrot_pcc_set_object_func(PARROT_INTERP, ARGIN(PMC *ctx), ARGIN_NULLOK(PMC *object))
-{
- ASSERT_ARGS(Parrot_pcc_set_object_func)
- PARROT_ASSERT(ctx->vtable->base_type == enum_class_CallContext);
- PARROT_GC_WRITE_BARRIER(interp, ctx);
- CONTEXT_STRUCT(ctx)->current_object = object;
-}
/*
View
@@ -298,7 +298,6 @@ Parrot_interp_initialize_interpreter(PARROT_INTERP, ARGIN(Parrot_GC_Init_Args *a
/* clear context introspection vars */
Parrot_pcc_set_sub(interp, CURRENT_CONTEXT(interp), NULL);
Parrot_pcc_set_continuation(interp, CURRENT_CONTEXT(interp), NULL); /* TODO Use PMCNULL */
- Parrot_pcc_set_object(interp, CURRENT_CONTEXT(interp), NULL);
/* initialize built-in runcores */
Parrot_runcore_init(interp);
@@ -860,9 +859,6 @@ Parrot_interp_info_p(PARROT_INTERP, INTVAL what)
case CURRENT_CONT:
result = Parrot_pcc_get_continuation(interp, CURRENT_CONTEXT(interp));
break;
- case CURRENT_OBJECT:
- result = Parrot_pcc_get_object(interp, CURRENT_CONTEXT(interp));
- break;
case CURRENT_LEXPAD:
result = Parrot_pcc_get_lex_pad(interp, CURRENT_CONTEXT(interp));
break;
View
@@ -379,8 +379,6 @@ inline op invokecc(invar PMC) :flow {
Parrot_pcc_set_pc(interp, CURRENT_CONTEXT(interp), dest);
- if (!PMC_IS_NULL(signature))
- Parrot_pcc_set_object(interp, signature, NULL);
Parrot_pcc_reuse_continuation(interp, CURRENT_CONTEXT(interp), dest);
dest = VTABLE_invoke(interp, p, dest);
@@ -395,8 +393,6 @@ inline op invoke(invar PMC, invar PMC) :flow {
Parrot_pcc_set_pc(interp, CURRENT_CONTEXT(interp), dest);
- if (!PMC_IS_NULL(signature))
- Parrot_pcc_set_object(interp, signature, NULL);
interp->current_cont = $2;
dest = VTABLE_invoke(interp, p, dest);
View
@@ -13693,9 +13693,6 @@ Parrot_invokecc_p(opcode_t *cur_opcode, PARROT_INTERP) {
PMC * const signature = Parrot_pcc_get_signature(interp, CURRENT_CONTEXT(interp));
Parrot_pcc_set_pc(interp, CURRENT_CONTEXT(interp), dest);
- if ((!PMC_IS_NULL(signature))) {
- Parrot_pcc_set_object(interp, signature, NULL);
- }
Parrot_pcc_reuse_continuation(interp, CURRENT_CONTEXT(interp), dest);
dest = VTABLE_invoke(interp, p, dest);
@@ -13709,9 +13706,6 @@ Parrot_invoke_p_p(opcode_t *cur_opcode, PARROT_INTERP) {
PMC * const signature = Parrot_pcc_get_signature(interp, CURRENT_CONTEXT(interp));
Parrot_pcc_set_pc(interp, CURRENT_CONTEXT(interp), dest);
- if ((!PMC_IS_NULL(signature))) {
- Parrot_pcc_set_object(interp, signature, NULL);
- }
interp->current_cont = PREG(2);
dest = VTABLE_invoke(interp, p, dest);
@@ -18082,9 +18076,6 @@ Parrot_callmethodcc_p_s(opcode_t *cur_opcode, PARROT_INTERP) {
if ((!PMC_IS_NULL(method_pmc))) {
PMC * const signature = Parrot_pcc_get_signature(interp, CURRENT_CONTEXT(interp));
- if ((!PMC_IS_NULL(signature))) {
- Parrot_pcc_set_object(interp, signature, object);
- }
Parrot_pcc_reuse_continuation(interp, CURRENT_CONTEXT(interp), next);
dest = VTABLE_invoke(interp, method_pmc, next);
@@ -18116,10 +18107,6 @@ Parrot_callmethodcc_p_sc(opcode_t *cur_opcode, PARROT_INTERP) {
if ((!PMC_IS_NULL(method_pmc))) {
PMC * const signature = Parrot_pcc_get_signature(interp, CURRENT_CONTEXT(interp));
- if ((!PMC_IS_NULL(signature))) {
- Parrot_pcc_set_object(interp, signature, object);
- }
-
Parrot_pcc_reuse_continuation(interp, CURRENT_CONTEXT(interp), next);
dest = VTABLE_invoke(interp, method_pmc, next);
}
@@ -18145,9 +18132,6 @@ Parrot_callmethodcc_p_p(opcode_t *cur_opcode, PARROT_INTERP) {
PMC * signature = Parrot_pcc_get_signature(interp, CURRENT_CONTEXT(interp));
Parrot_pcc_set_pc(interp, CURRENT_CONTEXT(interp), next);
- if ((!PMC_IS_NULL(signature))) {
- Parrot_pcc_set_object(interp, signature, PREG(1));
- }
Parrot_pcc_reuse_continuation(interp, CURRENT_CONTEXT(interp), next);
dest = VTABLE_invoke(interp, PREG(2), next);
@@ -18168,9 +18152,6 @@ Parrot_callmethod_p_s_p(opcode_t *cur_opcode, PARROT_INTERP) {
dest = Parrot_ex_throw_from_op_args(interp, next, EXCEPTION_METHOD_NOT_FOUND, "Method '%Ss' not found for invocant of class '%Ss'", meth, VTABLE_get_string(interp, VTABLE_get_class(interp, object)));
}
else {
- if ((!PMC_IS_NULL(signature))) {
- Parrot_pcc_set_object(interp, signature, object);
- }
interp->current_cont = PREG(3);
dest = (opcode_t *)VTABLE_invoke(interp, method_pmc, next);
@@ -18193,9 +18174,6 @@ Parrot_callmethod_p_sc_p(opcode_t *cur_opcode, PARROT_INTERP) {
dest = Parrot_ex_throw_from_op_args(interp, next, EXCEPTION_METHOD_NOT_FOUND, "Method '%Ss' not found for invocant of class '%Ss'", meth, VTABLE_get_string(interp, VTABLE_get_class(interp, object)));
}
else {
- if ((!PMC_IS_NULL(signature))) {
- Parrot_pcc_set_object(interp, signature, object);
- }
interp->current_cont = PREG(3);
dest = (opcode_t *)VTABLE_invoke(interp, method_pmc, next);
@@ -18213,9 +18191,6 @@ Parrot_callmethod_p_p_p(opcode_t *cur_opcode, PARROT_INTERP) {
PMC * signature = Parrot_pcc_get_signature(interp, CURRENT_CONTEXT(interp));
Parrot_pcc_set_pc(interp, CURRENT_CONTEXT(interp), next);
- if ((!PMC_IS_NULL(signature))) {
- Parrot_pcc_set_object(interp, signature, object);
- }
interp->current_cont = PREG(3);
dest = (opcode_t *)VTABLE_invoke(interp, method_pmc, next);
@@ -18237,9 +18212,6 @@ Parrot_tailcallmethod_p_s(opcode_t *cur_opcode, PARROT_INTERP) {
else {
interp->current_cont = Parrot_pcc_get_continuation(interp, CURRENT_CONTEXT(interp));
(PObj_get_FLAGS(interp->current_cont) |= SUB_FLAG_TAILCALL);
- if ((!PMC_IS_NULL(signature))) {
- Parrot_pcc_set_object(interp, signature, object);
- }
dest = (opcode_t *)VTABLE_invoke(interp, method_pmc, next);
}
@@ -18262,9 +18234,6 @@ Parrot_tailcallmethod_p_sc(opcode_t *cur_opcode, PARROT_INTERP) {
else {
interp->current_cont = Parrot_pcc_get_continuation(interp, CURRENT_CONTEXT(interp));
(PObj_get_FLAGS(interp->current_cont) |= SUB_FLAG_TAILCALL);
- if ((!PMC_IS_NULL(signature))) {
- Parrot_pcc_set_object(interp, signature, object);
- }
dest = (opcode_t *)VTABLE_invoke(interp, method_pmc, next);
}
@@ -18282,9 +18251,6 @@ Parrot_tailcallmethod_p_p(opcode_t *cur_opcode, PARROT_INTERP) {
interp->current_cont = Parrot_pcc_get_continuation(interp, CURRENT_CONTEXT(interp));
(PObj_get_FLAGS(interp->current_cont) |= SUB_FLAG_TAILCALL);
- if ((!PMC_IS_NULL(signature))) {
- Parrot_pcc_set_object(interp, signature, object);
- }
dest = (opcode_t *)VTABLE_invoke(interp, method_pmc, next);
return (opcode_t *)dest;
@@ -24046,9 +24012,6 @@ Parrot_invokecc_p_p(opcode_t *cur_opcode, PARROT_INTERP) {
PMC * const signature = PREG(2);
Parrot_pcc_set_pc(interp, CURRENT_CONTEXT(interp), dest);
- if ((!PMC_IS_NULL(signature))) {
- Parrot_pcc_set_object(interp, signature, NULL);
- }
Parrot_pcc_reuse_continuation(interp, CURRENT_CONTEXT(interp), dest);
dest = VTABLE_invoke(interp, p, dest);
View
@@ -296,8 +296,6 @@ inline op invokecc(invar PMC, invar PMC) :flow {
Parrot_pcc_set_pc(interp, CURRENT_CONTEXT(interp), dest);
- if (!PMC_IS_NULL(signature))
- Parrot_pcc_set_object(interp, signature, NULL);
Parrot_pcc_reuse_continuation(interp, CURRENT_CONTEXT(interp), dest);
dest = VTABLE_invoke(interp, p, dest);
View
@@ -60,9 +60,6 @@ op callmethodcc(invar PMC, in STR) :object_base :flow {
if (!PMC_IS_NULL(method_pmc)) {
PMC * const signature = Parrot_pcc_get_signature(interp,
CURRENT_CONTEXT(interp));
- if (!PMC_IS_NULL(signature))
- Parrot_pcc_set_object(interp, signature, object);
-
Parrot_pcc_reuse_continuation(interp, CURRENT_CONTEXT(interp), next);
dest = VTABLE_invoke(interp, method_pmc, next);
}
@@ -92,8 +89,6 @@ op callmethodcc(invar PMC, invar PMC) :object_base :flow {
Parrot_pcc_set_pc(interp, CURRENT_CONTEXT(interp), next);
- if (!PMC_IS_NULL(signature))
- Parrot_pcc_set_object(interp, signature, $1);
Parrot_pcc_reuse_continuation(interp, CURRENT_CONTEXT(interp), next);
dest = VTABLE_invoke(interp, $2, next);
@@ -118,8 +113,6 @@ op callmethod(invar PMC, in STR, invar PMC) :object_base :flow {
VTABLE_get_string(interp, VTABLE_get_class(interp, object)));
}
else {
- if (!PMC_IS_NULL(signature))
- Parrot_pcc_set_object(interp, signature, object);
interp->current_cont = $3;
dest = (opcode_t *)VTABLE_invoke(interp, method_pmc, next);
}
@@ -137,8 +130,6 @@ op callmethod(invar PMC, invar PMC, invar PMC) :object_base :flow {
Parrot_pcc_set_pc(interp, CURRENT_CONTEXT(interp), next);
- if (!PMC_IS_NULL(signature))
- Parrot_pcc_set_object(interp, signature, object);
interp->current_cont = $3;
dest = (opcode_t *)VTABLE_invoke(interp, method_pmc, next);
goto ADDRESS(dest);
@@ -162,8 +153,6 @@ op tailcallmethod(invar PMC, in STR) :object_base :flow {
else {
interp->current_cont = Parrot_pcc_get_continuation(interp, CURRENT_CONTEXT(interp));
PObj_get_FLAGS(interp->current_cont) |= SUB_FLAG_TAILCALL;
- if (!PMC_IS_NULL(signature))
- Parrot_pcc_set_object(interp, signature, object);
dest = (opcode_t *)VTABLE_invoke(interp, method_pmc, next);
}
goto ADDRESS(dest);
@@ -181,8 +170,6 @@ op tailcallmethod(invar PMC, invar PMC) :object_base :flow {
interp->current_cont = Parrot_pcc_get_continuation(interp, CURRENT_CONTEXT(interp));
PObj_get_FLAGS(interp->current_cont) |= SUB_FLAG_TAILCALL;
- if (!PMC_IS_NULL(signature))
- Parrot_pcc_set_object(interp, signature, object);
dest = (opcode_t *)VTABLE_invoke(interp, method_pmc, next);
goto ADDRESS(dest);
}
Oops, something went wrong.

0 comments on commit 5c81f3e

Please sign in to comment.