Ignore:
Timestamp:
Oct 23, 2008, 8:55:41 AM (17 years ago)
Author:
Darin Adler
Message:

JavaScriptCore:

2008-10-23 Darin Adler <Darin Adler>

1) slowness under MSVC, since it doesn't handle a

class with a single pointer in it as efficiently
as a pointer

2) uninitialized pointers in Vector

  • API/APICast.h: (toRef):
  • VM/CTI.cpp: (JSC::CTI::asInteger):
  • VM/CodeGenerator.cpp: (JSC::CodeGenerator::addConstant):
  • VM/CodeGenerator.h: (JSC::CodeGenerator::JSValueHashTraits::constructDeletedValue): (JSC::CodeGenerator::JSValueHashTraits::isDeletedValue):
  • VM/Machine.cpp: (JSC::Machine::cti_op_add): (JSC::Machine::cti_op_pre_inc): (JSC::Machine::cti_op_get_by_id): (JSC::Machine::cti_op_get_by_id_second): (JSC::Machine::cti_op_get_by_id_generic): (JSC::Machine::cti_op_get_by_id_fail): (JSC::Machine::cti_op_instanceof): (JSC::Machine::cti_op_del_by_id): (JSC::Machine::cti_op_mul): (JSC::Machine::cti_op_call_NotJSFunction): (JSC::Machine::cti_op_resolve): (JSC::Machine::cti_op_construct_NotJSConstruct): (JSC::Machine::cti_op_get_by_val): (JSC::Machine::cti_op_sub): (JSC::Machine::cti_op_lesseq): (JSC::Machine::cti_op_negate): (JSC::Machine::cti_op_resolve_base): (JSC::Machine::cti_op_resolve_skip): (JSC::Machine::cti_op_resolve_global): (JSC::Machine::cti_op_div): (JSC::Machine::cti_op_pre_dec): (JSC::Machine::cti_op_not): (JSC::Machine::cti_op_eq): (JSC::Machine::cti_op_lshift): (JSC::Machine::cti_op_bitand): (JSC::Machine::cti_op_rshift): (JSC::Machine::cti_op_bitnot): (JSC::Machine::cti_op_mod): (JSC::Machine::cti_op_less): (JSC::Machine::cti_op_neq): (JSC::Machine::cti_op_urshift): (JSC::Machine::cti_op_bitxor): (JSC::Machine::cti_op_bitor): (JSC::Machine::cti_op_call_eval): (JSC::Machine::cti_op_throw): (JSC::Machine::cti_op_next_pname): (JSC::Machine::cti_op_typeof): (JSC::Machine::cti_op_is_undefined): (JSC::Machine::cti_op_is_boolean): (JSC::Machine::cti_op_is_number): (JSC::Machine::cti_op_is_string): (JSC::Machine::cti_op_is_object): (JSC::Machine::cti_op_is_function): (JSC::Machine::cti_op_stricteq): (JSC::Machine::cti_op_nstricteq): (JSC::Machine::cti_op_to_jsnumber): (JSC::Machine::cti_op_in): (JSC::Machine::cti_op_del_by_val): (JSC::Machine::cti_vm_throw): Removed calls to payload functions.
  • VM/Register.h: (JSC::Register::Register): Removed overload for JSCell and call to payload function.
  • kjs/JSCell.h: Changed JSCell to derive from JSValue again. Removed JSValuePtr constructor. (JSC::asCell): Changed cast from reinterpret_cast to static_cast.
  • kjs/JSImmediate.h: Removed JSValuePtr class. Added typedef back.
  • kjs/JSValue.h: (JSC::JSValue::JSValue): Added empty protected inline constructor back. (JSC::JSValue::~JSValue): Same for destructor. Removed == and != operator for JSValuePtr.
  • kjs/PropertySlot.h: (JSC::PropertySlot::PropertySlot): Chnaged argument to const JSValue* and added a const_cast.
  • kjs/protect.h: Removed overloads and specialization for JSValuePtr.

JavaScriptGlue:

2008-10-23 Darin Adler <Darin Adler>

  • JSValueWrapper.cpp: (JSValueWrapper::GetValue): Added missing call to .get().
  • JSValueWrapper.h: ProtectedPtr<JSValue> instead of ProtectedPtr<JSValuePtr>.

WebCore:

2008-10-23 Darin Adler <Darin Adler>

  • bindings/js/ScheduledAction.h:
  • inspector/InspectorController.cpp: ProtectedPtr<JSValue> instead of ProtectedPtr<JSValuePtr>.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/kjs/JSImmediate.h

    r37712 r37812  
    4040    class UString;
    4141
    42     class JSValuePtr {
    43     public:
    44         JSValuePtr() { } // uninitialized (not zero)
    45         JSValuePtr(const JSValue* payload) : m_payload(const_cast<JSValue*>(payload)) { }
    46         JSValuePtr(const JSCell*);
    47 
    48         JSValue* payload() const { return m_payload; }
    49         JSValue** payloadPtr() { return &m_payload; }
    50 
    51         bool operator!() const { return !payload(); }
    52    
    53         // This conversion operator allows implicit conversion to bool but not to other integer types.
    54         typedef JSValue* JSValuePtr::*UnspecifiedBoolType;
    55         operator UnspecifiedBoolType() const { return payload() ? &JSValuePtr::m_payload : 0; }
    56 
    57         JSValue* operator->() const { return payload(); }
    58 
    59     private:
    60         JSValue* m_payload;
    61     };
     42    typedef JSValue* JSValuePtr;
    6243
    6344    inline JSValuePtr noValue() { return static_cast<JSValue*>(0); }
    64     inline void* asPointer(JSValuePtr value) { return value.payload(); }
     45    inline void* asPointer(JSValuePtr value) { return value; }
    6546
    6647    /*
     
    322303        static ALWAYS_INLINE uintptr_t rawValue(JSValuePtr v)
    323304        {
    324             return reinterpret_cast<uintptr_t>(v.payload());
     305            return reinterpret_cast<uintptr_t>(v);
    325306        }
    326307
Note: See TracChangeset for help on using the changeset viewer.