diff options
Diffstat (limited to 'src/binary-reader-ir.cc')
-rw-r--r-- | src/binary-reader-ir.cc | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/binary-reader-ir.cc b/src/binary-reader-ir.cc index c480aa2d..813775c0 100644 --- a/src/binary-reader-ir.cc +++ b/src/binary-reader-ir.cc @@ -58,6 +58,7 @@ class BinaryReaderIR : public BinaryReaderNop { Index result_count, Type* result_types) override; Result OnStructType(Index index, Index field_count, TypeMut* fields) override; + Result OnArrayType(Index index, TypeMut field) override; Result OnImportCount(Index count) override; Result OnImportFunc(Index import_index, @@ -421,6 +422,16 @@ Result BinaryReaderIR::OnStructType(Index index, return Result::Ok; } +Result BinaryReaderIR::OnArrayType(Index index, TypeMut type_mut) { + auto field = MakeUnique<TypeModuleField>(GetLocation()); + auto array_type = MakeUnique<ArrayType>(); + array_type->field.type = type_mut.type; + array_type->field.mutable_ = type_mut.mutable_; + field->type = std::move(array_type); + module_->AppendField(std::move(field)); + return Result::Ok; +} + Result BinaryReaderIR::OnImportCount(Index count) { WABT_TRY module_->imports.reserve(count); |