lazyparse.js (698B)
1 function outer() { 2 var xyz = 0; 3 function foo() { 4 function bar() { xyz++; } 5 bar(); 6 let x = 3; 7 } 8 foo(); 9 assertEq(xyz, 1); 10 } 11 outer(); 12 13 function mapfloor(a) { 14 var b = a.map(function(v) { 15 "use strict"; 16 try { 17 eval("delete String;"); 18 } catch (e) { 19 return e instanceof res; 20 } 21 }); 22 var res = ""; 23 } 24 try { 25 mapfloor([1,2]); 26 } catch (e) {} 27 28 test(); 29 function test() { 30 try { 31 eval('let(z) { with({}) let y = 3; }'); 32 } catch(ex) { 33 (function(x) { return !(x) })(0/0) 34 } 35 } 36 37 testCatch(15); 38 function testCatch(y) { 39 try { 40 throw 5; 41 } catch(ex) { 42 (function(x) { assertEq(x + y + ex, 25); })(5) 43 } 44 }