[svn:parrot] r43130 - branches/context_unify3/src/ops
chromatic at svn.parrot.org
chromatic at svn.parrot.org
Thu Dec 17 10:20:28 UTC 2009
Author: chromatic
Date: Thu Dec 17 10:20:27 2009
New Revision: 43130
URL: https://trac.parrot.org/parrot/changeset/43130
Log:
[ops] Made callmethodcc op skip creating a RetContinuation when invoking an NCI
method, as it's unnecessary and expensive and trunk doesn't do it, because it's
the invokee's responsibility to create the RetCont. This improves branch
performance by 2.499% on fib4.pir.
Modified:
branches/context_unify3/src/ops/object.ops
Modified: branches/context_unify3/src/ops/object.ops
==============================================================================
--- branches/context_unify3/src/ops/object.ops Thu Dec 17 09:17:39 2009 (r43129)
+++ branches/context_unify3/src/ops/object.ops Thu Dec 17 10:20:27 2009 (r43130)
@@ -70,9 +70,13 @@
}
}
else {
- call_object = Parrot_pcc_prepare_call(interp, call_object,
- new_ret_continuation_pmc(interp, next), object);
- dest = VTABLE_invoke(interp, method_pmc, next);
+ PMC *ret_cont = method_pmc->vtable->base_type == enum_class_NCI
+ ? PMCNULL
+ : new_ret_continuation_pmc(interp, next);
+
+ call_object = Parrot_pcc_prepare_call(interp, call_object,
+ ret_cont, object);
+ dest = VTABLE_invoke(interp, method_pmc, next);
}
goto ADDRESS(dest);
}
More information about the parrot-commits
mailing list