From f8a2d0a0f9a3ba7a334fc7547b118326fb9911bb Mon Sep 17 00:00:00 2001 From: Jonathan Worthington Date: Sun, 4 Sep 2011 16:23:48 +0200 Subject: [PATCH] Have KnowHOW publish a method cache, which should avoid a bunch of method cache misses and the resulting .^find_method call. --- src/6model/knowhow_bootstrapper.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/6model/knowhow_bootstrapper.c b/src/6model/knowhow_bootstrapper.c index ac3ca2bcc4..1705d9d578 100644 --- a/src/6model/knowhow_bootstrapper.c +++ b/src/6model/knowhow_bootstrapper.c @@ -99,7 +99,9 @@ static void find_method(PARROT_INTERP, PMC *nci) { static void compose(PARROT_INTERP, PMC *nci) { PMC * unused; PMC *capture = Parrot_pcc_get_signature(interp, CURRENT_CONTEXT(interp)); + PMC *self = VTABLE_get_pmc_keyed_int(interp, capture, 0); PMC *obj = VTABLE_get_pmc_keyed_int(interp, capture, 1); + STABLE(obj)->method_cache = ((KnowHOWREPRInstance *)PMC_data(self))->methods; unused = Parrot_pcc_build_call_from_c_args(interp, capture, "P", obj); }