Skip to content

Instantly share code, notes, and snippets.

@SpringMT
Last active November 17, 2017 15:15
Show Gist options
  • Select an option

  • Save SpringMT/ba02342b08cbcd4ee4aaa614f0e8e54d to your computer and use it in GitHub Desktop.

Select an option

Save SpringMT/ba02342b08cbcd4ee4aaa614f0e8e54d to your computer and use it in GitHub Desktop.
< == disasm: #<ISeq:bar@./sample.rb>======================================
---
> == disasm: #<ISeq:bar@./sample2.rb>=====================================
39c39
< [ 1] foo
---
> [ 1] test
41,46c41,47
< 0001 getlocal foo, 0 <==== ローカル変数fooが定義されている
< 0004 send <callinfo!mid:baz, argc:1, FCALL|ARGS_SIMPLE>, <callcache>, nil
< 0008 setlocal foo, 0
< 0011 getlocal foo, 0 ( 5)
< 0014 leave
< == disasm: #<ISeq:baz@./sample.rb>======================================
---
> 0001 putself
> 0002 send <callinfo!mid:foo, argc:0, FCALL|VCALL|ARGS_SIMPLE>, <callcache>, nil <==== fooメソッドが呼び出されている
> 0006 send <callinfo!mid:baz, argc:1, FCALL|ARGS_SIMPLE>, <callcache>, nil
> 0010 setlocal test, 0
> 0013 getlocal test, 0 ( 5)
> 0016 leave
> == disasm: #<ISeq:baz@./sample2.rb>=====================================
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment