Skip to content

Commit

Permalink
Replace costly $*MAST_FRAME lookup by $frame arg in bytecode generators
Browse files Browse the repository at this point in the history
  • Loading branch information
niner committed Sep 7, 2021
1 parent 1dbb222 commit 0fed320
Show file tree
Hide file tree
Showing 3 changed files with 1,527 additions and 1,537 deletions.
8 changes: 4 additions & 4 deletions lib/MAST/Nodes.nqp
Expand Up @@ -438,12 +438,12 @@ class MAST::Op is MAST::Node {
my @op_names := MAST::Ops.WHO<@names>;
my %generators := MAST::Ops.WHO<%generators>;

method new(str :$op!, *@operands) {
%generators{$op}(|@operands)
method new(:$frame!, str :$op!, *@operands) {
%generators{$op}($frame, |@operands)
}

method new_with_operand_array(@operands, str :$op!) {
%generators{$op}(|@operands)
method new_with_operand_array(@operands, :$frame!, str :$op!) {
%generators{$op}($frame, |@operands)
}
}

Expand Down

0 comments on commit 0fed320

Please sign in to comment.