Skip to content

Instantly share code, notes, and snippets.

@snarkyboojum
Created April 27, 2010 13:17
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 snarkyboojum/380720 to your computer and use it in GitHub Desktop.
Save snarkyboojum/380720 to your computer and use it in GitHub Desktop.
$ yapsi -e '{{}; my $a = 5; { say $a }; say $a; { say $a; {}; }}; {}'
SIC emitted for this:
This is SIC v2010.05
block 'main':
`lexicals: <>
$0 = fetch-block 'main_1'
call $0
$1 = fetch-block 'main_6'
call $1
block 'main_1':
`lexicals: <$a>
$0 = fetch-block 'main_1_2'
call $0
$1 = 5
store '$a', $1
$2 = fetch-block 'main_1_3'
call $2
$3 = fetch '$a'
say $3
$4 = fetch-block 'main_1_4'
call $4
block 'main_1_2':
`lexicals: <>
block 'main_1_3':
`lexicals: <>
$0 = fetch '$a'
say $0
block 'main_1_4':
`lexicals: <>
$0 = fetch '$a'
say $0
$1 = fetch-block 'main_1_4_5'
call $1
block 'main_1_4_5':
`lexicals: <>
block 'main_6':
`lexicals: <>
Result of running the above:
5
5
5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment