How V8 executes WASM

How V8 executes WASM

WASM Pipeline of V8 javascript engine

Transcript

  1. H o w V 8 E x e c u

    t e W A S M
  2. Name !CSO 5BLFUPTIJ"POP੨໺݈ར  Occupation 'SPOUFOE%FWFMPQFS1SPEVDU0XOFS Company $ZCFSBHFOU"EUFDI4UVEJP"*.FTTFOHFS OSS $POUSJCVUPSPG7

    About IUUQJOGPCODI
  3. 8"4.࣮ߦύε

  4. 8"4. -JGU0⒎ JBY 5VSCP'BO 0UIFST 5VSCP'BO %FCVH *OUFSQSFUFS

  5. -JGUPGG 8"4.ઐ༻ͷ#BTFMJOFίϯύΠϥ 8"4.ͷ01ίʔυΛ+*5ʹม׵͢Δ ϨδελϚγϯ͕ͩɺ஋ͷϩʔυʹελοΫ΋࢖͏ Ϩδελׂ෇͸ϦχΞʹߦ͍ɺϨδελ͕ރׇͨ͠ΒTQJMM͠ɺಛʹੜଘظؒ ͷ෼ੳ౳͸͍ͯ͠ͳ͍ 9ͱ*"ͷΈσϑΥϧτͰ0/ʹͳ͍ͬͯΔ

  6. 5VSCP'BO 7ͷ࠷దԽ+*5༻ύΠϓϥΠϯ άϥϑΛੜ੒͔ͯ͠Βɺάϥϑ΁ͷ࠷దԽύΠϓϥΠϯΛ௨Γɺ *OTUSVDUJPO4FMFDUPSΛܦͯ+*5ίʔυΛग़ྗ͢Δ +BWBTDSJQU΋͜ͷ࠷దԽΛܦͯ+*5ίʔυ͕ग़ྗ͞ΕΔ

  7. 5VSCP'BO1JQFMJOF

  8. 8"4. %FDPEF 'VODUJPO#PEZ 44" (SBQI 0QUJNJ[BUJPO QBTT 4DIFEVMJOH 3FHJTUFS "MMPDBUJPO

    *OTUSVDUJPO TFMFDUJPO $PEF (FOFSBUJPO
  9. -JGUPGG1JQFMJOF

  10. 8"4. %FDPEF 'VODUJPO#PEZ $PEF (FOFSBUJPO

  11. KBWBTDSJQU1JQFMJOF

  12. +4 44" (SBQI 0QUJNJ[BUJPO QBTT 4DIFEVMJOH 3FHJTUFS "MMPDBUJPO *OTUSVDUJPO TFMFDUJPO

    $PEF (FOFSBUJPO 1BSTF "45 #ZUFDPEF (SBQI #ZUFDPEF
  13. -JGUPGG5JFSJOH

  14. 8"4. -JGU0⒎ &YFDVUFCBTFMJOF+*5 5VSCP'BO *NNFEJBUFMZTUBSUCBDLHSPVOEDPNQJMF

  15. 5JFSJOH -JGUPGGͷ৔߹͸࠷ॳʹ-JGUPGGͰ#BTFMJOF+*5Λग़ྗ࣮ͯ͠ߦ͢Δ ͜͏͢Δ͜ͱͰελʔτΞοϓλΠϜͷߴ଎ԽΛߦ͏ ͞Βʹ8"4.͸+4ͱҧͬͯ੩తʹશͯܕ෇͚͞Ε͍ͯΔͨΊɺ࣮ߦͷ5SBDF ΛߦΘͣʹଈ࠷దԽ+*5Λग़ྗ͢Δ͜ͱ͕Ͱ͖Δ ͦͷͨΊɺ#BTFMJOFΛੜ੒ͭͭ͠όοΫάϥϯυͰ5VSCP'BOʹΑΔ࠷దԽ +*5ͷग़ྗΛಉ࣌ʹߦ͍ͬͯΔ

  16. *OUFSQSFUFS 8"4.༻ͷΠϯλϓϦλ࣮૷ ී௨ʹ࣮ߦͨ͠৔߹ʹ͜ͷύεʹೖΔ͜ͱ͸ͳ͍ σόοά༻్ͱͯ͠ͷΈଘࡏ͢Δ ଎౓͸ͱͯ΋஗͍

  17. $PEF$BDIJOH

  18. 5VSCP'BODPEFDBDIJOH 8"4.ͷίʔυ͸Ұ౓ίϯύΠϧ͞ΕΔͱ$ISPNFʹΑͬͯΩϟογϡ͞Ε ͯ࣍ճҎ߱͸ߴ଎Ͱىಈ͢Δ

  19. 5PFGpDJFOUDBDIJOH ʠJOTUBOUJBUF4USFBNJOHʡ͔ʠDPNQJMF4USFBNJOHʡΛར༻͢Δඞཁ͕͋ Δ 63-ͱXBTNͷ૊Έ߹ΘͤͰΩϟογϡΛߦ͏ͷͰɺҧ͏63-͔Βϩʔυ ͢ΔͷΛ΍ΊΔ

  20. KBWBTDSJQUͱൺ΂ͯ

  21. $PEFTJ[F ѹॖ͞Εͨ#ZUFDPEFͳͷͰ౰વKBWBTDSJQUͷιʔείʔυΑΓ΋খ͍͞ ίʔυ಺༰ʹΑΔ͕

  22. 5ZQF'FFECBDL KBWBTDSJQU͸ܕ͕ແ͍ͷͰɺCBTFMJOFͰ༷ʑͳܕʹରԠ͢ΔίʔυΛग़ྗ ͦͷޙऩू͞Εͨܕ৘ใ͔Βม਺ͷܕΛ༧૝ͯ͠+*5Λग़ྗ͢Δ 8"4.͸੩తܕ෇͚ͳͷͰɺͦͷաఔΛܦΔඞཁ͕ແ͍

  23. 4UBUJD0QUJNJ[BUJPO 8"4.͸ଟ͘ͷ৔߹ɺίϯύΠϥ͔Βग़ྗ͞ΕΔͨΊɺίϯύΠϥͷόοΫ Τϯυ͕੩తͳ࠷దԽΛࢪ͢͜ͱ͕Ͱ͖Δ +*5ͷλΠϛϯάͰߦ͏࠷దԽ͸࣌ؒΛ͔͚ΒΕͳ͍ͨΊɺߦ͑Δ࠷దԽ͕ ݶΒΕΔ

  24. ($ 8"4.ʹ͸($͕ແ͍ͷͰߴ଎ͳׂ౰͕Մೳ 8"4.ͷϝϞϦ͸+4ͷ"SSBZ#VGGFS͔ΒׂΓ౰ͯΒΕ͍ͯΔ͕ɺׂ౰ͷλΠ ϛϯάͰ0MEεϖʔεʹׂΓ౰ͯΔͷͰ+4ͷ($ͷର৅ʹ΋ͳΓͮΒ͍

  25. ؾʹͳΔ఺ 8"4.͸͔ͳΓMPXMFWFMͳ#ZUFDPEFͳͷͰɺ+7.ͷΑ͏ͳલఏ৚݅Λ΋ͨ ͤΒΕͣɺΤϯδϯଆͰͰ͖Δ࠷దԽ͕͔ͳΓݶΒΕͯ͘Δ ࣄલͷ࠷దԽ͕ඇৗʹॏཁʹͳͬͯ͠·͍ɺ࢖͏ίϯύΠϥʹੑೳ͕େ͖͘ ґଘͦ͠͏

  26. ·ͱΊ ΍͸Γ8"4.͸ͱͯ΋ίϯύΠϥϑϨϯυϦʔ KBWBTDSJQUͷ࠷దԽύε͸͔ͳΓෳࡶʹݟ͑Δ