[svn:parrot] r41915 - branches/pcc_reapply/src/pmc
bacek at svn.parrot.org
bacek at svn.parrot.org
Sun Oct 18 01:02:08 UTC 2009
Author: bacek
Date: Sun Oct 18 01:02:07 2009
New Revision: 41915
URL: https://trac.parrot.org/parrot/changeset/41915
Log:
Store original CallSignature in Continuation. Claim last test in
lexicals.t
Modified:
branches/pcc_reapply/src/pmc/continuation.pmc
Modified: branches/pcc_reapply/src/pmc/continuation.pmc
==============================================================================
--- branches/pcc_reapply/src/pmc/continuation.pmc Sun Oct 18 00:32:12 2009 (r41914)
+++ branches/pcc_reapply/src/pmc/continuation.pmc Sun Oct 18 01:02:07 2009 (r41915)
@@ -48,6 +48,7 @@
ATTR PackFile_ByteCode *seg; /* bytecode segment */
ATTR opcode_t *address; /* start of bytecode, addr to continue */
ATTR PMC *to_ctx; /* pointer to dest context */
+ ATTR PMC *to_call_object; /* pointer to CallSignature */
/* a Continuation keeps the from_ctx alive */
ATTR PMC *from_ctx; /* sub, this cont is returning from */
ATTR int runloop_id; /* id of the creating runloop. */
@@ -65,11 +66,12 @@
VTABLE void init() {
Parrot_Continuation_attributes * const attrs = PARROT_CONTINUATION(SELF);
- attrs->to_ctx = CURRENT_CONTEXT(interp);
- attrs->from_ctx = CURRENT_CONTEXT(interp);
- attrs->runloop_id = 0;
- attrs->seg = interp->code;
- attrs->address = NULL;
+ attrs->to_ctx = CURRENT_CONTEXT(interp);
+ attrs->to_call_object = Parrot_pcc_get_signature(INTERP, attrs->to_ctx);
+ attrs->from_ctx = CURRENT_CONTEXT(interp);
+ attrs->runloop_id = 0;
+ attrs->seg = interp->code;
+ attrs->address = NULL;
PObj_custom_mark_SET(SELF);
@@ -88,11 +90,12 @@
Parrot_Continuation_attributes * const attrs = PARROT_CONTINUATION(SELF);
Parrot_Continuation_attributes * const theirs = PARROT_CONTINUATION(values);
- attrs->to_ctx = theirs->to_ctx;
- attrs->from_ctx = CURRENT_CONTEXT(interp);
- attrs->runloop_id = 0;
- attrs->seg = theirs->seg;
- attrs->address = theirs->address;
+ attrs->to_ctx = theirs->to_ctx;
+ attrs->to_call_object = Parrot_pcc_get_signature(INTERP, attrs->to_ctx);
+ attrs->from_ctx = CURRENT_CONTEXT(interp);
+ attrs->runloop_id = 0;
+ attrs->seg = theirs->seg;
+ attrs->address = theirs->address;
PObj_custom_mark_SET(SELF);
@@ -126,6 +129,7 @@
return;
Parrot_gc_mark_PMC_alive(INTERP, cc->to_ctx);
+ Parrot_gc_mark_PMC_alive(INTERP, cc->to_call_object);
Parrot_gc_mark_PMC_alive(INTERP, cc->from_ctx);
}
@@ -230,7 +234,7 @@
PMC *from_ctx = CURRENT_CONTEXT(interp);
PMC *to_ctx = cc->to_ctx;
opcode_t *pc = cc->address;
- PMC *call_obj = Parrot_pcc_get_signature(interp, to_ctx);
+ PMC *call_obj = cc->to_call_object;
PMC *from_obj = Parrot_pcc_get_signature(interp, from_ctx);
UNUSED(next)
More information about the parrot-commits
mailing list