)]}'
{
  "commit": "897adcbed84ccf2000222f438fcf40884492eafe",
  "tree": "04cd63d7be60989afb786637f3f1cb3fcd9cb487",
  "parents": [
    "0c9067ac2aeaa2338d92a6614fdf4f61782e9073"
  ],
  "author": {
    "name": "Thomas Lively",
    "email": "tlively@google.com",
    "time": "Wed Nov 11 21:07:33 2026"
  },
  "committer": {
    "name": "GitHub",
    "email": "noreply@github.com",
    "time": "Wed Nov 11 21:07:33 2026"
  },
  "message": "[Heap2Local] Handle array init uses in Array2Struct (#9381)\n\nPreviously, `Array2Struct` constructed `structNew` and\n`arrayNewReplacement` in its constructor before walking the function\nbody. This captured the allocation\u0027s `init` or `values` children prior\nto the post-order walk. However, when an `array.new` or\n`array.new_fixed` inside an unreachable loop read from itself (via the\nloop backedge) inside its own initializer operands, `Array2Struct`\nreplaced those inner uses during the walk while `arrayNewReplacement`\nretained stale pointers to the unreplaced `array.get` expressions. Fix\nthis by constructing `structNew` and `arrayNewReplacement` inside\n`visitArrayNew` and `visitArrayNewFixed` after child operands have been\nvisited.\n\nAlso keep `structNew-\u003etype` as the concrete struct reference type even\nwhen an operand becomes `unreachable`, and defer `ReFinalize` until the\nend of `Struct2Local` so unreachability inside an operand does not\npropagate to `structNew-\u003etype` before `Struct2Local` runs. `StructNew`\ndoes not store its heap type separately from `type`, so `Struct2Local`\ndepends on `structNew-\u003etype` remaining a concrete struct reference to\nlook up the struct\u0027s fields when allocating locals and to construct the\nreplacement `ref.null`.",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "215c4e5f6012c145bedd9b23fdc600cb78fed639",
      "old_mode": 33188,
      "old_path": "src/passes/Heap2Local.cpp",
      "new_id": "f3aba6a6da1c436cc63656c17fd5edc6d373214b",
      "new_mode": 33188,
      "new_path": "src/passes/Heap2Local.cpp"
    },
    {
      "type": "modify",
      "old_id": "63d1422a4842925d4f00ad31290f349349cb45cb",
      "old_mode": 33188,
      "old_path": "test/lit/passes/heap2local.wast",
      "new_id": "02e183a776e54f422e6fa524dfaa2429c6c27870",
      "new_mode": 33188,
      "new_path": "test/lit/passes/heap2local.wast"
    }
  ]
}
