aboutsummaryrefslogtreecommitdiff
path: root/src/windows_sdk.cpp
diff options
context:
space:
mode:
authorLuuk de Gram <luuk@degram.dev>2022-03-22 21:56:38 +0100
committerLuuk de Gram <luuk@degram.dev>2022-03-23 21:40:32 +0100
commita9a629f89a1d72130103bd59800e1257af84c97c (patch)
tree967ff5eac7b0a8cf355a1c4b525ffbbdc32b1626 /src/windows_sdk.cpp
parent49051c065120781b6ff78172c447b6307bd01e39 (diff)
downloadzig-a9a629f89a1d72130103bd59800e1257af84c97c.tar.gz
zig-a9a629f89a1d72130103bd59800e1257af84c97c.zip
wasm: Fix switching on errors
Error sets contain the entire global error set. Users are often switching on specific errors only present within that operand. This means that cases are almost always sparse and not contiguous. For this reason, we will instead emit the default case for error values not present in that specific operand error set. This is fine as those cases will never be hit, as prevented by the type system. By still allowing jump tables for those cases, rather than if-else chains, we save runtime cost as well as binary size.
Diffstat (limited to 'src/windows_sdk.cpp')
0 files changed, 0 insertions, 0 deletions