<commit_before>my class Attribute { # declared in BOOTSTRAP
    # class Attribute is Any
    #     has str $!name;
    #     has int $!rw;
    #     has int $!is_built;
    #     has int $!is_bound;
    #     has int $!has_accessor;
    #     has Mu $!type;
    #     has Mu $!container_descriptor;
    #     has Mu $!auto_viv_container;
    #     has Mu $!build_closure;
    #     has Mu $!package;
    #     has int $!inlined;
    #     has Mu $!dimensions;
    #     has int $!positional_delegate;
    #     has int $!associative_delegate;
    #     has Mu $!why;
    #     has $!required;
    #     has Mu $!container_initializer;
    #     has Attribute $!original;
    #     has Attribute $!composed;

    method compose(Mu $package, :$compiler_services) {
        return if $!composed;
        # Generate accessor method, if we're meant to have one.
        if self.has_accessor {
            my str $name   = nqp::unbox_s(self.name);
            my $meth_name := nqp::substr($name, 2);
            unless nqp::existskey($package.^method_table, $meth_name)
                    || nqp::existskey($package.^submethod_table, $meth_name)
                    || (nqp::can($package.HOW, 'has_multi_candidate')
                        && $package.^has_multi_candidate($meth_name))
            {
                my $dcpkg := nqp::decont($package);
                my $meth;
                my int $attr_type = nqp::objprimspec($!type);

                if nqp::can(self,"DEPRECATED")
                  && self.DEPRECATED -> $alternative {
                    my $what = "Method $meth_name (from $package.^name())";
                    if self.rw {
                        $meth := nqp::iseq_i($attr_type, 0)
                            ??
                            method (Mu:D \fles:) is raw {
                                Rakudo::Deprecations.DEPRECATED($alternative,:$what);
                                nqp::getattr(nqp::decont(fles), $dcpkg, $name)
                            }
                            !!
                            nqp::iseq_i($attr_type, 1)
                            ??
                            method (Mu:D \fles:) is raw {
                                Rakudo::Deprecations.DEPRECATED($alternative,:$what);
                                nqp::getattrref_i(nqp::decont(fles), $dcpkg, $name)
                            }
                            !!
                            nqp::iseq_i($attr_type, 2)<commit_msg>Make Attribute's $!package point at the actual owner<commit_after>my class Attribute { # declared in BOOTSTRAP
    # class Attribute is Any
    #     has str $!name;
    #     has int $!rw;
    #     has int $!is_built;
    #     has int $!is_bound;
    #     has int $!has_accessor;
    #     has Mu $!type;
    #     has Mu $!container_descriptor;
    #     has Mu $!auto_viv_container;
    #     has Mu $!build_closure;
    #     has Mu $!package;
    #     has int $!inlined;
    #     has Mu $!dimensions;
    #     has int $!positional_delegate;
    #     has int $!associative_delegate;
    #     has Mu $!why;
    #     has $!required;
    #     has Mu $!container_initializer;
    #     has Attribute $!original;
    #     has Attribute $!composed;

    method compose(Mu $package, :$compiler_services) {
        return if $!composed;
        my $dcpkg := nqp::decont($package);
        nqp::bindattr(self, Attribute, '$!package', $dcpkg);
        # Generate accessor method, if we're meant to have one.
        if self.has_accessor {
            my str $name   = nqp::unbox_s(self.name);
            my $meth_name := nqp::substr($name, 2);
            unless nqp::existskey($package.^method_table, $meth_name)
                    || nqp::existskey($package.^submethod_table, $meth_name)
                    || (nqp::can($package.HOW, 'has_multi_candidate')
                        && $package.^has_multi_candidate($meth_name))
            {
                my $meth;
                my int $attr_type = nqp::objprimspec($!type);

                if nqp::can(self,"DEPRECATED")
                  && self.DEPRECATED -> $alternative {
                    my $what = "Method $meth_name (from $package.^name())";
                    if self.rw {
                        $meth := nqp::iseq_i($attr_type, 0)
                            ??
                            method (Mu:D \fles:) is raw {
                                Rakudo::Deprecations.DEPRECATED($alternative,:$what);
                                nqp::getattr(nqp::decont(fles), $dcpkg, $name)
                            }
                            !!
                            nqp::iseq_i($attr_type, 1)
                            ??
                            method (Mu:D \fles:) is raw {
                                Rakudo::Deprecations.DEPRECATED($alternative,:$what);
                                nqp::getattrref_i(nqp::decont(fles), $dcpkg, $name)
                            }
                            !!
                            nqp::iseq_i($attr_type, 2)
{'fraction_non_alphanumeric': 0.12036667995217218, 'fraction_numerical': 0.0015942606616181746, 'mean_word_length': 1.3519212746016869, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '2610263', 'n_tokens_mistral': 1538, 'n_tokens_neox': 1468, 'n_words': 302}