clone-statics.js (400B)
1 // |jit-test| skip-if: helperThreadCount() === 0 2 3 offThreadCompileToStencil(` 4 function foo(x, {}) { 5 do { 6 re = /erwe/; 7 if (x === 1) 8 re.x = 1; 9 else 10 re.x = "a"; 11 assertEq(re.x.length, (x === 1) ? undefined : 1); 12 } while (!inIon()); 13 } 14 15 foo(0, 0); 16 RegExp.multiline = 1; 17 foo(1, 0); 18 `); 19 20 var stencil = finishOffThreadStencil(); 21 evalStencil(stencil);