Bug 68735

Summary: DFG implementation of PutScopedVar corrupts register allocation
Product: WebKit Reporter: Filip Pizlo <fpizlo>
Component: JavaScriptCoreAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: barraclough, fpizlo, oliver
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
the patch oliver: review+, oliver: commit-queue+

Description Filip Pizlo 2011-09-23 14:54:08 PDT
The PutScopedVar case in DFGSpeculativeJIT.cpp does not call noResult(), causing its child (the scope chain) to remain referenced.  It then does not get removed from the register bank, and its virtual register does not get cleared.  This has two effects: bizarre assertion failures and possibly regressed performance in the absence of assertion failures, due to increased register pressure.
Comment 1 Filip Pizlo 2011-09-23 14:55:43 PDT
Created attachment 108543 [details]
the patch
Comment 2 Oliver Hunt 2011-09-23 14:56:50 PDT
Comment on attachment 108543 [details]
the patch

oooh, i didn't realise that was necessary/existed -- best to check my other changes for similar screw ups :-(
Comment 3 Filip Pizlo 2011-09-23 14:57:56 PDT
(In reply to comment #2)
> (From update of attachment 108543 [details])
> oooh, i didn't realise that was necessary/existed -- best to check my other changes for similar screw ups :-(

GetScopeChain and GetScopeVar are right, because they call the relevant xyzResult methods.  It's the ones that don't return anything that are annoying.
Comment 4 Oliver Hunt 2011-09-23 15:12:20 PDT
Committed r95868: <http://trac.webkit.org/changeset/95868>