Skip to content

Commit

Permalink
Don't use .? dispatch in attribute composition
Browse files Browse the repository at this point in the history
This code gets called often enough in the compilation of the setting to
warrant its optimzation.  This saves about 1 second of parse time for
yours truly.
  • Loading branch information
lizmat committed May 28, 2019
1 parent c9a7892 commit ffc47aa
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/core/Attribute.pm6
Expand Up @@ -26,7 +26,8 @@ my class Attribute { # declared in BOOTSTRAP
my $meth;
my int $attr_type = nqp::objprimspec($!type);

if self.?DEPRECATED -> $alternative {
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)
Expand Down

0 comments on commit ffc47aa

Please sign in to comment.