在文件上运行 v8

使用 d8 shell 运行 v8 引擎。使用以下模式在文件上运行:

/path/to/d8 [flags] [file].js

例如:

./d8 --log-gc script.js

将在启用了垃圾收集日志记录的 script.js 上运行 d8