Skip to content
Permalink
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 {
$META.name('&METAOP_HYPER_POSTFIX') if $META.name eq '&METAOP_HYPER_POSTFIX_ARGS';
my $fun := $*W.compile_time_evaluate(self.MATCH,$META);
$*W.install_lexical_symbol($*W.cur_lexpad(),'&' ~ $categorical[0],$fun);
$fun.set_name($name);
$fun.set_name($name) unless $fun.name;
return self;
}
}

0 comments on commit e7ce194

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