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

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

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

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

monochrome

July 11, 2021
Tweet

More Decks by monochrome

Other Decks in Programming

Transcript

  1. def g end def f g() end f() toplevel f

    g Virtual Context stack
  2. t = 100 3.times do b1 = 0 end toplevel

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

    g() end end p = f() p.call() toplevel f Virtual Context stack f1
  4. 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
  5. 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
  6. 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
  7. 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
  8. 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
  9. 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