It seems there's a number of funky corner cases around blocks and loops where ASTification currently DWI don't Ms. Just so I don't have to shave yaks right now.
A few examples:
perl author_tools/jit_ast_dump.pl -c -e 'do{}'
segfaults.
perl author_tools/jit_ast_dump.pl -c -e 'foreach my $x (1..10) {1}'
gives a bare StatementSequence for the block.
perl author_tools/jit_ast_dump.pl -c -e 'my $x = 1; do{1}; $x = 1;'
Does not produce a single StatementSequence to hold it all:
----------------------------------------------
# StatementSequence
# Statement (eval 13):1
# Binop 'sassign' (
# VD ($) = 1 : Any
# C = (IV)1
# )
----------------------------------------------
# StatementSequence
# Statement (eval 13):1
# Binop 'sassign' (
# V ($) = 1 : Any
# C = (IV)1
# )
----------------------------------------------
# Block 'scope' (
# 'UnJITable subtree'
# )
----------------------------------------------
B::Concise::compile(CODE(0x1afcee0))
a <1> leavesub[1 ref] K/REFC,1 ->(end)
- <@> lineseq KP ->a
1 <;> nextstate(main 2 (eval 13):1) v:%,2048 ->2
4 <2> sassign vKS/2 ->5
2 <$> const[IV 1] s ->3
3 <0> padsv[$x:2,4] sRM*/LVINTRO ->4
5 <;> nextstate(main 4 (eval 13):1) v:%,2048 ->6
- <1> null vK*/1 ->6
- <@> scope vK ->-
- <0> ex-nextstate v ->-
- <0> ex-const v ->-
6 <;> nextstate(main 4 (eval 13):1) v:%,{,2048 ->7
9 <2> sassign sKS/2 ->a
7 <$> const[IV 1] s ->8
8 <0> padsv[$x:2,4] sRM* ->9
It seems there's a number of funky corner cases around blocks and loops where ASTification currently DWI don't Ms. Just so I don't have to shave yaks right now.
A few examples:
segfaults.
gives a bare StatementSequence for the block.
Does not produce a single StatementSequence to hold it all: