Ignore:
Timestamp:
Aug 26, 2009, 4:00:39 PM (16 years ago)
Author:
[email protected]
Message:

A bit of Collector refatoring.

Patch by Geoffrey Garen <[email protected]> on 2009-08-26
Reviewed by Oliver Hunt.

SunSpider says no change. v8 says 1.003x faster (1.02x faster on splay).

  • runtime/JSCell.cpp:

(JSC::JSCell::toPrimitive):
(JSC::JSCell::getPrimitiveNumber):
(JSC::JSCell::toBoolean):
(JSC::JSCell::toNumber):
(JSC::JSCell::toString):
(JSC::JSCell::toObject): Removed pure virtual functions from
JSCell, so the collector can construct one. This allowed
me to remove a bunch of ASSERT_NOT_REACHED throughout the
code, too.

  • runtime/JSCell.h:

(JSC::JSCell::JSCell): ditto
(JSC::Heap::heap): Inlined this function because it's trivial.

  • runtime/Collector.cpp:

(JSC::Heap::destroy):
(JSC::Heap::allocateBlock):
(JSC::Heap::freeBlock):
(JSC::Heap::freeBlocks): Renamed freeHeap to freeBlocks, since
it doesn't actually free the Heap object.
(JSC::Heap::heapAllocate):
(JSC::Heap::sweep):

  • runtime/Collector.h: Refactored block allocation and destruction

into helper functions.

  • runtime/GetterSetter.cpp:
  • runtime/JSAPIValueWrapper.cpp:
  • runtime/JSPropertyNameIterator.cpp: Removed dummy implementations

of pure virtual functions. (See above.)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/JavaScriptCore.exp

    r47780 r47799  
    179179__ZN3JSC4Heap25protectedObjectTypeCountsEv
    180180__ZN3JSC4Heap26protectedGlobalObjectCountEv
    181 __ZN3JSC4Heap4heapENS_7JSValueE 
    182181__ZN3JSC4Heap6isBusyEv
    183182__ZN3JSC4Heap7collectEv
     
    196195__ZN3JSC6JSCell18getOwnPropertySlotEPNS_9ExecStateERKNS_10IdentifierERNS_12PropertySlotE
    197196__ZN3JSC6JSCell18getOwnPropertySlotEPNS_9ExecStateEjRNS_12PropertySlotE
     197__ZN3JSC6JSCell18getPrimitiveNumberEPNS_9ExecStateERdRNS_7JSValueE
    198198__ZN3JSC6JSCell3putEPNS_9ExecStateERKNS_10IdentifierENS_7JSValueERNS_15PutPropertySlotE
    199199__ZN3JSC6JSCell3putEPNS_9ExecStateEjNS_7JSValueE 
     
    288288__ZN3WTF10fastCallocEmm
    289289__ZN3WTF10fastMallocEm
    290 __ZN3WTF13tryFastMallocEm
    291290__ZN3WTF11currentTimeEv
    292291__ZN3WTF11fastReallocEPvm
     
    298297__ZN3WTF13currentThreadEv
    299298__ZN3WTF13tryFastCallocEmm
     299__ZN3WTF13tryFastMallocEm
    300300__ZN3WTF15ThreadCondition4waitERNS_5MutexE
    301301__ZN3WTF15ThreadCondition6signalEv
     
    349349__ZNK3JSC18PropertyDescriptor12hasAccessorsEv
    350350__ZNK3JSC4Heap10statisticsEv
     351__ZNK3JSC6JSCell11toPrimitiveEPNS_9ExecStateENS_22PreferredPrimitiveTypeE
    351352__ZNK3JSC6JSCell12toThisObjectEPNS_9ExecStateE
    352353__ZNK3JSC6JSCell12toThisStringEPNS_9ExecStateE
    353354__ZNK3JSC6JSCell14isGetterSetterEv
     355__ZNK3JSC6JSCell8toNumberEPNS_9ExecStateE
     356__ZNK3JSC6JSCell8toObjectEPNS_9ExecStateE
     357__ZNK3JSC6JSCell8toStringEPNS_9ExecStateE
    354358__ZNK3JSC6JSCell9classInfoEv
    355359__ZNK3JSC6JSCell9getStringERNS_7UStringE
    356360__ZNK3JSC6JSCell9getStringEv
    357361__ZNK3JSC6JSCell9getUInt32ERj
     362__ZNK3JSC6JSCell9toBooleanEPNS_9ExecStateE
    358363__ZNK3JSC7ArgList8getSliceEiRS0_
    359364__ZNK3JSC7JSValue16toObjectSlowCaseEPNS_9ExecStateE
     
    386391__ZTVN3JSC16InternalFunctionE
    387392__ZTVN3JSC16JSVariableObjectE
    388 __ZTVN3JSC17JSAPIValueWrapperE
    389393__ZTVN3JSC8DebuggerE
    390394__ZTVN3JSC8JSObjectE
Note: See TracChangeset for help on using the changeset viewer.