Bug 82312

Summary: DFG OSR exit should not generate an exit for variables of inlinees if the inlinees are not in scope
Product: WebKit Reporter: Filip Pizlo <fpizlo>
Component: JavaScriptCoreAssignee: Filip Pizlo <fpizlo>
Status: RESOLVED FIXED    
Severity: Normal CC: barraclough, eric, fpizlo, ggaren, oliver
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
the patch oliver: review+

Filip Pizlo
Reported 2012-03-27 02:13:08 PDT
Currently DFG OSR exit computes a value recovery, and generates recovery code, for every variable within the DFG code block's Graph::m_localVars, which ends up being the high watermark of the stack for all inlinees. This means that for example in this code: function foo(a, b) { return a + b; } function bar(a, b, c) { var x = foo(a, b); return x + c.f; } If we OSR exit at c.f, then the exit will include code to restore local variables within foo(), which is clearly redundant since foo() is out of scope at that point. Patch forthcoming.
Attachments
the patch (3.58 KB, patch)
2012-03-27 02:18 PDT, Filip Pizlo
oliver: review+
Filip Pizlo
Comment 1 2012-03-27 02:18:16 PDT
Created attachment 134007 [details] the patch
Eric Seidel (no email)
Comment 2 2012-03-27 12:36:40 PDT
Attachment 134007 [details] was posted by a committer and has review+, assigning to Filip Pizlo for commit.
Filip Pizlo
Comment 3 2012-03-27 14:55:01 PDT
Note You need to log in before you can comment on or make changes to this bug.