euler:rubinius brian$ echo "dispatch(obj, meth, dispatch(obj, meth, obj))" > script.rb
euler:rubinius brian$ shotgun/rubinius describe script.rb
Sexp:
[:newline,
1,
"script.rb",
[:fcall,
:dispatch,
[:array,
[:vcall, :obj],
[:vcall, :meth],
[:fcall,
:dispatch,
[:array, [:vcall, :obj], [:vcall, :meth], [:vcall, :obj]]]]]]
Bytecode:
0000: push_self
0001: set_call_flags 1
0003: send_method #<SendSite:0x91 name=obj hits=0 misses=0>
0005: push_self
0006: set_call_flags 1
0008: send_method #<SendSite:0xb1 name=meth hits=0 misses=0>
0010: push_self
0011: set_call_flags 1
0013: send_method #<SendSite:0xd1 name=obj hits=0 misses=0>
0015: push_self
0016: set_call_flags 1
0018: send_stack #<SendSite:0xf1 name=dispatch hits=0 misses=0>, 3
0021: push_self
0022: set_call_flags 1
0024: send_method #<SendSite:0x111 name=meth hits=0 misses=0>
0026: push_self
0027: set_call_flags 1
0029: send_method #<SendSite:0x131 name=obj hits=0 misses=0>
0031: push_self
0032: set_call_flags 1
0034: send_stack #<SendSite:0x151 name=dispatch hits=0 misses=0>, 3
0037: pop
0038: push_true
0039: sret