-
-
Save FROGGS/c7e950459e834a147cb8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/vm/moar/QAST/QASTCompilerMAST.nqp b/src/vm/moar/QAST/QASTCompilerMAST.nqp | |
index 43d4628..999291a 100644 | |
--- a/src/vm/moar/QAST/QASTCompilerMAST.nqp | |
+++ b/src/vm/moar/QAST/QASTCompilerMAST.nqp | |
@@ -668,6 +668,14 @@ class QAST::MASTCompiler { | |
push_op(@pre, 'takeclosure', $reg, $reg); | |
} | |
+ if $node.custom_args { | |
+ # The block does the arg processing by itself, so we accept any number | |
+ # of args here. | |
+ push_op(@pre, 'checkarity', | |
+ MAST::IVal.new( :size(16), :value(0)), | |
+ MAST::IVal.new( :size(16), :value(-1))); | |
+ } | |
+ else { | |
# Analyze parameters to get count of required/optional and make sure | |
# all is in order. | |
my $param_index := 0; | |
@@ -787,6 +795,7 @@ class QAST::MASTCompiler { | |
} | |
$param_index++; | |
} | |
+ } | |
nqp::splice($frame.instructions, @pre, 0, 0); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment