aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDerek Schuff <dschuff@chromium.org>2015-11-06 13:34:57 -0800
committerDerek Schuff <dschuff@chromium.org>2015-11-06 13:34:57 -0800
commit9f4f1300d48b93ba43ca2c228f8e55b271f0fddf (patch)
tree38fa477f51557766cbd8cd972f1061412d5de09c
parentec4d60ee891444d7dcf6766af827d425f3358f03 (diff)
parented646c9c0914adb64149b0b71e5d91f995696a22 (diff)
downloadnanowasm-design-9f4f1300d48b93ba43ca2c228f8e55b271f0fddf.tar.gz
Merge pull request #454 from WebAssembly/unreachable
Add unconditional unreachable instruction
-rw-r--r--AstSemantics.md10
1 files changed, 10 insertions, 0 deletions
diff --git a/AstSemantics.md b/AstSemantics.md
index d1a0779..9aebc25 100644
--- a/AstSemantics.md
+++ b/AstSemantics.md
@@ -540,3 +540,13 @@ returning the same value for the same string over the lifetime of a single
instance and other related (as defined by the host environment) instances.
See also [feature testing](FeatureTest.md) and
[better feature testing](FutureFeatures.md#better-feature-testing-support).
+
+## Unreachable
+
+ * `unreachable`: An expression which can take on any type, and which, if
+ executed, always traps. It is intended to be used for example after
+ calls to functions which are known by the producer not to return (otherwise
+ the producer would have to create another expression with an unused value
+ to satisfy the type check). This trap is intended to be impossible for user
+ code to catch or handle, even in the future when it may be possible to
+ handle some other kinds of traps or exceptions.