| 768 | } |
| 769 | |
| 770 | Result BinaryReaderInterp::BeginElemSegment(Index index, |
| 771 | Index table_index, |
| 772 | uint8_t flags) { |
| 773 | auto mode = ToSegmentMode(flags); |
| 774 | CHECK_RESULT(validator_.OnElemSegment(GetLocation(), |
| 775 | Var(table_index, GetLocation()), mode)); |
| 776 | |
| 777 | ValueType offset_type = ValueType::I32; |
| 778 | if (table_index < table_types_.size() && |
| 779 | table_types_[table_index].limits.is_64) { |
| 780 | offset_type = ValueType::I64; |
| 781 | } |
| 782 | FuncDesc init_func{ |
| 783 | FuncType{{}, {offset_type}}, {}, Istream::kInvalidOffset, {}}; |
| 784 | ElemDesc desc{{}, ValueType::Void, mode, table_index, init_func}; |
| 785 | module_.elems.push_back(desc); |
| 786 | return Result::Ok; |
| 787 | } |
| 788 | |
| 789 | Result BinaryReaderInterp::BeginElemSegmentInitExpr(Index index) { |
| 790 | ElemDesc& elem = module_.elems.back(); |
nothing calls this directly
no test coverage detected