Chromium Code Reviews
DescriptionExperimental: fix a bug in our compilation of switch statements.
As described in issue 241
http://code.google.com/p/v8/issues/detail?id=241
we can crash when compiling switch statements if we get into a state
where we are skipping comparisons (due to an unconditionally true
match) and still compiling bodies (due to continued fall-through) and
then hit a default case.
The issue is fixed by splitting the loop over the cases so that we do
not reuse the same loop code for both states (compiling comparisons
and skipping comparisons).
The code for the end of the switch has also been modified to avoid a
jump to the next statement for the last case (at the cost of extra
complexity to handle the new possible compilation states that arise).
Committed: http://code.google.com/p/v8/source/detail?r=1379
Patch Set 1 #Patch Set 2 : '' #Patch Set 3 : '' #Patch Set 4 : '' #Patch Set 5 : '' #Patch Set 6 : '' #Patch Set 7 : '' #Patch Set 8 : '' #Patch Set 9 : '' #
Total comments: 6
Messages
Total messages: 3 (0 generated)
|