Making a WebAssembly interpreter in Ruby, part 23

preview_player
Показать описание

00:00:00 — Assign `generated_type` before it’s needed in #parse_function
01:13:48 — Inline `typedefs_context` local variable in #parse_function
01:15:18 — Parse typeuse lookup into #parse_typeuse
01:30:22 — Add #unzip_pairs helper for safely unzipping an array of pairs
01:49:36 — Use #unzip_pairs when calling #parse_locals and #parse_parameters
01:50:32 — Use type definitions from updated context instead of reconstructing them
02:19:49 — Remove unused `generated_types` and `types` from #parse_text_fields
02:23:30 — Remove unused `generated_type` return value from #parse_function
02:24:44 — Remove unused `generated_type` return value from #parse_typeuse
02:28:03 — Check for generated type in existing typedefs before adding it
02:35:35 — Add `context` as parser state, and #with_context to manage it
03:04:04 — Update AST parsing functions to use context from parser state
03:07:09 — Replace `results` with `type` on structured instructions
03:27:05 — Extract #parse_blocktype helper
04:12:37 — Parse block type with #parse_typeuse instead of #parse_results
04:13:22 — Don’t discard new typedefs generated by parsing function body
05:02:01 — Replace `type` with `type_index` in Block, Loop and If
05:05:45 — Extract #expand_blocktype helper
05:30:47 — Support the blocktype special case of an empty or single result type
05:32:49 — Replace `type_index` with `type` again in Block, Loop and If
05:37:29 — Return updated typedefs from #with_context instead of assigning to nil local
05:47:06 — Pass complete function type, not just result arity, into #with_branch_handler
06:03:20 — Correctly account for block parameter arity in branch handler
06:12:07 — Wrapping up
Рекомендации по теме
join shbcf.ru