Created attachment 590924 [details] Test case. IonBuilder::jsop_this() fails compilation if thisParam is not of type Object, but in the case of OSR, the parameter is a Value-typed MPhi. This hurts us on several benchmarks, notably access-nbody.
Created attachment 592355 [details] [diff] [review] fix The problem is that we don't type phis until type analysis - more evidence that, even when it's safe, we shouldn't rely on MIR types during building. This is a quick fix that I think is correct: just query the initial type from TI. (This brings our kraken-ai-astar score from 14000ms to 263, close to crankshaft - more work needed to get to -m -n speed.)