stencil-asmjs.js (659B)
1 // |jit-test| skip-if: isLcovEnabled() 2 3 let source = ` 4 var m = function() { 5 "use asm" 6 function g(){} 7 return g; 8 } 9 10 function check() { 11 var objM = new m; 12 var g = m(); 13 // g is a ctor returning an primitive value, thus an empty object 14 assertEq(Object.getOwnPropertyNames(new g).length, 0); 15 } 16 17 check() 18 `; 19 20 // Check that on-demand delazification and concurrent delazification are not 21 // attempting to parse "use asm" functions. 22 const options = { 23 fileName: "tests/asm.js/testBug999790.js", 24 lineNumber: 1, 25 eagerDelazificationStrategy: "CheckConcurrentWithOnDemand", 26 newContext: true, 27 }; 28 evaluate(source, options);