Bug 38363 - Handle double on righthand side of a right shift
Summary: Handle double on righthand side of a right shift
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Other OS X 10.5
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-04-29 17:10 PDT by Oliver Hunt
Modified: 2010-04-29 19:50 PDT (History)
0 users

See Also:


Attachments
Patch (3.89 KB, patch)
2010-04-29 17:14 PDT, Oliver Hunt
no flags Details | Formatted Diff | Diff
Patch (3.94 KB, patch)
2010-04-29 17:27 PDT, Oliver Hunt
barraclough: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Oliver Hunt 2010-04-29 17:10:08 PDT
Handle double on righthand side of a right shift
Comment 1 Oliver Hunt 2010-04-29 17:14:07 PDT
Created attachment 54757 [details]
Patch
Comment 2 Oliver Hunt 2010-04-29 17:27:36 PDT
Created attachment 54760 [details]
Patch
Comment 3 Gavin Barraclough 2010-04-29 18:34:53 PDT
Comment on attachment 54760 [details]
Patch

I think the if/else cases could be a little clearer if you structured them like this:

if (isOperandConstantImmediateInt(op2)) {
    // ...
    // ... (1 slow case to link), (optimization goes here!)
    // ...
} else if (isOperandConstantImmediateInt(op1)) {
    // ...
    // ... (1 slow case to link)
    // ...
} else { // !isOperandConstantImmediateInt(op1) && !isOperandConstantImmediateInt(op2)
    // ...
    // ... (2 slow cases to link), (optimization goes here!)
    // ...
}

buts that's personal taste, r+ either way.
Comment 4 Oliver Hunt 2010-04-29 19:50:02 PDT
Committed r58555: <http://trac.webkit.org/changeset/58555>