Skip to content

Instantly share code, notes, and snippets.

@niner
Created July 16, 2021 16:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save niner/1d0bb550f9fb26647d3fd88c4747a867 to your computer and use it in GitHub Desktop.
Save niner/1d0bb550f9fb26647d3fd88c4747a867 to your computer and use it in GitHub Desktop.
diff --git a/src/vm/moar/dispatchers.nqp b/src/vm/moar/dispatchers.nqp
index ec273ad0a..b260fc1b5 100644
--- a/src/vm/moar/dispatchers.nqp
+++ b/src/vm/moar/dispatchers.nqp
@@ -985,7 +985,14 @@ class ProxyReaderFactory {
$block.push($dispatch);
# Compile and return it.
- nqp::getcomp('Raku').compile($block, :from<optimize>)
+ my $moar;
+ if %*COMPILING && nqp::existskey(%*COMPILING, 'moar') {
+ $moar := %*COMPILING<moar>;
+ nqp::deletekey(%*COMPILING, 'moar');
+ }
+ my $result := nqp::getcomp('Raku').compile($block, :from<optimize>);
+ %*COMPILING<moar> := $moar if nqp::defined($moar);
+ $result;
}
}
my $PROXY-READERS := ProxyReaderFactory.new;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment