diff options
author | Ben Smith <binji@chromium.org> | 2020-04-14 08:47:42 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-14 08:47:42 -0700 |
commit | 10a9b0563efea0ab00abf6846c0ebcb53f492404 (patch) | |
tree | 7f328712e00ca50e7b7a90483e34d2803e29b811 /src/wast-parser.cc | |
parent | 343d24bf620594c985065d193bde2c3fc282a53e (diff) | |
download | wabt-10a9b0563efea0ab00abf6846c0ebcb53f492404.tar.gz wabt-10a9b0563efea0ab00abf6846c0ebcb53f492404.tar.bz2 wabt-10a9b0563efea0ab00abf6846c0ebcb53f492404.zip |
Add exnref value type to parser (#1389)
The exnref type was already supported in the type checker, and other
parts of the code, but there was no way to name the type in the text
format.
This PR also fixes makes binary-reader.cc check for just the
exceptions_enabled flag to enable exnref. The exception-handling
proposal depends on the reference types proposal, but that is now
handled at a higher level, in the `UpdateDependencies` function.
Fixes issue #1388.
Diffstat (limited to 'src/wast-parser.cc')
-rw-r--r-- | src/wast-parser.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/wast-parser.cc b/src/wast-parser.cc index 268a38d8..c4e64086 100644 --- a/src/wast-parser.cc +++ b/src/wast-parser.cc @@ -780,9 +780,11 @@ Result WastParser::ParseValueType(Type* out_type) { case Type::Anyref: case Type::Funcref: case Type::Hostref: - case Type::Exnref: is_enabled = options_->features.reference_types_enabled(); break; + case Type::Exnref: + is_enabled = options_->features.exceptions_enabled(); + break; default: is_enabled = true; break; |