[svn:parrot] r41937 - branches/pcc_reapply/src/pmc
bacek at svn.parrot.org
bacek at svn.parrot.org
Mon Oct 19 08:28:23 UTC 2009
Author: bacek
Date: Mon Oct 19 08:28:22 2009
New Revision: 41937
URL: https://trac.parrot.org/parrot/changeset/41937
Log:
Set and restore current_object during Class instantiate. Fix benchmark tests.
Modified:
branches/pcc_reapply/src/pmc/class.pmc
Modified: branches/pcc_reapply/src/pmc/class.pmc
==============================================================================
--- branches/pcc_reapply/src/pmc/class.pmc Mon Oct 19 07:11:07 2009 (r41936)
+++ branches/pcc_reapply/src/pmc/class.pmc Mon Oct 19 08:28:22 2009 (r41937)
@@ -344,10 +344,14 @@
if (!PMC_IS_NULL(meth)) {
/* build an empty signature; it has an invocant but no args/retvals */
PMC * const sig_obj = pmc_new(interp, enum_class_CallSignature);
+ /* preserve current_object */
+ PMC * const old_object = interp->current_object;
VTABLE_set_string_native(interp, sig_obj, CONST_STRING(interp, "Pi->"));
/* add the invocant */
VTABLE_unshift_pmc(interp, sig_obj, object);
+ interp->current_object = object;
Parrot_pcc_invoke_from_sig_object(interp, meth, sig_obj);
+ interp->current_object = old_object;
}
}
}
More information about the parrot-commits
mailing list