Created
July 1, 2014 19:50
-
-
Save rurban/b64f609fdd3c78aeb79c to your computer and use it in GitHub Desktop.
0001-fix-parrot-error-with-label-in-MapIter.reify.patch
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
From 7ea3218a768651b7f7820f9b80a953152dfb75a2 Mon Sep 17 00:00:00 2001 | |
From: Reini Urban <rurban@cpanel.net> | |
Date: Tue, 1 Jul 2014 14:47:15 -0500 | |
Subject: [PATCH] fix parrot error with $!label in MapIter.reify | |
seperating the !$label into its own PIR blocks seperated the handler | |
pmc from the method call. 196b4ff55 broke rakudo-p with | |
nqp/install/bin/parrot -o CORE.setting.pbc src/gen/p-CORE.setting.pir | |
error:imcc:syntax error, unexpected DOT, expecting '(' ('.') | |
in file 'src/gen/p-CORE.setting.pir' line 147823 | |
error:imcc:syntax error, unexpected DOT, expecting '(' ('.') | |
in file 'src/gen/p-CORE.setting.pir' line 147839 | |
error:imcc:The opcode 'get_id_i_ic' (get_id<2>) was not found. Check the type and number of the arguments | |
in file 'src/gen/p-CORE.setting.pir' line 147859 | |
Makefile:525: recipe for target 'CORE.setting.pbc' failed | |
Keep the locals together in the right blocks. | |
--- | |
src/core/MapIter.pm | 29 ++++++++++++++++++----------- | |
1 file changed, 18 insertions(+), 11 deletions(-) | |
diff --git src/core/MapIter.pm src/core/MapIter.pm | |
index 4648246..fe44993 100644 | |
--- src/core/MapIter.pm | |
+++ src/core/MapIter.pm | |
@@ -56,8 +56,8 @@ my class MapIter is Iterator { | |
#?if parrot | |
Q:PIR { | |
- .local int argc, count, NEXT, is_sink | |
- .local pmc handler, self, MapIter, items, args, result, block, rpa | |
+ .local int argc, count | |
+ .local pmc self, MapIter, items, args, result, block, rpa | |
$P0 = find_lex '$argc' | |
argc = repr_unbox_int $P0 | |
$P0 = find_lex '$count' | |
@@ -68,22 +68,29 @@ my class MapIter is Iterator { | |
items = getattribute self, MapIter, '$!items' | |
args = new 'QRPA' | |
block = find_lex '$block' | |
+ }; | |
+ if $!label { | |
+ Q:PIR { | |
+ .local pmc handler | |
handler = root_new ['parrot';'ExceptionHandler'] | |
- NEXT = find_lex '$NEXT' | |
- is_sink = find_lex '$is_sink' | |
set_addr handler, catch | |
- }; | |
- if $!label { | |
- Q:PIR { handler.'handle_types'(.CONTROL_LOOP_LAST, .CONTROL_LOOP_NEXT, .CONTROL_LOOP_REDO, 512, 513, 514) }; | |
- 1 | |
+ handler.'handle_types'(.CONTROL_LOOP_LAST, .CONTROL_LOOP_NEXT, .CONTROL_LOOP_REDO, 512, 513, 514) }; | |
+ push_eh handler | |
} | |
else { | |
- Q:PIR { handler.'handle_types'(.CONTROL_LOOP_LAST, .CONTROL_LOOP_NEXT, .CONTROL_LOOP_REDO) }; | |
- 1 | |
+ Q:PIR { | |
+ .local pmc handler | |
+ handler = root_new ['parrot';'ExceptionHandler'] | |
+ | |
+ set_addr handler, catch | |
+ handler.'handle_types'(.CONTROL_LOOP_LAST, .CONTROL_LOOP_NEXT, .CONTROL_LOOP_REDO) }; | |
+ push_eh handler | |
} | |
Q:PIR { | |
- push_eh handler | |
+ .local int NEXT, is_sink | |
+ NEXT = find_lex '$NEXT' | |
+ is_sink = find_lex '$is_sink' | |
iter_loop: | |
$I0 = elements rpa | |
-- | |
2.0.0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment