GC Proposal

This tests that types, objects, and instructions added in the GC proposal are properly supported and available for inspection in DevTools when paused at a breakpoint.

Steps

  1. Start Chrome with --js-flags="--experimental-wasm-gc"
  2. Open DevTools
  3. In the "Sources" panel, navigate to "wasm" > "a8036016"
  4. Locate the Wasm function $main and set a breakpoint on the local.set $varB line at the end
  5. Reload the page
  6. Execution should stop at the new breakpoint
  7. Now look at the Scope in the DevTools and make sure that it shows relevant information in an easily accessible fashion: a struct with inspectable fields in $varA, an uninitialized $varB, and an array on the value stack.
  8. Observe that the struct in $varA via its $pointer field refers to another struct of type $StrB, which in turn refers to the original struct.
  9. Now type $varA.value into the Console for another way to get at the struct object.