The quickfix of bug #23469 is introduced a new bug. AP said I should open a new bug report for this. This is a copy of my comment: var a = 5.3 switch(val) { case 1: return 10 case 2: return 11 case 3: return 12 case 5: return 14 case 6: return 15 default: return 100 } The switch selects "case 5", because numberToInt32() converts 5.3 to 5, which is wrong in this case!
<rdar://problem/6538908>
Created attachment 28058 [details] The patch
Comment on attachment 28058 [details] The patch r=me with layout test please
Sending JavaScriptCore/ChangeLog Sending JavaScriptCore/interpreter/Interpreter.cpp Sending JavaScriptCore/jit/JITStubs.cpp Sending LayoutTests/ChangeLog Sending LayoutTests/fast/js/resources/switch-behaviour.js Sending LayoutTests/fast/js/switch-behaviour-expected.txt Transmitting file data ...... Committed revision 41277.