$ ./js -n -m test.js
test.js:5: Error: Assertion failed: got (void 0), expected 0
Created attachment 527379 [details]
The problem here looks like when we enter from the interpreter, we don't fix up the type tags of variables which have a known type, and we then forget the constant type of 'j' after the 'try' so the resulting torn value passed to assertEq looks like an undefined.
This is fixed by the SSA patch, arriving shortly --- it removes the invariant we have that expects known type tags of locals to always be in sync (this invariant doesn't make much sense for SSA, as we can track different types for locals in different regions of the script). Instead, we avoid stores of type tags for locals/args when we know their type is being preserved by a write, and issue the store when the var may be initially written. (This could introduce extra memory traffic in nested loops or in branchy loops with vars that are not live around the backedge, but doesn't seem to affect benchmarks. Could be fixed by not requiring vars with known type to have that type synced at join points).
Fixed by rev 90a7b141e0cf.