RubyKaigi 2023 LT
The internal of the mruby VM (in 5 minutes)
Powered by Rabbit 3.0.1mruby VMOSS VisionRuby AssociationYukihiro "Matz" Matsumoto@yukihiro_matz
View Slide
Powered by Rabbit 3.0.1 mruby
Powered by Rabbit 3.0.1 Alternative Ruby Implementation
Powered by Rabbit 3.0.1 M-Ruby
Powered by Rabbit 3.0.1 Modular Ruby
Powered by Rabbit 3.0.1 eMbeddable Ruby
Powered by Rabbit 3.0.1 Memory efficient Ruby
Powered by Rabbit 3.0.1 Embeddable VM
Powered by Rabbit 3.0.1 Register Based Instruction SetRuby Specialized InstructionsPortable Instruction Set
Powered by Rabbit 3.0.1 Register vs Stack
Powered by Rabbit 3.0.1Stack based InstructionsPUSH 1PUSH 2ADD
Powered by Rabbit 3.0.1 Less OperandsSmaller InstructionsHighly Dependent Instruction Order
Powered by Rabbit 3.0.1Register based InstructionsLOADINT R1 1LOADINT R2 2ADD R1 R2
Powered by Rabbit 3.0.1 More OperandsLonger InstructionsIndependent Instruction OrderEasier to Peep-hole Optimize
Powered by Rabbit 3.0.1 # a (R1) = 42LOADINT R2 42MOVE R1 R2
Powered by Rabbit 3.0.1 # a (R1) = 42LOADINT R1 42
Powered by Rabbit 3.0.1 Ruby Specialized Instructions
Powered by Rabbit 3.0.1 GETIV,GETCV,GETCONSTSEND,SENDBSUPEREXCEPT,RESCUE,RAISEIF
Powered by Rabbit 3.0.1 Portable
Powered by Rabbit 3.0.1 Can be dumped in binary format
Powered by Rabbit 3.0.1 Used by mruby, mruby/c
Powered by Rabbit 3.0.1 Not easy to upgrade
Powered by Rabbit 3.0.1 Compile Once, Run Anywhere
Powered by Rabbit 3.0.1 Even on Keyboards
Powered by Rabbit 3.0.1 Sponsored bySalesforce.com
Powered by Rabbit 3.0.1 Sponsored byNaCl
Powered by Rabbit 3.0.1 Sponsored byGitHub Sponsors
Powered by Rabbit 3.0.1 Sponsored byRuby Community
Powered by Rabbit 3.0.1 Thank you