| // This test ensures the TailCallInilnedCaller has the correct |
| // stack trace in the FTL inside a try block. |
| // This case arises when you have a situation like this: |
| // foo makes a call to bar, bar is inlined in foo. bar makes a call |
| // to baz and baz is inlined in bar. And then baz makes a tail-call to jaz, |
| // and jaz is inlined in baz. We want the callframe for jaz to appear to |
| throw new Error("bad value"); |
| function validate(stack) { |
| let arr = stack.split("\n"); |
| assert(arr[0].indexOf("jaz") !== -1); |
| assert(arr[1].indexOf("bar") !== -1); |
| assert(arr[2].indexOf("foo") !== -1); |
| for (var i = 0; i < 50000; i++) { |