[Webkit-unassigned] [Bug 18736] New: SQUIRRELFISH: switch statements with no default have incorrect codegen

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Apr 25 00:22:45 PDT 2008


http://bugs.webkit.org/show_bug.cgi?id=18736

           Summary: SQUIRRELFISH: switch statements with no default have
                    incorrect codegen
           Product: WebKit
           Version: 526+ (Nightly build)
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: SquirrelFishBlocker
          Severity: Normal
          Priority: P2
         Component: JavaScriptCore
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: cwzwarich at uwaterloo.ca
OtherBugsDependingO 18624
             nThis:


If no conditions match, we should skip all the case
clauses, but instead we fall through to the first.

function f2(i) {
    switch (i) {
    case 0:
    case 1:
        return 1;
    case 2:
        return 2;
    }
    // with no default, control will fall through                               
    return 3;
}


[   0] load             tr0, 0(@k0)             
[   3] stricteq         tr0, tr0, lr1
[   7] jtrue            tr0, 21(->30)
[  10] load             tr0, 1(@k1)             
[  13] stricteq         tr0, tr0, lr1
[  17] jtrue            tr0, 11(->30)
[  20] load             tr0, 2(@k2)             
[  23] stricteq         tr0, tr0, lr1
[  27] jtrue            tr0, 6(->35)
[  30] load             tr0, 1(@k1)             
[  33] ret              tr0
[  35] load             tr0, 2(@k2)             
[  38] ret              tr0
[  40] load             tr0, 3(@k3)             
[  43] ret              tr0

This affects the JavaScriptCore regression test js1_2/statements/switch2.js.


-- 
Configure bugmail: http://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the webkit-unassigned mailing list