[svn:parrot] r48307 - branches/gsoc_instrument/src/dynpmc
khairul at svn.parrot.org
khairul at svn.parrot.org
Wed Aug 4 05:31:18 UTC 2010
Author: khairul
Date: Wed Aug 4 05:31:18 2010
New Revision: 48307
URL: https://trac.parrot.org/parrot/changeset/48307
Log:
Expose call_sig and invocant to callback.
Modified:
branches/gsoc_instrument/src/dynpmc/instrumentinvokable.pmc
Modified: branches/gsoc_instrument/src/dynpmc/instrumentinvokable.pmc
==============================================================================
--- branches/gsoc_instrument/src/dynpmc/instrumentinvokable.pmc Wed Aug 4 05:28:02 2010 (r48306)
+++ branches/gsoc_instrument/src/dynpmc/instrumentinvokable.pmc Wed Aug 4 05:31:18 2010 (r48307)
@@ -66,20 +66,21 @@
VTABLE opcode_t* invoke (void *next) {
Parrot_InstrumentInvokable_attributes * const attr = PARROT_INSTRUMENTINVOKABLE(SELF);
Parrot_Interp supervised;
- Parrot_Context_info info;
- PMC *task_hash, *task, *data, *recall;
- PMC *instrument;
+ PMC *task_hash, *task, *data, *recall, *signature;
+ PMC *instrument, *invocant;
STRING *event;
opcode_t *ret;
- GETATTR_Instrument_supervised(INTERP, attr->instrument, supervised);
+ signature = Parrot_pcc_get_signature(INTERP, CURRENT_CONTEXT(INTERP));
+ invocant = Parrot_pcc_get_object(INTERP, signature);
+ supervised = INTERP;
INTERP = attr->interp;
instrument = attr->instrument;
event = attr->event;
data = Parrot_pmc_new(INTERP, enum_class_Hash);
- VTABLE_set_pmc_keyed_str(INTERP, data, CONST_STRING(INTERP, "call_sig"),
- CURRENT_CONTEXT(supervised));
+ VTABLE_set_pmc_keyed_str(INTERP, data, CONST_STRING(INTERP, "call_sig"), signature);
+ VTABLE_set_pmc_keyed_str(INTERP, data, CONST_STRING(INTERP, "invocant"), invocant);
(PMC *recall) = PCCINVOKE(INTERP, instrument, "raise_event", STRING *event, PMC *data);
ret = VTABLE_invoke(supervised, attr->invokable, next);
@@ -186,7 +187,7 @@
VTABLE PMC* clone() {
Parrot_InstrumentInvokable_attributes * const attr = PARROT_INSTRUMENTINVOKABLE(SELF);
- return VTABLE_clone(INTERP, attr->invokable);
+ return SUPER();
}
/*
More information about the parrot-commits
mailing list