| Summary: | Implement JSC watchdog support for tail calls | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Mark Lam <mark.lam> |
| Component: | JavaScriptCore | Assignee: | Mark Lam <mark.lam> |
| Status: | RESOLVED DUPLICATE | ||
| Severity: | Normal | CC: | benjamin, fpizlo, ggaren, keith_miller, mmirman, msaboff, saam |
| Priority: | P2 | ||
| Version: | 528+ (Nightly build) | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
|
Description
Mark Lam
2015-08-13 16:07:47 PDT
I plan to implement this by having the watchdog timer simulate a stack overflow, and teaching the existing stack check slow path code in function prologues to discern between a stack overflow and a watchdog timer check request. Unlike with stack overflows, the stack check slow path can return without throwing an exception. This is because the watchdog timer firing only means that we need to check the watchdog's deadlines. It doesn't necessarily mean that the watchdog fired. We will only throw the TerminatedExecutionException if the watchdog deadlines have been reached. Hence, I'll also have to teach the function prologues to not expect that the stack check slow path will throw unconditionally. I spoke with Geoff offline. Per our discussion, we won't overload the stack check. Instead, will add a watchdog check to the tail call opcode. The DFG and FTL can optimize these away if appropriate. *** This bug has been marked as a duplicate of bug 151972 *** |