Skip to content

Instantly share code, notes, and snippets.

@niner
Created July 16, 2021 14:41
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/2c0700ac42d5ae8c5d8bea03de1e69f7 to your computer and use it in GitHub Desktop.
Save niner/2c0700ac42d5ae8c5d8bea03de1e69f7 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..c8306770b 100644
--- a/src/vm/moar/dispatchers.nqp
+++ b/src/vm/moar/dispatchers.nqp
@@ -924,7 +924,16 @@ class ProxyReaderFactory {
has %!readers;
method new() {
- self.bless: lock => NQPLock.new, readers => nqp::hash()
+ die;
+# self.bless: lock => NQPLock.new, readers => nqp::hash()
+ self.bless: lock => NQPLock.new, readers => nqp::hash(
+ '1|0,', -> $a1 { nqp::dispatch('boot-resume', 6, nqp::decont($a1)) },
+ '1%0,', -> $a1, *%n { nqp::dispatch('boot-resume', 6, nqp::decont($a1), |%n) },
+ '2|0,', -> $a1, $a2 { nqp::dispatch('boot-resume', 6, nqp::decont($a1), $a2) },
+ '2|1,', -> $a1, $a2 { nqp::dispatch('boot-resume', 6, $a1, nqp::decont($a2)) },
+ '2|0,1,', -> $a1, $a2 { nqp::dispatch('boot-resume', 6, nqp::decont($a1), nqp::decont($a2)) },
+ );
+
}
method reader-for($capture, $indices) {
@@ -942,6 +951,8 @@ class ProxyReaderFactory {
# If we don't already have a reader for this key, produce it.
unless nqp::existskey(%!readers, $key) {
%!readers{$key} := self.'!produce-reader'($num-args, $has-nameds, $indices);
+ dd %!readers{$key};
+ die;
}
%!readers{$key}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment