| //@ if isFTLEnabled then runFTLNoCJIT else skip end |
| let ftlTrue = $vm.ftlTrue; |
| let didFTLCompile = false; |
| return (i & 1) ? new String("foo") : "foo"; |
| function stringOrStringObjectToString(i) { |
| didFTLCompile = ftlTrue(); |
| throw new Error(`Failed on iteration ${i}\n${JSON.stringify(c)}`); |
| noInline(stringOrStringObjectToString); |
| for (; i < maxTries && !numberOfDFGCompiles(stringOrStringObjectToString) && !didFTLCompile; ++i) { |
| optimizeNextInvocation(stringOrStringObjectToString); |
| stringOrStringObjectToString(i); |
| throw new Error("Failed to compile stringOrStringObjectToString with DFG JIT"); |