js/src/jit-test/tests/warp/bug1761947.js
0 → 100644
+28
−0
+4
−0
+1
−0
+21
−32
Loading
`EmulateStateOf<T>::run` uses `MNodeIterator` to iterate over the instructions in a block. `MNodeIterator` has some internal cleverness to visit the resume point attached to an instruction, unless that instruction has been discarded. In `visitApplyArray`, we steal the resume point from the applyArray, attach it to a new call, and discard the applyArray. Because the applyArray was discarded, MNodeIterator skips the resume point. We don't update the list of stores, so the recovery code allocates an empty array instead of an initialized array, causing us to get the wrong answer if we invalidate due to GC inside the replaced spread call. This patch changes MNodeIterator to store the resume point instead of the instruction, which simplifies the code somewhat and seems more robust. Differential Revision: https://phabricator.services.mozilla.com/D142579