Skip to content
  • barraclough@apple.com's avatar
    https://bugs.webkit.org/show_bug.cgi?id=19271 · 06585100
    barraclough@apple.com authored
    eliminate PIC branches by changing NaN handling in JSValue::toNumber
    
    Reviewed by Sam Weinig.
    
    Moving the non-numeric cases out of line seems to be a consistent
    win on SunSpider for me, to the order of about 0.5%.
    
    * runtime/JSCell.h:
    (JSC::JSCell::JSValue::toNumber):
        - Changed to only handle values that are already numbers, moce non-numeric cases out of line.
    * runtime/JSValue.cpp:
    (JSC::JSValue::toNumberSlowCase):
        - Added toNumberSlowCase, handling non-numeric cases.
    * runtime/JSValue.h:
        - Add declaration of toNumberSlowCase.
    
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@91555 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    06585100