<commit_before>role Perl6::Metamodel::InvocationProtocol {
    has int $!has_invocation_attr;
    has $!invocation_attr_class;
    has str $!invocation_attr_name;
    
    has int $!has_invocation_handler;
    has $!invocation_handler;
    
    my $default_invoke_handler;
    method set_default_invoke_handler($h) {
        $default_invoke_handler := $h;
    }
    
    method set_invocation_attr($obj, $class, $name) {
        $!has_invocation_attr   := 1;
        $!invocation_attr_class := $class;
        $!invocation_attr_name  := $name;
    }
    
    method set_invocation_handler($obj, $handler) {
        $!has_invocation_handler := 1;
        $!invocation_handler     := $handler;
    }
    
    method has_invocation_attr($obj) { $!has_invocation_attr }
    method invocation_attr_class($obj) { $!invocation_attr_class }
    method invocation_attr_name($obj) { $!invocation_attr_name }
    
    method has_invocation_handler($obj) { $!has_invocation_handler }
    method invocation_handler($obj) { $!invocation_handler }
    
    method compose_invocation($obj) {
        # Check if we have a postcircumfix:<( )>, and if so install
        # the default invocation forwarder. Otherwise, see if we or
        # a parent has an invocation attr.
        my $pcmeth := self.find_method($obj, 'postcircumfix:<( )>', :no_fallback(1));
        if !nqp::isnull(pcmeth) && nqp::isconcrete($pcmeth) {
            nqp::die('Default invocation handler is not invokable')
                unless nqp::isinvokable($default_invoke_handler);
            nqp::setinvokespec($obj, nqp::null(), nqp::null_s(),
                $default_invoke_handler);
        }
        else {
            for self.mro($obj) -> $class {
                if nqp::can($class.HOW, 'has_invocation_attr') {
                    if $class.HOW.has_invocation_attr($class) {
                        nqp::setinvokespec($obj,
                            $class.HOW.invocation_attr_class($class),
                            $class.HOW.invocation_attr_name($class),
                            nqp::null());
                        last;
                    }<commit_msg>Hopefully fix Rakudo Parrot build.<commit_after>role Perl6::Metamodel::InvocationProtocol {
    has int $!has_invocation_attr;
    has $!invocation_attr_class;
    has str $!invocation_attr_name;
    
    has int $!has_invocation_handler;
    has $!invocation_handler;
    
    my $default_invoke_handler;
    method set_default_invoke_handler($h) {
        $default_invoke_handler := $h;
    }
    
    method set_invocation_attr($obj, $class, $name) {
        $!has_invocation_attr   := 1;
        $!invocation_attr_class := $class;
        $!invocation_attr_name  := $name;
    }
    
    method set_invocation_handler($obj, $handler) {
        $!has_invocation_handler := 1;
        $!invocation_handler     := $handler;
    }
    
    method has_invocation_attr($obj) { $!has_invocation_attr }
    method invocation_attr_class($obj) { $!invocation_attr_class }
    method invocation_attr_name($obj) { $!invocation_attr_name }
    
    method has_invocation_handler($obj) { $!has_invocation_handler }
    method invocation_handler($obj) { $!invocation_handler }
    
    method compose_invocation($obj) {
        # Check if we have a postcircumfix:<( )>, and if so install
        # the default invocation forwarder. Otherwise, see if we or
        # a parent has an invocation attr.
        my $pcmeth := self.find_method($obj, 'postcircumfix:<( )>', :no_fallback(1));
        if !nqp::isnull(pcmeth) && nqp::defined($pcmeth) {
            nqp::die('Default invocation handler is not invokable')
                unless nqp::isinvokable($default_invoke_handler);
            nqp::setinvokespec($obj, nqp::null(), nqp::null_s(),
                $default_invoke_handler);
        }
        else {
            for self.mro($obj) -> $class {
                if nqp::can($class.HOW, 'has_invocation_attr') {
                    if $class.HOW.has_invocation_attr($class) {
                        nqp::setinvokespec($obj,
                            $class.HOW.invocation_attr_class($class),
                            $class.HOW.invocation_attr_name($class),
                            nqp::null());
                        last;
                    }
{'fraction_non_alphanumeric': 0.11549230051329912, 'fraction_numerical': 0.0018665422305179655, 'mean_word_length': 2.34399375975039, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5205726', 'n_tokens_mistral': 1342, 'n_tokens_neox': 1301, 'n_words': 232}