summaryrefslogtreecommitdiff
path: root/src/shell-interface.h
diff options
context:
space:
mode:
authorAlon Zakai <azakai@google.com>2022-05-13 16:39:08 -0700
committerGitHub <noreply@github.com>2022-05-13 16:39:08 -0700
commit4edfcc9f8cfc6a340411b791e7d7889b836dc772 (patch)
tree69d1fb3722ae03747decb612aaa49ff512ec50a2 /src/shell-interface.h
parente4b3370c755125cc717cf7c017eada8109cda7f1 (diff)
downloadbinaryen-4edfcc9f8cfc6a340411b791e7d7889b836dc772.tar.gz
binaryen-4edfcc9f8cfc6a340411b791e7d7889b836dc772.tar.bz2
binaryen-4edfcc9f8cfc6a340411b791e7d7889b836dc772.zip
Ensure symmetric results in PossibleConstantValues (#4662)
Previously we could return different results depending on the order we noted things: note(anyref.null); note(funcref.null); get() => anyref.null note(funcref.null); note(anyref.null); get() => funcref.null This is correct, as nulls are equal anyhow, and any could be used in the location we are optimizing. However, it can lead to nondeterminism if the caller's order of notes is nondeterministic. That is the case in DeadArgumentElimination, where we scan functions in parallel, then merge them without special ordering. To fix this, make the note operation symmetric. That seems simplest and least likely to be confusing. We can use the LUB to do that. To avoid duplicating the null logic, refactor note() to use combine().
Diffstat (limited to 'src/shell-interface.h')
0 files changed, 0 insertions, 0 deletions