Created
December 12, 2010 12:30
-
-
Save uasi/738009 to your computer and use it in GitHub Desktop.
Fix RT #77668
This file contains hidden or 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/Perl6/Actions.pm b/src/Perl6/Actions.pm | |
index 9e44a7b..2828b82 100644 | |
--- a/src/Perl6/Actions.pm | |
+++ b/src/Perl6/Actions.pm | |
@@ -2547,8 +2547,13 @@ method postfixish($/) { | |
if $<postfix_prefix_meta_operator> { | |
my $past := $<OPER>.ast; | |
if $past && $past.isa(PAST::Op) && $past.pasttype() eq 'call' { | |
- $past.unshift($past.name()); | |
- $past.name('!dispatch_dispatcher_parallel'); | |
+ if ($past.name() eq '') { | |
+ $past.name('!dispatch_invocation_parallel'); | |
+ } | |
+ else { | |
+ $past.unshift($past.name()); | |
+ $past.name('!dispatch_dispatcher_parallel'); | |
+ } | |
} | |
elsif $past && $past.isa(PAST::Op) && $past.pasttype() eq 'callmethod' { | |
$past.unshift($past.name()); | |
diff --git a/src/glue/dispatch.pir b/src/glue/dispatch.pir | |
index 0f0c88b..29ec706 100644 | |
--- a/src/glue/dispatch.pir | |
+++ b/src/glue/dispatch.pir | |
@@ -28,6 +28,33 @@ dispatcher for each thingy we're dispatching over. | |
.end | |
+=item !dispatch_invocation_parallel | |
+ | |
+(TBD) | |
+ | |
+=cut | |
+ | |
+.sub '!dispatch_invocation_parallel' | |
+ .param pmc invocanty | |
+ .param pmc pos_args :slurpy | |
+ .param pmc named_args :slurpy :named | |
+ | |
+ .local pmc it, results | |
+ results = new ['ResizablePMCArray'] | |
+ invocanty = invocanty.'flat'() | |
+ it = iter invocanty | |
+ it_loop: | |
+ unless it goto it_loop_done | |
+ $P0 = shift it | |
+ $P0 = $P0(pos_args :flat, named_args :flat :named) | |
+ push results, $P0 | |
+ goto it_loop | |
+ it_loop_done: | |
+ | |
+ .tailcall '&infix:<,>'(results :flat) | |
+.end | |
+ | |
+ | |
=item !dispatch_method_parallel | |
Does a parallel method dispatch. Invokes the method for each thing in the |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This could fix @array>>() thingy