Permalink
Browse files

Give KnowHOW a type check cache.

  • Loading branch information...
1 parent acae25d commit 579f3d0990102b77709a665ab97be2adb6feeff8 @jnthn jnthn committed Oct 31, 2012
Showing with 4 additions and 1 deletion.
  1. +4 −1 src/6model/knowhow_bootstrapper.c
@@ -232,9 +232,12 @@ PMC * SixModelObject_bootstrap_knowhow(PARROT_INTERP, PMC *sc) {
/* Set this built up HOW as the KnowHOW's HOW. */
STABLE(knowhow_pmc)->HOW = knowhow_how_pmc;
- /* Give it an authoritative method cache. */
+ /* Give it an authoritative method cache and type check list. */
STABLE(knowhow_pmc)->method_cache = knowhow_how->body.methods;
STABLE(knowhow_pmc)->mode_flags = METHOD_CACHE_AUTHORITATIVE;
+ STABLE(knowhow_pmc)->type_check_cache_length = 1;
+ STABLE(knowhow_pmc)->type_check_cache = (PMC **)mem_sys_allocate(sizeof(PMC *));
+ STABLE(knowhow_pmc)->type_check_cache[0] = knowhow_pmc;
/* Set up some string constants that the methods here use. */
repr_str = Parrot_str_new_constant(interp, "repr");

0 comments on commit 579f3d0

Please sign in to comment.