Bug 21364

Summary: Remove the branch in op_ret for OptionalCalleeActivation and OptionalCalleeArguments
Product: WebKit Reporter: Cameron Zwarich (cpst) <zwarich>
Component: JavaScriptCoreAssignee: Cameron Zwarich (cpst) <zwarich>
Status: RESOLVED FIXED    
Severity: Normal CC: mjs
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Bug Depends on:    
Bug Blocks: 20812    
Attachments:
Description Flags
Proposed patch to refactor some code in preparation for the speedup
none
Patch in progress
none
Proposed patch oliver: review+

Description Cameron Zwarich (cpst) 2008-10-04 00:36:13 PDT
Currently op_ret contains a branch for OptionalCalleeActivation and OptionalCalleeArguments, so it can tear either of the two off. Removing this branch is not that difficult, especially given recent changes to CodeFeatures in the parser, but it will require making f.arguments only live and shared in the case where 'arguments' appears lexically.
Comment 1 Cameron Zwarich (cpst) 2008-10-05 15:34:05 PDT
Created attachment 24104 [details]
Proposed patch to refactor some code in preparation for the speedup
Comment 2 Maciej Stachowiak 2008-10-05 15:37:52 PDT
Comment on attachment 24104 [details]
Proposed patch to refactor some code in preparation for the speedup

r=me

You may want to consider giving scopeChain a needsActivation method which checks for any of the needed conditions rather than having such a complex field initializer.
Comment 3 Cameron Zwarich (cpst) 2008-10-05 18:38:00 PDT
Comment on attachment 24104 [details]
Proposed patch to refactor some code in preparation for the speedup

Landed in r327320, so I am removing review flag.
Comment 4 Cameron Zwarich (cpst) 2008-10-05 18:39:02 PDT
Created attachment 24107 [details]
Patch in progress

This patch passes all tests, but it doesn't seem to be a speedup on my machine. I also need to add some tests for the changes in functionality.
Comment 5 Cameron Zwarich (cpst) 2008-10-05 22:31:23 PDT
Created attachment 24110 [details]
Proposed patch

This gives some odd test results on my machine, mostly due to a presumedly slowdown in Richards, but it is an overall progression on Maciej's machine, so he told me to put it up for review.
Comment 6 Oliver Hunt 2008-10-05 22:49:33 PDT
Comment on attachment 24110 [details]
Proposed patch

r=me assuming you've testing in cti and the interpreter
Comment 7 Cameron Zwarich (cpst) 2008-10-05 23:03:35 PDT
Landed in r37324.