Skip to content
Permalink
Browse files

Don't use .? dispatch in attribute composition

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 ffc47aaeb9e995217b12f705f772e1eb27bba296
Showing with 2 additions and 1 deletion.
  1. +2 −1 src/core/Attribute.pm6
@@ -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)

0 comments on commit ffc47aa

Please sign in to comment.
You can’t perform that action at this time.