Skip to content
Browse files

Don't set name of metaop if it already has a name

The code path for '&[+=]' does use METAOP_ASSIGN, but then overwrote the
carefully crafted name with something of its own devise.  Now only sets the
name if it doesn't have a name yet.  Ensures metaops will use the fast path
for += like ops.
  • Loading branch information...
lizmat committed Nov 21, 2018
1 parent a728bb2 commit e7ce194a77fb016c65ad28ab239dc4f2a64303b9
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/Perl6/Grammar.nqp
@@ -4279,7 +4279,7 @@ grammar Perl6::Grammar is HLL::Grammar does STD {
my $fun := $*W.compile_time_evaluate(self.MATCH,$META);
$*W.install_lexical_symbol($*W.cur_lexpad(),'&' ~ $categorical[0],$fun);
$fun.set_name($name) unless $;
return self;

0 comments on commit e7ce194

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