Ignore:
Timestamp:
Oct 19, 2008, 10:58:02 PM (17 years ago)
Author:
Darin Adler
Message:

2008-10-19 Darin Adler <Darin Adler>

Reviewed by Cameron Zwarich.

Change JSValuePtr from a typedef into a class. This allows us to support
conversion from JSCell* to JSValuePtr even if JSCell isn't derived from
JSValue.

  • JavaScriptCore.exp: Updated symbols that involve JSValuePtr, since it's now a distinct type.
  • API/APICast.h: (toRef): Extract the JSValuePtr payload explicitly since we can't just cast any more.
  • VM/CTI.cpp: (JSC::CTI::asInteger): Ditto.
  • VM/CodeGenerator.cpp: (JSC::CodeGenerator::addConstant): Get at the payload directly. (JSC::CodeGenerator::emitLoad): Added an overload of JSCell* because otherwise classes derived from JSValue end up calling the bool overload instead of JSValuePtr.
  • VM/CodeGenerator.h: Ditto. Also update traits to use JSValue* and the payload functions.
  • VM/Register.h: Added a JSCell* overload and use of payload functions.
  • kjs/JSCell.h: (JSC::asCell): Use payload function. (JSC::JSValue::asCell): Use JSValue* instead of JSValuePtr. (JSC::JSValuePtr::JSValuePtr): Added. Constructor that takes JSCell* and creates a JSValuePtr.
  • kjs/JSImmediate.h: Added JSValuePtr class. Also updated makeValue and makeInt to work with JSValue* and the payload function.
  • kjs/JSValue.h: Added == and != operators for JSValuePtr. Put them here because eventually all the JSValue functions should go here except what's needed by JSImmediate. Also fix asValue to use JSValue* instead of JSValuePtr.
  • kjs/PropertySlot.h: Change constructor to take JSValuePtr.
  • kjs/protect.h: Update gcProtect functions to work with JSCell* as well as JSValuePtr. Also updated the ProtectedPtr<JSValuePtr> specialization to work more directly. Also changed all the call sites to use gcProtectNullTolerant.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/JavaScriptCore.exp

    r37684 r37712  
    103103__ZN3JSC11Interpreter21shouldPrintExceptionsEv
    104104__ZN3JSC11Interpreter24setShouldPrintExceptionsEb
    105 __ZN3JSC11Interpreter8evaluateEPNS_9ExecStateERNS_10ScopeChainERKNS_10SourceCodeEPNS_7JSValueE
     105__ZN3JSC11Interpreter8evaluateEPNS_9ExecStateERNS_10ScopeChainERKNS_10SourceCodeENS_10JSValuePtrE
    106106__ZN3JSC11JSImmediate12nonInlineNaNEv
    107 __ZN3JSC11JSImmediate8toObjectEPNS_7JSValueEPNS_9ExecStateE
    108 __ZN3JSC11JSImmediate8toStringEPNS_7JSValueE
    109 __ZN3JSC11JSImmediate9prototypeEPNS_7JSValueEPNS_9ExecStateE
     107__ZN3JSC11JSImmediate8toObjectENS_10JSValuePtrEPNS_9ExecStateE
     108__ZN3JSC11JSImmediate8toStringENS_10JSValuePtrE
     109__ZN3JSC11JSImmediate9prototypeENS_10JSValuePtrEPNS_9ExecStateE
    110110__ZN3JSC11ProfileNode4sortEPFbRKN3WTF6RefPtrIS0_EES5_E
    111111__ZN3JSC11ProgramNode6createEPNS_12JSGlobalDataEPNS_14SourceElementsEPN3WTF6VectorISt4pairINS_10IdentifierEjELm16EEEPNS6_INS5_6RefPtrINS_12FuncDeclNodeEEELm16EEERKNS_10SourceCodeEji
     
    116116__ZN3JSC11StructureID21clearEnumerationCacheEv
    117117__ZN3JSC11StructureID24fromDictionaryTransitionEPS0_
    118 __ZN3JSC11StructureID25changePrototypeTransitionEPS0_PNS_7JSValueE
     118__ZN3JSC11StructureID25changePrototypeTransitionEPS0_NS_10JSValuePtrE
    119119__ZN3JSC11StructureID27growPropertyStorageCapacityEv
    120 __ZN3JSC11StructureIDC1EPNS_7JSValueERKNS_8TypeInfoE
     120__ZN3JSC11StructureIDC1ENS_10JSValuePtrERKNS_8TypeInfoE
    121121__ZN3JSC11StructureIDD1Ev
    122122__ZN3JSC12DateInstance4infoE
     
    134134__ZN3JSC12StringObject18getOwnPropertySlotEPNS_9ExecStateERKNS_10IdentifierERNS_12PropertySlotE
    135135__ZN3JSC12StringObject18getOwnPropertySlotEPNS_9ExecStateEjRNS_12PropertySlotE
    136 __ZN3JSC12StringObject3putEPNS_9ExecStateERKNS_10IdentifierEPNS_7JSValueERNS_15PutPropertySlotE
     136__ZN3JSC12StringObject3putEPNS_9ExecStateERKNS_10IdentifierENS_10JSValuePtrERNS_15PutPropertySlotE
    137137__ZN3JSC12StringObject4infoE
    138138__ZN3JSC12StringObjectC2EPNS_9ExecStateEN3WTF10PassRefPtrINS_11StructureIDEEERKNS_7UStringE
     
    146146__ZN3JSC14JSGlobalObject14setTimeoutTimeEj
    147147__ZN3JSC14JSGlobalObject16stopTimeoutCheckEv
    148 __ZN3JSC14JSGlobalObject17putWithAttributesEPNS_9ExecStateERKNS_10IdentifierEPNS_7JSValueEj
     148__ZN3JSC14JSGlobalObject17putWithAttributesEPNS_9ExecStateERKNS_10IdentifierENS_10JSValuePtrEj
    149149__ZN3JSC14JSGlobalObject17startTimeoutCheckEv
    150150__ZN3JSC14JSGlobalObject29markCrossHeapDependentObjectsEv
    151 __ZN3JSC14JSGlobalObject3putEPNS_9ExecStateERKNS_10IdentifierEPNS_7JSValueERNS_15PutPropertySlotE
     151__ZN3JSC14JSGlobalObject3putEPNS_9ExecStateERKNS_10IdentifierENS_10JSValuePtrERNS_15PutPropertySlotE
    152152__ZN3JSC14JSGlobalObject4initEPNS_8JSObjectE
    153153__ZN3JSC14JSGlobalObject4markEv
     
    166166__ZN3JSC16ParserRefCounted5derefEv
    167167__ZN3JSC17PropertyNameArray3addEPNS_7UString3RepE
    168 __ZN3JSC17PrototypeFunctionC1EPNS_9ExecStateEN3WTF10PassRefPtrINS_11StructureIDEEEiRKNS_10IdentifierEPFPNS_7JSValueES2_PNS_8JSObjectESB_RKNS_7ArgListEE
    169 __ZN3JSC17PrototypeFunctionC1EPNS_9ExecStateEiRKNS_10IdentifierEPFPNS_7JSValueES2_PNS_8JSObjectES7_RKNS_7ArgListEE
     168__ZN3JSC17PrototypeFunctionC1EPNS_9ExecStateEN3WTF10PassRefPtrINS_11StructureIDEEEiRKNS_10IdentifierEPFNS_10JSValuePtrES2_PNS_8JSObjectESA_RKNS_7ArgListEE
     169__ZN3JSC17PrototypeFunctionC1EPNS_9ExecStateEiRKNS_10IdentifierEPFNS_10JSValuePtrES2_PNS_8JSObjectES6_RKNS_7ArgListEE
    170170__ZN3JSC17constructFunctionEPNS_9ExecStateERKNS_7ArgListERKNS_10IdentifierERKNS_7UStringEi
    171171__ZN3JSC19constructEmptyArrayEPNS_9ExecStateE
    172172__ZN3JSC19initializeThreadingEv
    173173__ZN3JSC20constructEmptyObjectEPNS_9ExecStateE
    174 __ZN3JSC23objectProtoFuncToStringEPNS_9ExecStateEPNS_8JSObjectEPNS_7JSValueERKNS_7ArgListE
     174__ZN3JSC23objectProtoFuncToStringEPNS_9ExecStateEPNS_8JSObjectENS_10JSValuePtrERKNS_7ArgListE
    175175__ZN3JSC23setUpStaticFunctionSlotEPNS_9ExecStateEPKNS_9HashEntryEPNS_8JSObjectERKNS_10IdentifierERNS_12PropertySlotE
    176176__ZN3JSC4Heap14allocateNumberEm
     
    183183__ZN3JSC4Heap25protectedObjectTypeCountsEv
    184184__ZN3JSC4Heap26protectedGlobalObjectCountEv
    185 __ZN3JSC4Heap4heapEPNS_7JSValueE
     185__ZN3JSC4Heap4heapENS_10JSValuePtrE
    186186__ZN3JSC4Heap4sizeEv
    187187__ZN3JSC4Heap7collectEv
    188 __ZN3JSC4Heap7protectEPNS_7JSValueE
     188__ZN3JSC4Heap7protectENS_10JSValuePtrE
    189189__ZN3JSC4Heap8allocateEm
    190 __ZN3JSC4Heap9unprotectEPNS_7JSValueE
    191 __ZN3JSC4callEPNS_9ExecStateEPNS_7JSValueENS_8CallTypeERKNS_8CallDataES3_RKNS_7ArgListE
     190__ZN3JSC4Heap9unprotectENS_10JSValuePtrE
     191__ZN3JSC4callEPNS_9ExecStateENS_10JSValuePtrENS_8CallTypeERKNS_8CallDataES2_RKNS_7ArgListE
    192192__ZN3JSC5equalEPKNS_7UString3RepES3_
    193193__ZN3JSC6JSCell11getCallDataERNS_8CallDataE
     
    199199__ZN3JSC6JSCell18getOwnPropertySlotEPNS_9ExecStateERKNS_10IdentifierERNS_12PropertySlotE
    200200__ZN3JSC6JSCell18getOwnPropertySlotEPNS_9ExecStateEjRNS_12PropertySlotE
    201 __ZN3JSC6JSCell3putEPNS_9ExecStateERKNS_10IdentifierEPNS_7JSValueERNS_15PutPropertySlotE
    202 __ZN3JSC6JSCell3putEPNS_9ExecStateEjPNS_7JSValueE
     201__ZN3JSC6JSCell3putEPNS_9ExecStateERKNS_10IdentifierENS_10JSValuePtrERNS_15PutPropertySlotE
     202__ZN3JSC6JSCell3putEPNS_9ExecStateEjNS_10JSValuePtrE
    203203__ZN3JSC6JSCell9getObjectEv
    204204__ZN3JSC6JSCellnwEmPNS_9ExecStateE
     
    212212__ZN3JSC6Parser5parseEPNS_12JSGlobalDataEPiPNS_7UStringE
    213213__ZN3JSC6strtodEPKcPPc
    214 __ZN3JSC7ArgList10slowAppendEPNS_7JSValueE
     214__ZN3JSC7ArgList10slowAppendENS_10JSValuePtrE
    215215__ZN3JSC7CStringD1Ev
    216216__ZN3JSC7CStringaSERKS0_
     
    234234__ZN3JSC8DebuggerC2Ev
    235235__ZN3JSC8DebuggerD2Ev
    236 __ZN3JSC8JSObject11hasInstanceEPNS_9ExecStateEPNS_7JSValueES4_
     236__ZN3JSC8JSObject11hasInstanceEPNS_9ExecStateENS_10JSValuePtrES3_
    237237__ZN3JSC8JSObject12defineGetterEPNS_9ExecStateERKNS_10IdentifierEPS0_
    238238__ZN3JSC8JSObject12defineSetterEPNS_9ExecStateERKNS_10IdentifierEPS0_
     
    244244__ZN3JSC8JSObject17createInheritorIDEv
    245245__ZN3JSC8JSObject17putDirectFunctionEPNS_9ExecStateEPNS_16InternalFunctionEj
    246 __ZN3JSC8JSObject17putWithAttributesEPNS_9ExecStateERKNS_10IdentifierEPNS_7JSValueEj
    247 __ZN3JSC8JSObject17putWithAttributesEPNS_9ExecStateEjPNS_7JSValueEj
     246__ZN3JSC8JSObject17putWithAttributesEPNS_9ExecStateERKNS_10IdentifierENS_10JSValuePtrEj
     247__ZN3JSC8JSObject17putWithAttributesEPNS_9ExecStateEjNS_10JSValuePtrEj
    248248__ZN3JSC8JSObject18getOwnPropertySlotEPNS_9ExecStateEjRNS_12PropertySlotE
    249 __ZN3JSC8JSObject18getPrimitiveNumberEPNS_9ExecStateERdRPNS_7JSValueE
    250 __ZN3JSC8JSObject22fillGetterPropertySlotERNS_12PropertySlotEPPNS_7JSValueE
     249__ZN3JSC8JSObject18getPrimitiveNumberEPNS_9ExecStateERdRNS_10JSValuePtrE
     250__ZN3JSC8JSObject22fillGetterPropertySlotERNS_12PropertySlotEPNS_10JSValuePtrE
    251251__ZN3JSC8JSObject23allocatePropertyStorageEmm
    252 __ZN3JSC8JSObject3putEPNS_9ExecStateERKNS_10IdentifierEPNS_7JSValueERNS_15PutPropertySlotE
    253 __ZN3JSC8JSObject3putEPNS_9ExecStateEjPNS_7JSValueE
     252__ZN3JSC8JSObject3putEPNS_9ExecStateERKNS_10IdentifierENS_10JSValuePtrERNS_15PutPropertySlotE
     253__ZN3JSC8JSObject3putEPNS_9ExecStateEjNS_10JSValuePtrE
    254254__ZN3JSC8JSObject4markEv
    255255__ZN3JSC8Profiler13stopProfilingEPNS_9ExecStateERKNS_7UStringE
     
    259259__ZN3JSC9CodeBlockD1Ev
    260260__ZN3JSC9CodeBlockD2Ev
    261 __ZN3JSC9constructEPNS_9ExecStateEPNS_7JSValueENS_13ConstructTypeERKNS_13ConstructDataERKNS_7ArgListE
     261__ZN3JSC9constructEPNS_9ExecStateENS_10JSValuePtrENS_13ConstructTypeERKNS_13ConstructDataERKNS_7ArgListE
    262262__ZN3JSCeqERKNS_7UStringEPKc
    263263__ZN3JSCgtERKNS_7UStringES2_
     
    310310__ZNK3JSC17DebuggerCallFrame12functionNameEv
    311311__ZNK3JSC17DebuggerCallFrame4typeEv
    312 __ZNK3JSC17DebuggerCallFrame8evaluateERKNS_7UStringERPNS_7JSValueE
     312__ZNK3JSC17DebuggerCallFrame8evaluateERKNS_7UStringERNS_10JSValuePtrE
    313313__ZNK3JSC4Node8toStringEv
    314314__ZNK3JSC6JSCell12toThisObjectEPNS_9ExecStateE
     
    328328__ZNK3JSC7JSValue9toIntegerEPNS_9ExecStateE
    329329__ZNK3JSC7Machine14retrieveCallerEPNS_9ExecStateEPNS_16InternalFunctionE
    330 __ZNK3JSC7Machine18retrieveLastCallerEPNS_9ExecStateERiRlRNS_7UStringERPNS_7JSValueE
     330__ZNK3JSC7Machine18retrieveLastCallerEPNS_9ExecStateERiRlRNS_7UStringERNS_10JSValuePtrE
    331331__ZNK3JSC7UString10UTF8StringEb
    332332__ZNK3JSC7UString14toStrictUInt32EPb
Note: See TracChangeset for help on using the changeset viewer.