Guest User

Untitled

a guest
Nov 19th, 2017
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.59 KB | None | 0 0
  1. == disasm: #<ISeq:<main>@./sample.rb>=================================== | == disasm: #<ISeq:<main>@./sample2.rb>==================================
  2. local table (size: 1, argc: 0 [opts: 0, rest: -1, post: 0, block: -1, kw: -1@-1, kwrest: -1]) local table (size: 1, argc: 0 [opts: 0, rest: -1, post: 0, block: -1, kw: -1@-1, kwrest: -1])
  3. [ 1] a [ 1] a
  4. 0000 putspecialobject 3 ( 1) 0000 putspecialobject 3 ( 1)
  5. 0002 putnil 0002 putnil
  6. 0003 defineclass :A, <class:A>, 0 0003 defineclass :A, <class:A>, 0
  7. 0007 pop 0007 pop
  8. 0008 getinlinecache 15, <is:0> ( 13) 0008 getinlinecache 15, <is:0> ( 13)
  9. 0011 getconstant :A 0011 getconstant :A
  10. 0013 setinlinecache <is:0> 0013 setinlinecache <is:0>
  11. 0015 send <callinfo!mid:new, argc:0, ARGS_SIMPLE>, <callcache>, nil 0015 send <callinfo!mid:new, argc:0, ARGS_SIMPLE>, <callcache>, nil
  12. 0019 setlocal a, 0 0019 setlocal a, 0
  13. 0022 getlocal a, 0 ( 14) 0022 getlocal a, 0 ( 14)
  14. 0025 putobject 1 0025 putobject 1
  15. 0027 send <callinfo!mid:foo=, argc:1, ARGS_SIMPLE>, <callcache>, nil 0027 send <callinfo!mid:foo=, argc:1, ARGS_SIMPLE>, <callcache>, nil
  16. 0031 pop 0031 pop
  17. 0032 putself ( 15) 0032 putself ( 15)
  18. 0033 getlocal a, 0 0033 getlocal a, 0
  19. 0036 send <callinfo!mid:bar, argc:0, ARGS_SIMPLE>, <callcache>, nil 0036 send <callinfo!mid:bar, argc:0, ARGS_SIMPLE>, <callcache>, nil
  20. 0040 send <callinfo!mid:p, argc:1, FCALL|ARGS_SIMPLE>, <callcache>, nil 0040 send <callinfo!mid:p, argc:1, FCALL|ARGS_SIMPLE>, <callcache>, nil
  21. 0044 leave 0044 leave
  22. == disasm: #<ISeq:<class:A>@./sample.rb>================================ | == disasm: #<ISeq:<class:A>@./sample2.rb>===============================
  23. 0000 putself ( 2) 0000 putself ( 2)
  24. 0001 putobject :foo 0001 putobject :foo
  25. 0003 send <callinfo!mid:attr_accessor, argc:1, FCALL|ARGS_SIMPLE>, <callcache>, n 0003 send <callinfo!mid:attr_accessor, argc:1, FCALL|ARGS_SIMPLE>, <callcache>, n
  26. 0007 pop 0007 pop
  27. 0008 putspecialobject 1 ( 3) 0008 putspecialobject 1 ( 3)
  28. 0010 putobject :bar 0010 putobject :bar
  29. 0012 putiseq bar 0012 putiseq bar
  30. 0014 send <callinfo!mid:core#define_method, argc:2, ARGS_SIMPLE>, <callcache>, ni 0014 send <callinfo!mid:core#define_method, argc:2, ARGS_SIMPLE>, <callcache>, ni
  31. 0018 pop 0018 pop
  32. 0019 putspecialobject 1 ( 8) 0019 putspecialobject 1 ( 8)
  33. 0021 putobject :baz 0021 putobject :baz
  34. 0023 putiseq baz 0023 putiseq baz
  35. 0025 send <callinfo!mid:core#define_method, argc:2, ARGS_SIMPLE>, <callcache>, ni 0025 send <callinfo!mid:core#define_method, argc:2, ARGS_SIMPLE>, <callcache>, ni
  36. 0029 leave 0029 leave
  37. == disasm: #<ISeq:bar@./sample.rb>====================================== | == disasm: #<ISeq:bar@./sample2.rb>=====================================
  38. local table (size: 1, argc: 0 [opts: 0, rest: -1, post: 0, block: -1, kw: -1@-1, kwrest: -1]) local table (size: 1, argc: 0 [opts: 0, rest: -1, post: 0, block: -1, kw: -1@-1, kwrest: -1])
  39. [ 1] foo | [ 1] test
  40. 0000 putself ( 4) 0000 putself ( 4)
  41. 0001 getlocal foo, 0 | 0001 putself
  42. 0004 send <callinfo!mid:baz, argc:1, FCALL|ARGS_SIMPLE>, <callcache>, nil | 0002 send <callinfo!mid:foo, argc:0, FCALL|VCALL|ARGS_SIMPLE>, <callcache>, nil
  43. 0008 setlocal foo, 0 | 0006 send <callinfo!mid:baz, argc:1, FCALL|ARGS_SIMPLE>, <callcache>, nil
  44. 0011 getlocal foo, 0 ( 5) | 0010 setlocal test, 0
  45. 0014 leave | 0013 getlocal test, 0 ( 5)
  46. == disasm: #<ISeq:baz@./sample.rb>====================================== | 0016 leave
  47. > == disasm: #<ISeq:baz@./sample2.rb>=====================================
  48. local table (size: 1, argc: 1 [opts: 0, rest: -1, post: 0, block: -1, kw: -1@-1, kwrest: -1]) local table (size: 1, argc: 1 [opts: 0, rest: -1, post: 0, block: -1, kw: -1@-1, kwrest: -1])
  49. [ 1] v<Arg> [ 1] v<Arg>
  50. 0000 getlocal v, 0 ( 9) 0000 getlocal v, 0 ( 9)
  51. 0003 leave 0003 leave
Add Comment
Please, Sign In to add comment