Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Recap Modern WebAssembly in CDS 2019

Jimmy Moon
November 23, 2019

Recap Modern WebAssembly in CDS 2019

Recap Modern WebAssembly in CDS 2019

Jimmy Moon

November 23, 2019
Tweet

More Decks by Jimmy Moon

Other Decks in Programming

Transcript

  1. https://blog.logrocket.com/webassembly-how-and-why-559b7f96cd71 WebAssembly? - ਢীࢲ ز੘ೞח ࢜۽਍ ঱য - ׮ܲ ঱য۽

    ࠗఠ ஹ౵ੌ - ୭੸ച غҊ ੌҙࢿ ੓ח ࢿמ - ੗߄झ௼݀౟ܳ ؀୓ ೞ૑ ঋ਺
  2. https://blog.logrocket.com/webassembly-how-and-why-559b7f96cd71 WebAssembly? - ਢীࢲ ز੘ೞח ࢜۽਍ ঱য - ׮ܲ ঱য۽

    ࠗఠ ஹ౵ੌ - ୭੸ച غҊ ੌҙࢿ ੓ח ࢿמ - ੗߄झ௼݀౟ܳ ؀୓ ೞ૑ ঋ਺
  3. WebAssembly Instructions Stack 0 0 (I32, i32) -> (i32) 1

    (I64, i64) -> () 0 Type 0 1 Type 1 0 Code for Func 0 1 Code for Func 1 1 3 4 5 6 8 0 1 2 3 4 $type0 Memory Type Function Code $func0 i32.store
 i32.load 2 7 ArrayBuffer i32.add
 get_local $p1
 get_local $p1 pop push
  4. Value Types i32, i64, f32, f64 Linear Memory Access ii32.load,

    i64.load, f32.load, f64.load, i64.store, f32.store, f64.store, and more Local, Global Variable get_local, set_local, tee_local, get_global, set_global Control constructs and instructions nop, block, loop, if, else, br, br_if, br_table, return, end Calls call, call_indirect Constants i32.const, i64.const, f32.const, f64.const, Operators i32.add, i32.sub, i32.mul, f32.add, f32.sub, f32.mul, f32.div, f32.abs, f64.add, f64.sub, and more
  5. https://blog.logrocket.com/webassembly-how-and-why-559b7f96cd71 WebAssembly? - ਢীࢲ ز੘ೞח ࢜۽਍ ঱য - ׮ܲ ঱য۽

    ࠗఠ ஹ౵ੌ - ୭੸ച غҊ ੌҙࢿ ੓ח ࢿמ - ੗߄झ௼݀౟ܳ ؀୓ ೞ૑ ঋ਺
  6. Javascript
 Source Code Ignition
 (JS Interpreter) TurboFan
 (Optimization Compiler) Deoptimize

    Optimize
 (Profile Data) Bytecode Optimized
 Code Collecting
 Information Profiling Data Javascript Pipeline
  7. Liftoff
 (WebAssembly baseline compiler) Hot Swap Execution
 Immediately WASM TurboFan


    (Optimization Compiler) Off-thread
 Optimization WebAssembly Pipeline
  8. WebAssembly? - ਢীࢲ ز੘ೞח ࢜۽਍ ঱য - ׮ܲ ঱য۽ ࠗఠ

    ஹ౵ੌ - ୭੸ച غҊ ੌҙࢿ ੓ח ࢿמ - ੗߄झ௼݀౟ܳ ؀୓ ೞ૑ ঋ਺
  9. Implicit Caching Liftoff
 (WebAssembly baseline compiler) Hot Swap Execution
 Immediately

    WASM TurboFan
 (Optimization Compiler) Off-thread
 Optimization https://www.youtube.com/watch?v=kZrl91SPSpc
  10. Implicit Caching Liftoff
 (WebAssembly baseline compiler) Hot Swap Execution
 Immediately

    WASM TurboFan
 (Optimization Compiler) Off-thread
 Optimization HTTP Cache Loads Optimized Module https://www.youtube.com/watch?v=kZrl91SPSpc New Session
  11. SharedArrayBuffer Threads Worker
 CPU Core WASM Instance Worker
 CPU Core

    WASM Instance Worker
 CPU Core WASM Instance https://www.youtube.com/watch?v=kZrl91SPSpc atomic.wait atomic.notify
  12. Tooling Updates - Native LLVM + WASM (clang +Binaryen) -

    Asyncify, Using asynchronous APIs - Debugging, WAT format, Source map, Native debugging
  13. Tooling Updates - Native LLVM + WASM (clang +Binaryen) -

    Asyncify, Using asynchronous APIs - Debugging, WAT format, Source map, Native debugging
  14. Tooling Updates - Native LLVM + WASM (clang +Binaryen) -

    Asyncify, Using asynchronous APIs - Debugging, WAT format, Source map, Native debugging