mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-03 13:02:09 +02:00
LibWasm: Parse struct types and support multiple types in type section
This patch adds support for parsing structs in the type section. It also removes the assumption that all types in the type section are function types, adding appropriate validation. Spec tests struct.3 and struct.4 have been disable as this would require expanding `ValueType` to include more heap-types.
This commit is contained in:
committed by
Ali Mohammad Pur
parent
b5b3e37fac
commit
bfa51c2555
Notes:
github-actions[bot]
2026-02-06 10:35:53 +00:00
Author: https://github.com/mkanilsson Commit: https://github.com/LadybirdBrowser/ladybird/commit/bfa51c2555a Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/7731 Reviewed-by: https://github.com/alimpfard
@@ -320,7 +320,7 @@ private:
|
||||
class ModuleInstance {
|
||||
public:
|
||||
explicit ModuleInstance(
|
||||
Vector<FunctionType> types, Vector<FunctionAddress> function_addresses, Vector<TableAddress> table_addresses, Vector<MemoryAddress> memory_addresses, Vector<GlobalAddress> global_addresses, Vector<DataAddress> data_addresses, Vector<TagAddress> tag_addresses, Vector<TagType> tag_types, Vector<ExportInstance> exports, size_t minimum_call_record_allocation_size)
|
||||
Vector<TypeSection::Type> types, Vector<FunctionAddress> function_addresses, Vector<TableAddress> table_addresses, Vector<MemoryAddress> memory_addresses, Vector<GlobalAddress> global_addresses, Vector<DataAddress> data_addresses, Vector<TagAddress> tag_addresses, Vector<TagType> tag_types, Vector<ExportInstance> exports, size_t minimum_call_record_allocation_size)
|
||||
: cached_minimum_call_record_allocation_size(minimum_call_record_allocation_size)
|
||||
, m_types(move(types))
|
||||
, m_tag_types(move(tag_types))
|
||||
@@ -361,7 +361,7 @@ public:
|
||||
size_t cached_minimum_call_record_allocation_size { 0 };
|
||||
|
||||
private:
|
||||
Vector<FunctionType> m_types;
|
||||
Vector<TypeSection::Type> m_types;
|
||||
Vector<TagType> m_tag_types;
|
||||
Vector<FunctionAddress> m_functions;
|
||||
Vector<TableAddress> m_tables;
|
||||
|
||||
Reference in New Issue
Block a user