Making a WebAssembly interpreter in Ruby, part 15: expression abstract syntax

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

00:00:00 — Waiting to start
00:00:53 — Hello
00:02:06 — Retro
00:06:37 — Rename #interpret to #interpret_script
00:14:10 — Fix spacing in alternative pattern
00:27:52 — Rename `NUMERIC_OPERATION_REGEXP` to `NUMERIC_INSTRUCTION_REGEXP`
00:29:16 — Make `NUMERIC_INSTRUCTION_REGEXP` match mandatory in #evaluate_numeric_instruction
00:32:17 — Deal with nilable array elements more neatly in #unfold
00:37:57 — Always return a sequence of instructions from #unfold
00:51:29 — Add `terminated_by:` parameter to #consume_structured_instruction
01:03:11 — Exclude leading and terminating atoms from #consume_structured_instruction
01:39:18 — Handle structured instruction label and type before consuming its body
01:44:47 — Push #consume_structured_instruction call into each `block`/`loop`/`if` case
01:46:56 — Consume `consequent` and `alternative` directly for `if`
01:50:00 — Delete unused #split_on_else method
01:51:09 — Evaluate all arguments together in #invoke_function
02:05:19 — Create dummy ASTParser and hook it up to the interpreter
02:11:42 — Move the contents of Interpreter#unfold into ASTParser
02:14:01 — Remove unused Interpreter#unfold
02:16:15 — Make `NUMERIC_INSTRUCTION_REGEXP` check just another case
02:28:25 — Iterate over S-expression in #parse_expression to build result
02:50:35 — Introduce an AST module and include it in Interpreter and ASTParser
02:52:32 — Parse `return` instruction
03:21:30 — Parse `br_if` instruction
03:35:22 — Parse `select` instruction
03:36:42 — Parse `nop` instruction
03:37:10 — Parse `call` instruction
03:41:49 — Parse `drop` instruction
03:47:46 — Parse `block`, `loop` and `if` instructions
04:10:13 — Parse `const` instruction
04:38:48 — Parse `const` argument in the AST parser, not the interpreter
04:45:47 — Parse `load` instruction
04:53:46 — Parse `store` instruction
04:58:13 — Parse all other numeric instructions
05:07:44 — Pass instruction into #evaluate_{integer,float}_instruction methods
05:09:22 — Split NumericOp into UnaryOp and BinaryOp
05:28:24 — Replace #evaluate `while` loop with `each`
05:30:50 — Extract #evaluate_instruction
05:33:32 — Wrapping up
05:39:04 — Bye
Рекомендации по теме
join shbcf.ru