查看v8编译js生成的机器代码

来源:互联网 发布:工业工程研究生知乎 编辑:程序博客网 时间:2024/05/18 00:52


1、编译v8使用ENABLE_DISASSEMBLER预编译宏

2、d8 --print-code add.js


3、相关命令

--code-comments

  • --print-code: prints out code to stdout.
  • --print-code-stubs: prints code stubs.
  • --print-opt-code: prints optimized code.
  • --trace-hydrogen: prints IR (intermediate representation) code to hydrogen.cfg. This file can be opened withJava's C1Visualizer.
    
  • 0 0