Ignore:
Timestamp:
Sep 11, 2011, 3:29:24 PM (14 years ago)
Author:
[email protected]
Message:

De-virtualize JSCell::isAPIValueWrapper
https://bugs.webkit.org/show_bug.cgi?id=67909

Reviewed by Oliver Hunt.

  • runtime/JSAPIValueWrapper.h:

(JSC::JSAPIValueWrapper::createStructure):
Set the correct type on structure creation.

  • runtime/JSCell.h:

Remove virtual keyword and default implementation.

  • runtime/JSType.h:

Add type for APIValueWrapper. It must come after CompoundType since
the APIValueWrapper has children in need of marking.

  • runtime/Structure.h:

(JSC::JSCell::isAPIValueWrapper):
Implement predicate using type info.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/runtime/JSAPIValueWrapper.h

    r94929 r94931  
    3838        JSValue value() const { return m_value.get(); }
    3939
    40         virtual bool isAPIValueWrapper() const { return true; }
    41 
    4240        static Structure* createStructure(JSGlobalData& globalData, JSGlobalObject* globalObject, JSValue prototype)
    4341        {
    44             return Structure::create(globalData, globalObject, prototype, TypeInfo(CompoundType, OverridesVisitChildren | OverridesGetPropertyNames), &s_info);
     42            return Structure::create(globalData, globalObject, prototype, TypeInfo(APIValueWrapper, OverridesVisitChildren | OverridesGetPropertyNames), &s_info);
    4543        }
    4644       
Note: See TracChangeset for help on using the changeset viewer.