OSDN Git Service

[WebAssembly] Add asm.js-style exception handling support
authorDerek Schuff <dschuff@google.com>
Mon, 1 Aug 2016 21:34:04 +0000 (21:34 +0000)
committerDerek Schuff <dschuff@google.com>
Mon, 1 Aug 2016 21:34:04 +0000 (21:34 +0000)
commit6b6b112dba97510091b6af7a5e9cfbb666ebb1c2
treea57e5d9f5896ad11176be6589b2f22cdf38d396b
parent95c3ece2ff3ba67128b34d748d1a8eb39b11a6a3
[WebAssembly] Add asm.js-style exception handling support

Summary: This patch includes asm.js-style exception handling support for
WebAssembly. The WebAssembly MVP does not have any support for
unwinding or non-local control flow. In order to support C++ exceptions,
emscripten currently uses JavaScript exceptions along with some support
code (written in JavaScript) that is bundled by emscripten with the
generated code.
This scheme lowers exception-related instructions for wasm such that
wasm modules can be compatible with emscripten's existing scheme and
share the support code.

Patch by Heejin Ahn

Differential Revision: https://reviews.llvm.org/D22958

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277391 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/WebAssembly/CMakeLists.txt
lib/Target/WebAssembly/WebAssembly.h
lib/Target/WebAssembly/WebAssemblyLowerEmscriptenExceptions.cpp [new file with mode: 0644]
lib/Target/WebAssembly/WebAssemblyTargetMachine.cpp
test/CodeGen/WebAssembly/lower-em-exceptions.ll [new file with mode: 0644]