recover-autounsafe-2.js (533B)
1 // |jit-test| --fast-warmup; --ion-offthread-compile=off 2 3 function f() { 4 "use strict"; 5 6 // Recoverable instruction. Uses AutoUnsafeCallWithABI, so no pending 7 // exceptions are allowed. 8 const recoverable = Math.sqrt(4); 9 10 // Throws because |not_defined| isn't defined and we're in strict mode. 11 // The thrown exception attempts to close the iterator, which will then 12 // lead to recovering all instructions, including |Math.sqrt(4)|. 13 [not_defined] = "a"; 14 } 15 16 for (let i = 0; i < 50; i++) { 17 try { 18 f(); 19 } catch {} 20 }