Skip to content

Commit 1339dab

Browse files
committed
Cleanup and re-order some code
Reduces blib\Raku\Grammar.moarvm about 95KB size
1 parent 68eb3a1 commit 1339dab

File tree

2 files changed

+110
-114
lines changed

2 files changed

+110
-114
lines changed

src/vm/moar/QAST/QASTCompilerMAST.nqp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1843,7 +1843,6 @@ my class MASTCompilerInstance {
18431843
$!regalloc.release_register($name_reg, nqp::const::MVM_reg_str);
18441844
}
18451845
elsif $scope eq 'contextual' {
1846-
my $name_const := self.const_s($name);
18471846
my $lex := $*BLOCK.lexical($name);
18481847
if $lex {
18491848
# In current frame; do as lexical does.
@@ -1864,6 +1863,7 @@ my class MASTCompilerInstance {
18641863
}
18651864
}
18661865
else {
1866+
my $name_const := self.const_s($name);
18671867
# Need lookup.
18681868
if $*BINDVAL {
18691869
my $valmast := self.as_mast_clear_bindval($*BINDVAL, :want(nqp::const::MVM_reg_obj));
@@ -1874,8 +1874,8 @@ my class MASTCompilerInstance {
18741874
$res_reg := $!regalloc.fresh_register(nqp::const::MVM_reg_obj);
18751875
%core_op_generators{'getdynlex'}($!mast_frame, $res_reg, $name_const.result_reg);
18761876
}
1877+
$!regalloc.release_register($name_const.result_reg, nqp::const::MVM_reg_str);
18771878
}
1878-
$!regalloc.release_register($name_const.result_reg, nqp::const::MVM_reg_str);
18791879
$res_kind := nqp::const::MVM_reg_obj;
18801880
}
18811881
elsif $scope eq 'attribute' {

0 commit comments

Comments
 (0)