- ͜ͷ CPU ͷ໋ྩηοτΛஞ࣮࣍ߦͤ͞Δ͜ͱ͕ίϯϐϡʔλʔ͕ಈ͘ݪཧͷ ҰͭͰ͕͢ɼZend VM JVMɼRubyVM ʹ໋ྩηοτ͕͋Γɼ·ΔͰίϯ ϐϡʔλʔ͕ಈ͘ݪཧʹଇ࣮ͬͯߦ͞Ε͍ͯ·͢ɻ - ͦͷͨΊɼΤϛϡϨʔγϣϯͱ͍͏จ຺Ͱ VM Ͱ͋ΔͱղऍͰ͖ΔͷͰ͢ɻ VM (Virtual Machine) ʹ͍ͭͯ
instruction sequence offsets section (The information is each of instruction sequence offsets; N>0 * 4 bytes) The global object offsets section (The information is each of global object offsets; N>0 * 4 bytes) The extra data (if embedded extra data; N>=0 bytes) A part of instruction sequences A part of global objects The RUBY_PLATFORM name section (string) An information of string / class / fi xed number / bool types and data An information of instruction sequence section (In normally, 44 info * 4 bytes = 176 bytes notice: no considered hamming weight) ộ A code section (N>0 bytes) ộ A local table section (N>=0 bytes) A call info entry section (N>=0 bytes) ộ The structure of YARV The alignment section (Filled by 0xff to align every 2 bytes) ※ Ruby ຊମͷ C ࣮ΛಡΜͰࢲ͕ղऍͨ͠ͷΛςΩετɾਤʹදͨ͠ͷͰ͢ɻ
instruction sequence offsets section (The information is each of instruction sequence offsets; N>0 * 4 bytes) The global object offsets section (The information is each of global object offsets; N>0 * 4 bytes) The extra data (if embedded extra data; N>=0 bytes) A part of instruction sequences A part of global objects The endian section (2 bytes) An information of string / class / fi xed number / bool types and data An information of instruction sequence section (In normally, 44 info * 4 bytes = 176 bytes notice: no considered hamming weight) ộ A code section (N>0 bytes) ộ A local table section (N>=0 bytes) A call info entry section (N>=0 bytes) ộ The structure of YARV The alignment section (Filled by 0xff to align every 2 ※ Ruby ຊମͷ C ࣮ΛಡΜͰࢲ͕ղऍͨ͠ͷΛςΩετɾਤʹදͨ͠ͷͰ͢ɻ The word size section (2 bytes)
instruction sequence offsets section (The information is each of instruction sequence offsets; N>0 * 4 bytes) The global object offsets section (The information is each of global object offsets; N>0 * 4 bytes) The extra data (if embedded extra data; N>=0 bytes) A part of instruction sequences A part of global objects An information of string / class / fi xed number / bool types and data An information of instruction sequence section (In normally, 44 info * 4 bytes = 176 bytes notice: no considered hamming weight) ộ A code section (N>0 bytes) ộ A local table section (N>=0 bytes) A call info entry section (N>=0 bytes) ộ The structure of YARV The alignment section (Filled by 0xff to align every 2 ※ Ruby ຊମͷ C ࣮ΛಡΜͰࢲ͕ղऍͨ͠ͷΛςΩετɾਤʹදͨ͠ͷͰ͢ɻ The endian section (2 bytes) The word size section (2 bytes) Platform name section ͕ endian section ͱ word size section ʹมߋɻ Ruby 3.2 → 3.3 Ͱ YARV ͷߏ͜ΕҎ֎มߋͳ͠ɻ
όΠτ͝ͱͷ ΦϑηοτใΛऔಘ͢Δ global object list offset ʹΧʔιϧΛҠಈ global object list size ϧʔϓΛճ͠ 4 όΠτ͝ͱ ͷΦϑηοτใΛऔಘ͢Δ Instruction Sequence ͷΦϑηοτใϦετΛऔಘ Global Object ͷΦϑηοτใϦετΛऔಘ