)]}'
{
  "commit": "0bb26c10d3cd7d9327cf95c1d1cf8fd1252ea3bb",
  "tree": "82867243007421778a77e41008a7502ccf9da72f",
  "parents": [
    "0479680d8e69d284baab5ac9d50387e078385d0f"
  ],
  "author": {
    "name": "Sam Clegg",
    "email": "sbc@chromium.org",
    "time": "Mon Oct 12 22:29:56 2026"
  },
  "committer": {
    "name": "GitHub",
    "email": "noreply@github.com",
    "time": "Mon Oct 12 22:29:56 2026"
  },
  "message": "Enable Terser `reduce_vars` and `unused` in `acorn-optimizer.mjs` (#27949)\n\nSplit out from #27871\n\nEnable `reduce_vars` and `unused` in Terser `--compress` (added in\n#27926) in `tools/acorn-optimizer.mjs`.\n\nThis inlines `const` values into their expression uses and drops the\nresulting unused local `const` declarations (along with unused function\nparameters and single-use inner functions) in optimized builds that do\nnot run Closure Compiler.\n\nThis allows us to use `const` in JS library code without paying a code\nsize cost, while reducing total JS code size in\n`test_no_closure_code_size` by 611 bytes.\n\nTiming highlights (`test/hello_world.c` with `-sINCLUDE_FULL_LIBRARY`,\n~247 KB minified JS):\n- `minify_sync` with `compress: {defaults: false, evaluate: true,\nkeep_fargs: false}`: 165.1 ms (250,514 B)\n- `minify_sync` adding `reduce_vars: true, unused: true`: 224.3 ms\n(+59.2 ms, or +26.7 ms for `unused` and +28.8 ms for `reduce_vars`),\nsaving ~3.2 KB (247,346 B).\n\nOn a standard `-O2` `hello_world.c` build (~8.4 KB JS), `minify_sync`\ngoes from 3.9 ms to 6.2 ms (+2.3 ms), saving 92 B.",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "5302787627145f7e9f68a758439b4dcaf07a664f",
      "old_mode": 33188,
      "old_path": "test/codesize/test_codesize_hello_esm_integration.json",
      "new_id": "09b7dd967887ea9f50be0c524c47dad860a852ed",
      "new_mode": 33188,
      "new_path": "test/codesize/test_codesize_hello_esm_integration.json"
    },
    {
      "type": "modify",
      "old_id": "9fd41cce932c073c4633208d4ee53ed7f7e4a7db",
      "old_mode": 33188,
      "old_path": "test/codesize/test_codesize_minimal_esm_integration.json",
      "new_id": "89a5e848d27547c3fc0f496ceacd0da863984d4b",
      "new_mode": 33188,
      "new_path": "test/codesize/test_codesize_minimal_esm_integration.json"
    },
    {
      "type": "modify",
      "old_id": "ba5e2b42f91e20c777ff3d3e37d142d5445abbb1",
      "old_mode": 33188,
      "old_path": "test/codesize/test_no_closure_code_size.json",
      "new_id": "41f5c614673d55457d6901487efb716801e3e287",
      "new_mode": 33188,
      "new_path": "test/codesize/test_no_closure_code_size.json"
    },
    {
      "type": "modify",
      "old_id": "474b41c3aa6842a170c056b34f476b639785dca1",
      "old_mode": 33261,
      "old_path": "tools/acorn-optimizer.mjs",
      "new_id": "a5fd36d3ad623c0677d5c022d36e3e71868f9cf6",
      "new_mode": 33261,
      "new_path": "tools/acorn-optimizer.mjs"
    }
  ]
}
