Skip to content
  • oliver's avatar
    Replace the use of floats for immediate values with the use of integers for a... · a1fe5a42
    oliver authored
    Replace the use of floats for immediate values with the use of integers for a 4.5% improvement in SunSpider.
    
    Reviewed by Darin.
    
    Unfortunately this change results in NaN, +Inf, -Inf, and -0 being heap allocated now, but
    we should now have faster array access, faster immediate to double conversion, and the
    potential to further improve bitwise operators in future.
    
    This also removes the need for unions to avoid strict aliasing problems when extracting
    a value from immediates.
    
    * kjs/JSImmediate.h:
    (KJS::):
    (KJS::JSImmediate::trueImmediate):
    (KJS::JSImmediate::falseImmediate):
    (KJS::JSImmediate::undefinedImmediate):
    (KJS::JSImmediate::nullImmediate):
    (KJS::JSImmediate::toBoolean):
    * kjs/value.h:
    (KJS::jsNaN):
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@27602 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    a1fe5a42