Making a WebAssembly interpreter in Ruby, part 31

Опубликовано: 17 Апрель 2026
на канале: Tom Stuart
87
5

00:00:00 — Support `externref` in table type
00:21:32 — Support parsing the `table.get` instruction
00:31:59 — Support parsing the `table.set` instruction
00:33:13 — Read import type into a local variable when parsing imports
00:43:57 — Consolidate reading of optional index when parsing imports
00:45:01 — Add minimum and maximum size to tables
01:16:28 — Introduce runtime representation of tables
01:44:55 — Evaluate inline element expressions during module instantiation
02:09:49 — Add function index to `ref.func` AST node
02:12:49 — Implement the `ref.func` instruction
02:17:29 — Store function indices as `ref.func` expressions in inline element segments
02:23:14 — Stop distinguishing between indexes and expressions in #initialise_tables
02:25:47 — Rename #parse_elements to #parse_table_element
02:39:33 — Try to parse element segments when building Module AST node
02:52:41 — Copy active element segments into table during module instantiation
03:03:56 — Make element segment offset optional
03:20:52 — Read element segment reftype if present
03:22:09 — Use element segment reftype to decide how to parse element expressions
03:23:50 — Read optional element ID in #parse_element
03:29:16 — Read optional table index in #parse_element
03:35:14 — Force #parse_element to read offset if table use is present
03:38:04 — Only allow implicit `func` if the table use is omitted
03:40:27 — Reformat INDEX_REGEXP regular expression
03:46:37 — Allow underscores in decimal index literals
03:49:21 — Add support for hexadecimal index literals
03:53:07 — Ignore `declare` keyword in element segments for now
03:55:46 — Only try to copy active element segments into tables
03:59:49 — Include imported tables when instantiating a module
04:09:16 — Add `table` export to `spectest` module
04:09:24 — Store module exports separately from modules
04:20:02 — Implement the `register` command
04:30:05 — Store exported names on Table AST nodes
04:52:35 — Make Table a Data, not a Struct
04:54:40 — Copy the Table AST node’s exported names onto its runtime representation
04:56:07 — Use exported table names when building module exports
04:57:05 — Use Function instances, not function indexes, as function references
05:06:37 — Implement the `table.get` and `table.set` instructions
05:15:49 — Store actual host reference value in `ref.extern` result
05:23:19 — Wrapping up