webassembly
play

WebAssembly neither Web nor Assembly, but Revolutionary Jay Phelps | - PowerPoint PPT Presentation

WebAssembly neither Web nor Assembly, but Revolutionary Jay Phelps | @_jayphelps The WebAssembly revolution has begun Jay Phelps | @_jayphelps Jay Phelps Chief Software Architect | previously @_jayphelps Support, Dev Rel, Staff Augmentation,


  1. (func $factorial (param $n i32) (result i32) get_local $n i32.const 0 i32.eq if $if0 i32.const 1 return end $if0 get_local $n i32.const 1 i32.sub call $factorial get_local $n i32.mul ) Jay Phelps | @_jayphelps

  2. Let's learn the fundamentals Jay Phelps | @_jayphelps

  3. WebAssembly is a stack machine Jay Phelps | @_jayphelps

  4. ...what's a stack machine? Jay Phelps | @_jayphelps

  5. Stack a data structure with two operations: push and pop Jay Phelps | @_jayphelps

  6. stack machine: instructions on a stack Jay Phelps | @_jayphelps

  7. Why a stack machine? instead of AST, SSA, or register machine Jay Phelps | @_jayphelps

  8. Smaller binary encoding, easier and faster single pass verification and VM implementation Jay Phelps | @_jayphelps

  9. 1 + 2

  10. opcode mnemonics i32.add 0x6a 01101010

  11. i32.const 1 i32.const 2 i32.add

  12. i32.const 1 i32.const 2 i32.add stack

  13. i32.const 1 i32.const 1 1 i32.const 2 i32.add stack

  14. i32.const 1 i32.const 1 i32.const 2 i32.add 1 stack

  15. i32.const 1 i32.const 2 i32.const 2 2 i32.add 1 stack

  16. i32.const 1 i32.const 2 i32.const 2 i32.add 2 1 stack

  17. i32.const 1 i32.const 2 i32.add i32.add 2 1 stack

Recommend


More recommend