Skip to content

Commit c66f98e

Browse files
committed
Mark NQP classes as having an authoritative method cache.
1 parent a29c8a7 commit c66f98e

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/how/NQPClassHOW.pm

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ knowhow NQPClassHOW {
6666
if pir::isnull__IP($code_obj) || pir::isa__IPs($code_obj, 'Undef') {
6767
pir::die("Cannot add a null method '$name' to class '$!name'");
6868
}
69+
pir::set_method_cache_authoritativeness__vPi($obj, 0);
6970
%!methods{$name} := $code_obj;
7071
}
7172

@@ -79,6 +80,7 @@ knowhow NQPClassHOW {
7980
%todo<name> := $name;
8081
%todo<code> := $code_obj;
8182
@!multi_methods_to_incorporate[+@!multi_methods_to_incorporate] := %todo;
83+
pir::set_method_cache_authoritativeness__vPi($obj, 0);
8284
$code_obj;
8385
}
8486

@@ -348,7 +350,8 @@ knowhow NQPClassHOW {
348350
}
349351
}
350352
}
351-
pir::publish_method_cache($obj, %cache)
353+
pir::publish_method_cache($obj, %cache);
354+
pir::set_method_cache_authoritativeness__0Pi($obj, 1);
352355
}
353356

354357
method publish_boolification_spec($obj) {

0 commit comments

Comments
 (0)