Skip to content

Instantly share code, notes, and snippets.

@timo
Created November 22, 2014 19:18
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 timo/23e49f55079de22048ca to your computer and use it in GitHub Desktop.
Save timo/23e49f55079de22048ca to your computer and use it in GitHub Desktop.
perl6 --target=optimize -e 'my int $i = 0; while $i < 1024 { my int $j = 0; while $j < 1024 { $k = $i + $j; $j = $j + 1 }; $i = $i + 1 }; say $k'
- QAST::CompUnit
- QAST::Block my int $i = 0; while $i < 1024 { my int $j = 0; wh...
- QAST::Var(local __args__ :decl(param))
- QAST::Stmts
- QAST::Op(call)
- QAST::Block
- QAST::Stmts
- QAST::Var(lexical $k :decl(contvar))
- QAST::Var(lexical $i :decl(var))
- QAST::Var(lexical $! :decl(contvar))
- QAST::Var(lexical $/ :decl(contvar))
- QAST::Var(lexical $_ :decl(contvar))
- QAST::Var(lexical GLOBALish :decl(static))
- QAST::Var(lexical EXPORT :decl(static))
- QAST::Var(lexical $?PACKAGE :decl(static))
- QAST::Var(lexical ::?PACKAGE :decl(static))
- QAST::Op(bind)
- QAST::Var(lexical $i :decl())
- QAST::IVal(0)
- QAST::Stmts
- QAST::Op(bind)
- QAST::Var(lexical $k :decl()) $k
- QAST::Op(callmethod at_key)
- QAST::Op(who)
- QAST::Var(lexical $?PACKAGE :decl())
- QAST::WVal(Str)
- QAST::Var(lexical $=pod :decl(static))
- QAST::Var(lexical !UNIT_MARKER :decl(static))
- QAST::VM
[loadlibs]
- nqp_group nqp_ops perl6_ops bit_ops math_ops trans_ops io_ops obscure_ops os file sys_ops nqp_bigint_ops nqp_dyncall_ops
[jvm]
- QAST::Op(null)
[moar]
- QAST::Op(null)
- QAST::Stmts
- QAST::Op(bind)
- QAST::Var(local ctxsave :decl(var))
- QAST::Var(contextual $*CTXSAVE :decl())
- QAST::Op(unless)
- QAST::Op(isnull)
- QAST::Var(local ctxsave :decl())
- QAST::Op(if)
- QAST::Op(can)
- QAST::Var(local ctxsave :decl())
- QAST::SVal(ctxsave)
- QAST::Op(callmethod ctxsave)
- QAST::Var(local ctxsave :decl())
- QAST::Stmts
- QAST::WVal(Array)
- QAST::Stmts my int $i = 0; while $i < 1024 { my int $j = 0; wh...
- QAST::Stmt my int $i = 0
- QAST::Op(bind)
- QAST::Var(lexical $i :decl()) $i
- QAST::Want 0
- QAST::WVal(Int)
- Ii
- QAST::IVal(0)
- QAST::Stmt while $i < 1024 { my int $j = 0; while $j < 1024 {...
- QAST::Want
- QAST::Op(while) $i < 1024 { my int $j = 0; while $j < 1024 { $k = ...
- QAST::Stmts <
- QAST::Stmt
- QAST::Op(islt_i)
- QAST::Var(lexical $i :decl()) $i
- QAST::Want 1024
- QAST::WVal(Int)
- Ii
- QAST::IVal(1024)
- QAST::Block { my int $j = 0; while $j < 1024 { $k = $i + $j; $...
- QAST::Stmts
- QAST::Var(lexical $j :decl(var))
- QAST::Op(bind)
- QAST::Var(lexical $_ :decl(var))
- QAST::Op(getlexouter)
- QAST::SVal($_)
- QAST::Op(bind)
- QAST::Var(lexical $j :decl())
- QAST::IVal(0)
- QAST::Stmts
- QAST::Stmts my int $j = 0; while $j < 1024 { $k = $i + $j; $j...
- QAST::Stmt my int $j = 0
- QAST::Op(bind)
- QAST::Var(lexical $j :decl()) $j
- QAST::Want 0
- QAST::WVal(Int)
- Ii
- QAST::IVal(0)
- QAST::Stmt while $j < 1024 { $k = $i + $j; $j = $j + 1 }
- QAST::Want
- QAST::Op(while) $j < 1024 { $k = $i + $j; $j = $j + 1 }
- QAST::Stmts <
- QAST::Stmt
- QAST::Op(islt_i)
- QAST::Var(lexical $j :decl()) $j
- QAST::Want 1024
- QAST::WVal(Int)
- Ii
- QAST::IVal(1024)
- QAST::Block { $k = $i + $j; $j = $j + 1 }
- QAST::Stmts
- QAST::Var(lexical $k :decl(contvar))
- QAST::Op(bind)
- QAST::Var(lexical $_ :decl(var))
- QAST::Op(getlexouter)
- QAST::SVal($_)
- QAST::Op(bind)
- QAST::Var(lexical $k :decl()) $k
- QAST::Op(callmethod at_key)
- QAST::Op(who)
- QAST::Var(lexical $?PACKAGE :decl())
- QAST::WVal(Str)
- QAST::Stmts $k = $i + $j; $j = $j + 1
- QAST::Stmt $k = $i + $j
- QAST::Op(assign)
- QAST::Var(lexical $k :decl()) $k
- QAST::Stmts +
- QAST::Stmt
- QAST::Op(add_i)
- QAST::Var(lexical $i :decl()) $i
- QAST::Var(lexical $j :decl()) $j
- QAST::Stmt $j = $j + 1
- QAST::Op(bind)
- QAST::Var(lexical $j :decl()) $j
- QAST::Stmts +
- QAST::Stmt
- QAST::Op(add_i)
- QAST::Var(lexical $j :decl()) $j
- QAST::Want 1
- QAST::WVal(Int)
- Ii
- QAST::IVal(1)
- v
- QAST::Op(p6sink)
- QAST::Op(while) $j < 1024 { $k = $i + $j; $j = $j + 1 }
- QAST::Stmts <
- QAST::Stmt
- QAST::Op(islt_i)
- QAST::Var(lexical $j :decl()) $j
- QAST::Want 1024
- QAST::WVal(Int)
- Ii
- QAST::IVal(1024)
- QAST::Block { $k = $i + $j; $j = $j + 1 }
- QAST::Stmts
- QAST::Var(lexical $k :decl(contvar))
- QAST::Op(bind)
- QAST::Var(lexical $_ :decl(var))
- QAST::Op(getlexouter)
- QAST::SVal($_)
- QAST::Op(bind)
- QAST::Var(lexical $k :decl()) $k
- QAST::Op(callmethod at_key)
- QAST::Op(who)
- QAST::Var(lexical $?PACKAGE :decl())
- QAST::WVal(Str)
- QAST::Stmts $k = $i + $j; $j = $j + 1
- QAST::Stmt $k = $i + $j
- QAST::Op(assign)
- QAST::Var(lexical $k :decl()) $k
- QAST::Stmts +
- QAST::Stmt
- QAST::Op(add_i)
- QAST::Var(lexical $i :decl()) $i
- QAST::Var(lexical $j :decl()) $j
- QAST::Stmt $j = $j + 1
- QAST::Op(bind)
- QAST::Var(lexical $j :decl()) $j
- QAST::Stmts +
- QAST::Stmt
- QAST::Op(add_i)
- QAST::Var(lexical $j :decl()) $j
- QAST::Want 1
- QAST::WVal(Int)
- Ii
- QAST::IVal(1)
- QAST::Stmt $i = $i + 1
- QAST::Op(bind)
- QAST::Var(lexical $i :decl()) $i
- QAST::Stmts +
- QAST::Stmt
- QAST::Op(add_i)
- QAST::Var(lexical $i :decl()) $i
- QAST::Want 1
- QAST::WVal(Int)
- Ii
- QAST::IVal(1)
- v
- QAST::Op(p6sink)
- QAST::Op(while) $i < 1024 { my int $j = 0; while $j < 1024 { $k = ...
- QAST::Stmts <
- QAST::Stmt
- QAST::Op(islt_i)
- QAST::Var(lexical $i :decl()) $i
- QAST::Want 1024
- QAST::WVal(Int)
- Ii
- QAST::IVal(1024)
- QAST::Block { my int $j = 0; while $j < 1024 { $k = $i + $j; $...
- QAST::Stmts
- QAST::Var(lexical $j :decl(var))
- QAST::Op(bind)
- QAST::Var(lexical $_ :decl(var))
- QAST::Op(getlexouter)
- QAST::SVal($_)
- QAST::Op(bind)
- QAST::Var(lexical $j :decl())
- QAST::IVal(0)
- QAST::Stmts
- QAST::Stmts my int $j = 0; while $j < 1024 { $k = $i + $j; $j...
- QAST::Stmt my int $j = 0
- QAST::Op(bind)
- QAST::Var(lexical $j :decl()) $j
- QAST::Want 0
- QAST::WVal(Int)
- Ii
- QAST::IVal(0)
- QAST::Stmt while $j < 1024 { $k = $i + $j; $j = $j + 1 }
- QAST::Want
- QAST::Op(while) $j < 1024 { $k = $i + $j; $j = $j + 1 }
- QAST::Stmts <
- QAST::Stmt
- QAST::Op(islt_i)
- QAST::Var(lexical $j :decl()) $j
- QAST::Want 1024
- QAST::WVal(Int)
- Ii
- QAST::IVal(1024)
- QAST::Block { $k = $i + $j; $j = $j + 1 }
- QAST::Stmts
- QAST::Var(lexical $k :decl(contvar))
- QAST::Op(bind)
- QAST::Var(lexical $_ :decl(var))
- QAST::Op(getlexouter)
- QAST::SVal($_)
- QAST::Op(bind)
- QAST::Var(lexical $k :decl()) $k
- QAST::Op(callmethod at_key)
- QAST::Op(who)
- QAST::Var(lexical $?PACKAGE :decl())
- QAST::WVal(Str)
- QAST::Stmts $k = $i + $j; $j = $j + 1
- QAST::Stmt $k = $i + $j
- QAST::Op(assign)
- QAST::Var(lexical $k :decl()) $k
- QAST::Stmts +
- QAST::Stmt
- QAST::Op(add_i)
- QAST::Var(lexical $i :decl()) $i
- QAST::Var(lexical $j :decl()) $j
- QAST::Stmt $j = $j + 1
- QAST::Op(bind)
- QAST::Var(lexical $j :decl()) $j
- QAST::Stmts +
- QAST::Stmt
- QAST::Op(add_i)
- QAST::Var(lexical $j :decl()) $j
- QAST::Want 1
- QAST::WVal(Int)
- Ii
- QAST::IVal(1)
- v
- QAST::Op(p6sink)
- QAST::Op(while) $j < 1024 { $k = $i + $j; $j = $j + 1 }
- QAST::Stmts <
- QAST::Stmt
- QAST::Op(islt_i)
- QAST::Var(lexical $j :decl()) $j
- QAST::Want 1024
- QAST::WVal(Int)
- Ii
- QAST::IVal(1024)
- QAST::Block { $k = $i + $j; $j = $j + 1 }
- QAST::Stmts
- QAST::Var(lexical $k :decl(contvar))
- QAST::Op(bind)
- QAST::Var(lexical $_ :decl(var))
- QAST::Op(getlexouter)
- QAST::SVal($_)
- QAST::Op(bind)
- QAST::Var(lexical $k :decl()) $k
- QAST::Op(callmethod at_key)
- QAST::Op(who)
- QAST::Var(lexical $?PACKAGE :decl())
- QAST::WVal(Str)
- QAST::Stmts $k = $i + $j; $j = $j + 1
- QAST::Stmt $k = $i + $j
- QAST::Op(assign)
- QAST::Var(lexical $k :decl()) $k
- QAST::Stmts +
- QAST::Stmt
- QAST::Op(add_i)
- QAST::Var(lexical $i :decl()) $i
- QAST::Var(lexical $j :decl()) $j
- QAST::Stmt $j = $j + 1
- QAST::Op(bind)
- QAST::Var(lexical $j :decl()) $j
- QAST::Stmts +
- QAST::Stmt
- QAST::Op(add_i)
- QAST::Var(lexical $j :decl()) $j
- QAST::Want 1
- QAST::WVal(Int)
- Ii
- QAST::IVal(1)
- QAST::Stmt $i = $i + 1
- QAST::Op(bind)
- QAST::Var(lexical $i :decl()) $i
- QAST::Stmts +
- QAST::Stmt
- QAST::Op(add_i)
- QAST::Var(lexical $i :decl()) $i
- QAST::Want 1
- QAST::WVal(Int)
- Ii
- QAST::IVal(1)
- QAST::Stmt say $k
- QAST::Want
- QAST::Op(callstatic &say) say $k
- QAST::Var(lexical $k :decl()) $k
- v
- QAST::Op(p6sink)
- QAST::Op(callstatic &say) say $k
- QAST::Var(lexical $k :decl()) $k
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment