diff options
author | Ben Smith <binji@chromium.org> | 2020-03-23 18:54:14 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-23 18:54:14 -0700 |
commit | 7898e57f28c89565b99e894e764e058346e28fbe (patch) | |
tree | 91d72a1bcef76ecb83f3f550710bee8f9152b8ce /src/shared-validator.cc | |
parent | dc396c9d57d59c33c99f5f6c6c1b8f67de086dc8 (diff) | |
download | wabt-7898e57f28c89565b99e894e764e058346e28fbe.tar.gz wabt-7898e57f28c89565b99e894e764e058346e28fbe.tar.bz2 wabt-7898e57f28c89565b99e894e764e058346e28fbe.zip |
Parse ArrayTypes (#1364)
The following formats are supported:
* (type (array i32))
* (type (array (field i32)))
* (type (array (field (mut i32))))
This PR adds support for reading/writing binary and text, but no
interpreter support yet.
Diffstat (limited to 'src/shared-validator.cc')
-rw-r--r-- | src/shared-validator.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/shared-validator.cc b/src/shared-validator.cc index a82e3b9f..2a564772 100644 --- a/src/shared-validator.cc +++ b/src/shared-validator.cc @@ -68,6 +68,11 @@ Result SharedValidator::OnStructType(const Location&, return Result::Ok; } +Result SharedValidator::OnArrayType(const Location&, TypeMut field) { + array_types_.emplace(num_types_++, ArrayType{field}); + return Result::Ok; +} + Result SharedValidator::OnFunction(const Location& loc, Var sig_var) { Result result = Result::Ok; FuncType type; |