Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Cherry-pick 259548.261@safari-7615-branch (89f3375). https://bugs.web…
…kit.org/show_bug.cgi?id=252787 [JSC] Loaded argument can be conflict with newly defined argument in arguments elimination phase https://bugs.webkit.org/show_bug.cgi?id=252787 rdar://105671461 Reviewed by Mark Lam and Ryan Haddad. We now correctly analyze interference between eliminated arguments and newly created arguments. But this interference is analyzed based on the state *just before executing Node's effect". For example, LoadVarargs elimination can get stackslots and put stackslots. And these stackslots can interfere if stackslots are alive and not-interfered when LoadVarargs starts. @A: CreateDirectArguments (loc0, loc1, loc2) ... LoadVarargs @A, (loc2, loc3, loc4) Load @A content, and define loc2, loc3, loc4 stackslots. We check whether LoadVarargs itself is not interfering with the candidate's slots. This is because LoadVarargs can be lowered to the sequence of PutStacks and we may OSR exit in the middle of these PutStacks. So we would like to ensure that these PutStacks are not interfering with the candidate nodes. We need this check only for LoadVarargs since it is the only node which can be lowered to PutStacks in this phase. And let's run storeArgumentCountIncludingThis at last since this is not included in interference analysis since it is putting a constant. * JSTests/stress/loaded-argument-conflict-with-new-argument.js: Added. (foo): (bar): (baz): * Source/JavaScriptCore/dfg/DFGArgumentsEliminationPhase.cpp: Canonical link: https://commits.webkit.org/259548.261@safari-7615-branch
- Loading branch information