Upgrade to Pro — share decks privately, control downloads, hide ads and more …

仮想マシンにおけるスタックの管理

 仮想マシンにおけるスタックの管理

言語処理系Slackミートアップ#4(2021/07/11)

Aea43fe34799c7ae03e9793919e39c65?s=128

monochrome

July 11, 2021
Tweet

Transcript

  1. プログラミング言語Slack 定期ミートアップ 2021/07/11 仮想マシンにおけるスタック・ヒープのハンドリング monochrome ruruby: https://github.com/sisshiki1969/ruruby

  2. def g end def f g() end f() toplevel Virtual

    Context stack
  3. def g end def f g() end f() toplevel f

    Virtual Context stack
  4. def g end def f g() end f() toplevel f

    g Virtual Context stack
  5. def g end def f g() end f() toplevel f

    Virtual Context stack
  6. def g end def f g() end f() toplevel Virtual

    Context stack
  7. t = 100 3.times do b1 = 0 end toplevel

    block Virtual Context stack b1 t
  8. def f f1 = 5 Proc.new do b1 = 1

    g() end end p = f() p.call() toplevel f Virtual Context stack f1
  9. def f f1 = 5 Proc.new do b1 = 1

    g() end end p = f() p.call() toplevel f Virtual Context stack f1 block b1 Heap space
  10. def f f1 = 5 Proc.new do b1 = 1

    g() end end p = f() p.call() toplevel f Virtual Context stack block b1 Heap space f’ f1
  11. def f f1 = 5 Proc.new do b1 = 1

    g() end end p = f() p.call() toplevel Virtual Context stack block b1 Heap space f’ f1 p
  12. def f f1 = 5 Proc.new do b1 = 1

    g() end end p = f() p.call() toplevel Virtual Context stack block b1 Heap space f’ f1 p
  13. def f f1 = 5 Proc.new do b1 = 1

    g() end end p = f() p.call() toplevel Virtual Context stack block b1 Heap space f’ f1 p g
  14. def f f1 = 5 Proc.new do b1 = 1

    g() end end p = f() p.call() toplevel Virtual Context stack block b1 Heap space f’ f1 p