Changeset 39998 in webkit for trunk/JavaScriptCore/parser


Ignore:
Timestamp:
Jan 16, 2009, 4:39:01 PM (16 years ago)
Author:
[email protected]
Message:

2009-01-16 Gavin Barraclough <[email protected]>

Reviewed by Oliver Hunt.

Add support to x86-64 JIT for inline double precision arithmetic ops.
+5/6% on x86-64, JIT enabled, sunspider.

  • assembler/MacroAssembler.h: (JSC::MacroAssembler::addPtr):
  • assembler/X86Assembler.h: (JSC::X86Assembler::movq_rr):
  • jit/JIT.h:
  • jit/JITArithmetic.cpp: (JSC::JIT::compileFastArith_op_pre_inc): (JSC::JIT::compileBinaryArithOp): (JSC::JIT::compileBinaryArithOpSlowCase): (JSC::JIT::compileFastArith_op_add): (JSC::JIT::compileFastArithSlow_op_add): (JSC::JIT::compileFastArith_op_mul): (JSC::JIT::compileFastArithSlow_op_mul): (JSC::JIT::compileFastArith_op_sub): (JSC::JIT::compileFastArithSlow_op_sub):
  • parser/ResultType.h: (JSC::ResultType::isReusable): (JSC::ResultType::isInt32): (JSC::ResultType::definitelyIsNumber): (JSC::ResultType::mightBeNumber): (JSC::ResultType::isNotNumber): (JSC::ResultType::unknownType):
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/parser/ResultType.h

    r39961 r39998  
    4242        static const Type TypeMaybeOther  = 0x40;
    4343
     44        static const Type TypeBits = TypeMaybeNumber | TypeMaybeString | TypeMaybeNull | TypeMaybeBool | TypeMaybeOther;
     45
    4446        explicit ResultType(Type type)
    4547            : m_type(type)
     
    4951        bool isReusable()
    5052        {
    51             return (m_type & TypeReusable);
     53            return m_type & TypeReusable;
    5254        }
    5355
    5456        bool isInt32()
    5557        {
    56             return (m_type & TypeInt32);
     58            return m_type & TypeInt32;
    5759        }
    5860
    5961        bool definitelyIsNumber()
    6062        {
    61             return ((m_type & ~TypeReusable) == TypeMaybeNumber);
    62         }
    63        
    64         bool isNotNumber()
    65         {
    66             return !(m_type & TypeMaybeNumber);
     63            return (m_type & TypeBits) == TypeMaybeNumber;
    6764        }
    6865       
    6966        bool mightBeNumber()
    7067        {
    71             return !isNotNumber();
     68            return m_type & TypeMaybeNumber;
    7269        }
    7370
     71        bool isNotNumber()
     72        {
     73            return !mightBeNumber();
     74        }
     75       
    7476        static ResultType nullType()
    7577        {
     
    109111        static ResultType unknownType()
    110112        {
    111             return ResultType(TypeMaybeNumber | TypeMaybeString | TypeMaybeNull | TypeMaybeBool | TypeMaybeOther);
     113            return ResultType(TypeBits);
    112114        }
    113115       
Note: See TracChangeset for help on using the changeset viewer.