Skip to content

Instantly share code, notes, and snippets.

@subbuss
Created July 8, 2009 05:02
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 subbuss/142591 to your computer and use it in GitHub Desktop.
Save subbuss/142591 to your computer and use it in GitHub Desktop.
[subbu@earth jruby] java -cp lib/jruby.jar org.jruby.compiler.ir.IR_Builder -e "def foo(a); (1..10).collect { |i| i + a }; end;"
Script:
file: "-e"
class:
Class:
className: _DUMMY_
instrs:
0 DEF_CLASS_METH(_DUMMY_, __file__)
1 DEF_INST_METH(_DUMMY_, foo)
methods:
[Method:
name: __file__, Method:
name: foo
instrs:
0 self = RECV_ARG(0)
1 a = RECV_ARG(1)
2 %v_0 = COPY(Closure: {
instrs:
0 i = RECV_BLOCK_ARG(0)
1 %v_0 = CALL(+, [i, a])
2 CLOSURE_RETURN(%v_0)
})
3 %v_1 = CALL(collect, [(1:fixnum..10:fixnum):Range]), closure: %v_0
4 RETURN(%v_1)
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment