This is an archive of the discontinued LLVM Phabricator instance.

[WebAssembly] Rename wasm_rethrow_in_catch intrinsic/builtin
ClosedPublic

Authored by aheejin on Jan 4 2021, 3:37 PM.

Details

Summary

wasm_rethrow_in_catch intrinsic and builtin are used in order to
rethrow an exception when the exception is caught but there is no
matching clause within the current catch. For example,

try {
  foo();
} catch (int n) {
  ...
}

If the caught exception does not correspond to C++ int type, it should
be rethrown. These intrinsic/builtin were renamed rethrow_in_catch
because at the time I thought there would be another intrinsic for C++'s
throw keyword, which rethrows an exception. It turned out that throw
keyword doesn't require wasm's rethrow instruction, so we rename
rethrow_in_catch to just rethrow here.

Diff Detail

Event Timeline

aheejin created this revision.Jan 4 2021, 3:37 PM
aheejin requested review of this revision.Jan 4 2021, 3:37 PM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptJan 4 2021, 3:37 PM
tlively accepted this revision.Jan 5 2021, 10:25 AM
tlively added inline comments.
llvm/include/llvm/IR/IntrinsicsWebAssembly.td
53

Extra word

This revision is now accepted and ready to land.Jan 5 2021, 10:25 AM
dschuff accepted this revision.Jan 6 2021, 2:16 PM
aheejin marked an inline comment as done.Jan 8 2021, 5:58 AM
aheejin updated this revision to Diff 315366.Jan 8 2021, 5:58 AM

Remove an extra word