在檔案上執行 v8

使用 d8 shell 執行 v8 引擎。使用以下模式在檔案上執行:

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

例如:

./d8 --log-gc script.js

將在啟用了垃圾收集日誌記錄的 script.js 上執行 d8