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

PHP で JVM を実装して、 HelloWorld を出力してみる

memory
February 09, 2020

PHP で JVM を実装して、 HelloWorld を出力してみる

- PHPerKaigi 2020

- English Title:
Implement JVM with PHP and try to output Hello World

memory

February 09, 2020
Tweet

More Decks by memory

Other Decks in Programming

Transcript

  1. OSS

  2. JVM

  3. JVM

  4. JVM

  5. JVM

  6. JVM

  7. JVM

  8. PHP

  9. PHP

  10. © - BASE, Inc. PHP int (- ^ ^ -

    ) bool string float, double array null etc...
  11. © - BASE, Inc. Java byte char short (- ^

    ^ - ) int (- ^ ^ - ) long (- ^ ^ - ) boolean float double
  12. © - BASE, Inc. JVM Spec Java Virtual Machine Specification

    JVM Spec JVM Spec Oracle JVM https://docs.oracle.com/javase/specs/ index.html
  13. 4

  14. ldc

  15. © - BASE, Inc. ldc ldc Constant Pool UTF Integer,

    short, byte Constant Pool unsigned byte
  16. © - BASE, Inc. Hello World B NN MM NN

    B NN MM B unsigned short
  17. © - BASE, Inc. Hello World B NN MM NN

    B NN MM B unsigned byte Hello World Constant Pool
  18. © - BASE, Inc. Hello World B NN MM NN

    B NN MM B invokevirtual
  19. © - BASE, Inc. Hello World B NN MM NN

    B NN MM B unsigned short Constant Pool