summaryrefslogtreecommitdiff
path: root/test/binaryen.js/stackir.js
diff options
context:
space:
mode:
authorAlon Zakai <azakai@google.com>2024-07-16 11:26:22 -0700
committerGitHub <noreply@github.com>2024-07-16 11:26:22 -0700
commitee43476328df55757614d3a7db4419426fd3d3e9 (patch)
tree46dd79656b09068c8ffe07efd5e1085564ef7a84 /test/binaryen.js/stackir.js
parentafef6d353c4283798b82e6cd4a6969fdfdc7cf7c (diff)
downloadbinaryen-ee43476328df55757614d3a7db4419426fd3d3e9.tar.gz
binaryen-ee43476328df55757614d3a7db4419426fd3d3e9.tar.bz2
binaryen-ee43476328df55757614d3a7db4419426fd3d3e9.zip
[NFC] Clarify and standardize order in flexibleCopy (#6749)
flexibleCopy always visited parents before children, but it visited vector children in reverse order: (call ;; 1 (call $a) ;; 3 (call $b) ;; 2 ) The order of children happened to not matter in any user of this code, and that's just what you get when you iterate over children in a vector and push them to a stack before visiting them, so this odd ordering was not noticed. For a new user I will introduce soon, however, it would be nice to have the normal pre-order: (call ;; 1 (call $a) ;; 2 (call $b) ;; 3 ) (2 & 3 swapped). This cannot be tested in the current code as it is NFC, but the later PR will depend on it and test it heavily.
Diffstat (limited to 'test/binaryen.js/stackir.js')
0 files changed, 0 insertions, 0 deletions