[svn:parrot] r47872 - trunk/src/call
NotFound at svn.parrot.org
NotFound at svn.parrot.org
Sat Jun 26 16:33:00 UTC 2010
Author: NotFound
Date: Sat Jun 26 16:32:58 2010
New Revision: 47872
URL: https://trac.parrot.org/parrot/changeset/47872
Log:
allow use of Parrot_pcc_invoke_from_sig_object to run objects that does invoke, thus allowing its usage for nci callbacks
Modified:
trunk/src/call/pcc.c
Modified: trunk/src/call/pcc.c
==============================================================================
--- trunk/src/call/pcc.c Sat Jun 26 15:58:04 2010 (r47871)
+++ trunk/src/call/pcc.c Sat Jun 26 16:32:58 2010 (r47872)
@@ -291,12 +291,19 @@
{
ASSERT_ARGS(do_run_ops)
- if (sub_obj->vtable->base_type < enum_class_core_max)
- return sub_obj->vtable->base_type == enum_class_Sub
- || sub_obj->vtable->base_type == enum_class_MultiSub
- || sub_obj->vtable->base_type == enum_class_Eval;
- else
- return is_invokable(interp, sub_obj);
+ if (sub_obj->vtable->base_type < enum_class_core_max) {
+ switch (sub_obj->vtable->base_type) {
+ case enum_class_Sub:
+ case enum_class_MultiSub:
+ case enum_class_Eval:
+ return 1;
+ case enum_class_Object:
+ break;
+ default:
+ return 0;
+ }
+ }
+ return is_invokable(interp, sub_obj);
}
/*
@@ -352,7 +359,7 @@
/* PIR Subs need runops to run their opcodes. Methods and NCI subs
* don't. */
- if (do_run_ops(interp, sub_obj)) {
+ if (dest && do_run_ops(interp, sub_obj)) {
Parrot_runcore_t *old_core = interp->run_core;
const opcode_t offset = dest - interp->code->base.data;
More information about the parrot-commits
mailing list