Changeset 34361 in webkit for trunk/JavaScriptCore
- Timestamp:
- Jun 4, 2008, 11:10:15 AM (17 years ago)
- Location:
- trunk/JavaScriptCore
- Files:
-
- 1 deleted
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/API/JSCallbackObjectFunctions.h
r34355 r34361 345 345 StaticValueEntry* entry = it->second; 346 346 if (entry->getProperty && !(entry->attributes & kJSPropertyAttributeDontEnum)) 347 propertyNames.add( name);347 propertyNames.add(Identifier(name)); 348 348 } 349 349 } … … 356 356 StaticFunctionEntry* entry = it->second; 357 357 if (!(entry->attributes & kJSPropertyAttributeDontEnum)) 358 propertyNames.add( name);358 propertyNames.add(Identifier(name)); 359 359 } 360 360 } -
trunk/JavaScriptCore/API/JSClassRef.cpp
r33374 r34361 33 33 #include <kjs/JSGlobalObject.h> 34 34 #include <kjs/identifier.h> 35 #include <kjs/InitializeThreading.h> 35 36 #include <kjs/object_object.h> 36 37 … … 58 59 , cachedPrototype(0) 59 60 { 61 initializeThreading(); 62 60 63 if (const JSStaticValue* staticValue = definition->staticValues) { 61 64 staticValues = new StaticValuesTable(); 62 65 while (staticValue->name) { 63 staticValues->add( Identifier(UString::Rep::createFromUTF8(staticValue->name).get()).ustring().rep(),66 staticValues->add(UString::Rep::createFromUTF8(staticValue->name), 64 67 new StaticValueEntry(staticValue->getProperty, staticValue->setProperty, staticValue->attributes)); 65 68 ++staticValue; … … 70 73 staticFunctions = new StaticFunctionsTable(); 71 74 while (staticFunction->name) { 72 staticFunctions->add( Identifier(UString::Rep::createFromUTF8(staticFunction->name).get()).ustring().rep(),75 staticFunctions->add(UString::Rep::createFromUTF8(staticFunction->name), 73 76 new StaticFunctionEntry(staticFunction->callAsFunction, staticFunction->attributes)); 74 77 ++staticFunction; -
trunk/JavaScriptCore/ChangeLog
r34360 r34361 1 2008-06-04 Alexey Proskuryakov <[email protected]> 2 3 Reviewed by Darin. 4 5 Fix JSClassCreate to work with old JSCore API threading model. 6 7 No change on SunSpider. 8 9 * API/JSClassRef.cpp: (OpaqueJSClass::OpaqueJSClass): Since JSClass is constructed without 10 a context, there is no way for it to create Identifiers. 11 Also, added initializeThreading(), just for good measure. 12 13 * API/JSCallbackObjectFunctions.h: (KJS::::getPropertyNames): Make an Identifier out of the 14 string here, because propertyNames.add() needs that. 15 16 * kjs/identifier.cpp: 17 * kjs/identifier.h: 18 (KJS::Identifier::equal): 19 * kjs/ustring.cpp: 20 (KJS::equal): 21 Moved equal() from identifier.h to ustring.h, because it's not really about Identifiers, 22 and to make it possible to use it from StrHash. 23 Include StrHash.h from ustring.h to avoid having the behavior depend on headers that happen 24 to be included. 25 26 * wtf/StrHash.h: Removed. 27 * kjs/ustring.h: Made RefPtr<UString::Rep> use the same default hash as UString::Rep* (it 28 used to default to pointer equality). Moved the whole StrHash header into ustring.h. 29 30 * JavaScriptCore.exp: Export equal() for WebCore use (this StrHash is used in c_class.cpp, 31 jni_class.cpp, and npruntime.cpp). 32 1 33 2008-06-04 Alexey Proskuryakov <[email protected]> 2 34 -
trunk/JavaScriptCore/JavaScriptCore.exp
r34355 r34361 1 _JSCheckScriptSyntax2 _JSClassCreate3 _JSClassRelease4 _JSClassRetain5 _JSContextGetGlobalObject6 _JSEvaluateScript7 _JSGarbageCollect8 _JSGlobalContextCreate9 _JSGlobalContextRelease10 _JSGlobalContextRetain11 _JSObjectCallAsConstructor12 _JSObjectCallAsFunction13 _JSObjectCopyPropertyNames14 _JSObjectDeleteProperty15 _JSObjectGetPrivate16 _JSObjectGetProperty17 _JSObjectGetPropertyAtIndex18 _JSObjectGetPrototype19 _JSObjectHasProperty20 _JSObjectIsConstructor21 _JSObjectIsFunction22 _JSObjectMake23 _JSObjectMakeConstructor24 _JSObjectMakeFunction25 _JSObjectMakeFunctionWithCallback26 _JSObjectSetPrivate27 _JSObjectSetProperty28 _JSObjectSetPropertyAtIndex29 _JSObjectSetPrototype30 _JSPropertyNameAccumulatorAddName31 _JSPropertyNameArrayGetCount32 _JSPropertyNameArrayGetNameAtIndex33 _JSPropertyNameArrayRelease34 _JSPropertyNameArrayRetain35 _JSStringCopyCFString36 _JSStringCreateWithCFString37 _JSStringCreateWithCharacters38 _JSStringCreateWithUTF8CString39 _JSStringGetCharactersPtr40 _JSStringGetLength41 _JSStringGetMaximumUTF8CStringSize42 _JSStringGetUTF8CString43 _JSStringIsEqual44 _JSStringIsEqualToUTF8CString45 _JSStringRelease46 _JSStringRetain47 _JSValueGetType48 _JSValueIsBoolean49 _JSValueIsEqual50 _JSValueIsInstanceOfConstructor51 _JSValueIsNull52 _JSValueIsNumber53 _JSValueIsObject54 _JSValueIsObjectOfClass55 _JSValueIsStrictEqual56 _JSValueIsString57 _JSValueIsUndefined58 _JSValueMakeBoolean59 _JSValueMakeNull60 _JSValueMakeNumber61 _JSValueMakeString62 _JSValueMakeUndefined63 _JSValueProtect64 _JSValueToBoolean65 _JSValueToNumber66 _JSValueToObject67 _JSValueToStringCopy68 _JSValueUnprotect69 _WTFLog70 _WTFLogVerbose71 _WTFReportArgumentAssertionFailure72 _WTFReportAssertionFailure73 _WTFReportAssertionFailureWithMessage74 _WTFReportError75 _WTFReportFatalError76 1 __Z12jsRegExpFreeP8JSRegExp 77 2 __Z15jsRegExpCompilePKti24JSRegExpIgnoreCaseOption23JSRegExpMultilineOptionPjPPKc … … 113 38 __ZN3KJS13ArrayInstance4infoE 114 39 __ZN3KJS13CodeGenerator21setDumpsGeneratedCodeEb 40 __ZN3KJS13jsOwnedStringERKNS_7UStringE 115 41 __ZN3KJS13StatementNode6setLocEii 116 __ZN3KJS13jsOwnedStringERKNS_7UStringE117 42 __ZN3KJS14JSGlobalObject10globalExecEv 118 43 __ZN3KJS14JSGlobalObject12defineGetterEPNS_9ExecStateERKNS_10IdentifierEPNS_8JSObjectE … … 128 53 __ZN3KJS14StringInstance14deletePropertyEPNS_9ExecStateERKNS_10IdentifierE 129 54 __ZN3KJS14StringInstance16getPropertyNamesEPNS_9ExecStateERNS_17PropertyNameArrayE 55 __ZN3KJS14StringInstance18getOwnPropertySlotEPNS_9ExecStateEjRNS_12PropertySlotE 130 56 __ZN3KJS14StringInstance18getOwnPropertySlotEPNS_9ExecStateERKNS_10IdentifierERNS_12PropertySlotE 131 __ZN3KJS14StringInstance18getOwnPropertySlotEPNS_9ExecStateEjRNS_12PropertySlotE132 57 __ZN3KJS14StringInstance3putEPNS_9ExecStateERKNS_10IdentifierEPNS_7JSValueE 133 58 __ZN3KJS14StringInstance4infoE … … 140 65 __ZN3KJS16ParserRefCounted5derefEv 141 66 __ZN3KJS17PropertyNameArray3addEPNS_7UString3RepE 67 __ZN3KJS17PrototypeFunctionC1EPNS_9ExecStateEiRKNS_10IdentifierEPFPNS_7JSValueES2_PNS_8JSObjectERKNS_4ListEE 142 68 __ZN3KJS17PrototypeFunctionC1EPNS_9ExecStateEPNS_17FunctionPrototypeEiRKNS_10IdentifierEPFPNS_7JSValueES2_PNS_8JSObjectERKNS_4ListEE 143 __ZN3KJS17PrototypeFunctionC1EPNS_9ExecStateEiRKNS_10IdentifierEPFPNS_7JSValueES2_PNS_8JSObjectERKNS_4ListEE144 69 __ZN3KJS17RegisterFileStack20allocateRegisterFileEmPS0_ 70 __ZN3KJS19initializeThreadingEv 145 71 __ZN3KJS19InternalFunctionImp11getCallDataERNS_8CallDataE 146 72 __ZN3KJS19InternalFunctionImp4infoE 147 73 __ZN3KJS19InternalFunctionImpC2EPNS_17FunctionPrototypeERKNS_10IdentifierE 148 __ZN3KJS19initializeThreadingEv149 74 __ZN3KJS23objectProtoFuncToStringEPNS_9ExecStateEPNS_8JSObjectERKNS_4ListE 150 75 __ZN3KJS4List15expandAndAppendEPNS_7JSValueE 151 76 __ZN3KJS4List7markSetEv 77 __ZN3KJS5equalEPKNS_7UString3RepES3_ 152 78 __ZN3KJS6JSCell11getCallDataERNS_8CallDataE 153 79 __ZN3KJS6JSCell16getConstructDataERNS_13ConstructDataE 80 __ZN3KJS6JSCell18getOwnPropertySlotEPNS_9ExecStateEjRNS_12PropertySlotE 154 81 __ZN3KJS6JSCell18getOwnPropertySlotEPNS_9ExecStateERKNS_10IdentifierERNS_12PropertySlotE 155 __ZN3KJS6JSCell 18getOwnPropertySlotEPNS_9ExecStateEjRNS_12PropertySlotE82 __ZN3KJS6JSCell3putEPNS_9ExecStateEjPNS_7JSValueE 156 83 __ZN3KJS6JSCell3putEPNS_9ExecStateERKNS_10IdentifierEPNS_7JSValueE 157 __ZN3KJS6JSCell3putEPNS_9ExecStateEjPNS_7JSValueE158 84 __ZN3KJS6JSCell9getObjectEv 159 85 __ZN3KJS6JSCellnwEm … … 167 93 __ZN3KJS6parserEv 168 94 __ZN3KJS6strtodEPKcPPc 95 __ZN3KJS7CStringaSERKS0_ 169 96 __ZN3KJS7CStringD1Ev 170 __ZN3KJS7CStringaSERKS0_171 97 __ZN3KJS7Machine13dumpCallFrameEPKNS_9CodeBlockEPNS_14ScopeChainNodeEPNS_12RegisterFileEPKNS_8RegisterE 172 98 __ZN3KJS7UString3Rep11computeHashEPKti … … 176 102 __ZN3KJS7UString6appendEPKc 177 103 __ZN3KJS7UString6appendERKS0_ 104 __ZN3KJS7UStringaSEPKc 178 105 __ZN3KJS7UStringC1EPKc 179 106 __ZN3KJS7UStringC1EPKti 180 107 __ZN3KJS7UStringC1ERKS0_S2_ 181 __ZN3KJS7UStringaSEPKc182 108 __ZN3KJS8Debugger6attachEPNS_14JSGlobalObjectE 183 109 __ZN3KJS8Debugger6detachEPNS_14JSGlobalObjectE … … 191 117 __ZN3KJS8JSObject12removeDirectERKNS_10IdentifierE 192 118 __ZN3KJS8JSObject14callAsFunctionEPNS_9ExecStateEPS0_RKNS_4ListE 119 __ZN3KJS8JSObject14deletePropertyEPNS_9ExecStateEj 193 120 __ZN3KJS8JSObject14deletePropertyEPNS_9ExecStateERKNS_10IdentifierE 194 __ZN3KJS8JSObject14deletePropertyEPNS_9ExecStateEj195 121 __ZN3KJS8JSObject14implementsCallEv 196 122 __ZN3KJS8JSObject16getPropertyNamesEPNS_9ExecStateERNS_17PropertyNameArrayE 197 123 __ZN3KJS8JSObject17putDirectFunctionEPNS_19InternalFunctionImpEi 124 __ZN3KJS8JSObject17putWithAttributesEPNS_9ExecStateEjPNS_7JSValueEj 198 125 __ZN3KJS8JSObject17putWithAttributesEPNS_9ExecStateERKNS_10IdentifierEPNS_7JSValueEj 199 __ZN3KJS8JSObject17putWithAttributesEPNS_9ExecStateEjPNS_7JSValueEj200 126 __ZN3KJS8JSObject18getOwnPropertySlotEPNS_9ExecStateEjRNS_12PropertySlotE 201 127 __ZN3KJS8JSObject18getPrimitiveNumberEPNS_9ExecStateERdRPNS_7JSValueE 202 128 __ZN3KJS8JSObject22fillGetterPropertySlotERNS_12PropertySlotEPPNS_7JSValueE 129 __ZN3KJS8JSObject3putEPNS_9ExecStateEjPNS_7JSValueE 203 130 __ZN3KJS8JSObject3putEPNS_9ExecStateERKNS_10IdentifierEPNS_7JSValueE 204 __ZN3KJS8JSObject3putEPNS_9ExecStateEjPNS_7JSValueE205 131 __ZN3KJS8JSObject4markEv 206 132 __ZN3KJS8JSObject9constructEPNS_9ExecStateERKNS_4ListE 207 133 __ZN3KJS8JSObject9constructEPNS_9ExecStateERKNS_4ListERKNS_10IdentifierERKNS_7UStringEi 134 __ZN3KJS8jsStringEPKc 135 __ZN3KJS8jsStringERKNS_7UStringE 208 136 __ZN3KJS8Profiler13stopProfilingEPNS_9ExecStateERKNS_7UStringE 209 137 __ZN3KJS8Profiler14startProfilingEPNS_9ExecStateERKNS_7UStringE 210 138 __ZN3KJS8Profiler8profilerEv 211 __ZN3KJS8jsStringEPKc212 __ZN3KJS8jsStringERKNS_7UStringE213 139 __ZN3KJS9Collector14allocateNumberEm 214 140 __ZN3KJS9Collector15recordExtraCostEm … … 285 211 __ZNK3KJS7UString8toUInt32EPb 286 212 __ZNK3KJS7UString8toUInt32EPbb 213 __ZNK3KJS8JSObject11hasPropertyEPNS_9ExecStateEj 287 214 __ZNK3KJS8JSObject11hasPropertyEPNS_9ExecStateERKNS_10IdentifierE 288 __ZNK3KJS8JSObject11hasPropertyEPNS_9ExecStateEj289 215 __ZNK3KJS8JSObject12defaultValueEPNS_9ExecStateENS_6JSTypeE 290 216 __ZNK3KJS8JSObject12toThisObjectEPNS_9ExecStateE … … 309 235 __ZTVN3KJS8JSObjectE 310 236 __ZTVN3KJS9NumberImpE 237 _JSCheckScriptSyntax 238 _JSClassCreate 239 _JSClassRelease 240 _JSClassRetain 241 _JSContextGetGlobalObject 311 242 _jscore_collector_introspection 312 243 _jscore_fastmalloc_introspection 244 _JSEvaluateScript 245 _JSGarbageCollect 246 _JSGlobalContextCreate 247 _JSGlobalContextRelease 248 _JSGlobalContextRetain 249 _JSObjectCallAsConstructor 250 _JSObjectCallAsFunction 251 _JSObjectCopyPropertyNames 252 _JSObjectDeleteProperty 253 _JSObjectGetPrivate 254 _JSObjectGetProperty 255 _JSObjectGetPropertyAtIndex 256 _JSObjectGetPrototype 257 _JSObjectHasProperty 258 _JSObjectIsConstructor 259 _JSObjectIsFunction 260 _JSObjectMake 261 _JSObjectMakeConstructor 262 _JSObjectMakeFunction 263 _JSObjectMakeFunctionWithCallback 264 _JSObjectSetPrivate 265 _JSObjectSetProperty 266 _JSObjectSetPropertyAtIndex 267 _JSObjectSetPrototype 268 _JSPropertyNameAccumulatorAddName 269 _JSPropertyNameArrayGetCount 270 _JSPropertyNameArrayGetNameAtIndex 271 _JSPropertyNameArrayRelease 272 _JSPropertyNameArrayRetain 273 _JSStringCopyCFString 274 _JSStringCreateWithCFString 275 _JSStringCreateWithCharacters 276 _JSStringCreateWithUTF8CString 277 _JSStringGetCharactersPtr 278 _JSStringGetLength 279 _JSStringGetMaximumUTF8CStringSize 280 _JSStringGetUTF8CString 281 _JSStringIsEqual 282 _JSStringIsEqualToUTF8CString 283 _JSStringRelease 284 _JSStringRetain 285 _JSValueGetType 286 _JSValueIsBoolean 287 _JSValueIsEqual 288 _JSValueIsInstanceOfConstructor 289 _JSValueIsNull 290 _JSValueIsNumber 291 _JSValueIsObject 292 _JSValueIsObjectOfClass 293 _JSValueIsStrictEqual 294 _JSValueIsString 295 _JSValueIsUndefined 296 _JSValueMakeBoolean 297 _JSValueMakeNull 298 _JSValueMakeNumber 299 _JSValueMakeString 300 _JSValueMakeUndefined 301 _JSValueProtect 302 _JSValueToBoolean 303 _JSValueToNumber 304 _JSValueToObject 305 _JSValueToStringCopy 306 _JSValueUnprotect 313 307 _kJSClassDefinitionEmpty 314 308 _releaseFastMallocFreeMemory 309 _WTFLog 310 _WTFLogVerbose 311 _WTFReportArgumentAssertionFailure 312 _WTFReportAssertionFailure 313 _WTFReportAssertionFailureWithMessage 314 _WTFReportError 315 _WTFReportFatalError -
trunk/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj
r34273 r34361 214 214 95742F650DD11F5A000917FB /* Profile.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 95742F630DD11F5A000917FB /* Profile.cpp */; }; 215 215 95742F660DD11F5A000917FB /* Profile.h in Headers */ = {isa = PBXBuildFile; fileRef = 95742F640DD11F5A000917FB /* Profile.h */; settings = {ATTRIBUTES = (Private, ); }; }; 216 958D85830DC93230008ABF27 /* StrHash.h in Headers */ = {isa = PBXBuildFile; fileRef = 958D85820DC93230008ABF27 /* StrHash.h */; settings = {ATTRIBUTES = (Private, ); }; };217 216 95AB83420DA4322500BC83F3 /* Profiler.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 95AB832E0DA42CAD00BC83F3 /* Profiler.cpp */; }; 218 217 95AB83480DA432EB00BC83F3 /* Profiler.h in Headers */ = {isa = PBXBuildFile; fileRef = 95AB832F0DA42CAD00BC83F3 /* Profiler.h */; settings = {ATTRIBUTES = (Private, ); }; }; … … 560 559 95742F630DD11F5A000917FB /* Profile.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Profile.cpp; path = profiler/Profile.cpp; sourceTree = "<group>"; }; 561 560 95742F640DD11F5A000917FB /* Profile.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Profile.h; path = profiler/Profile.h; sourceTree = "<group>"; }; 562 958D85820DC93230008ABF27 /* StrHash.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StrHash.h; sourceTree = "<group>"; };563 561 95AB832E0DA42CAD00BC83F3 /* Profiler.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Profiler.cpp; path = profiler/Profiler.cpp; sourceTree = "<group>"; }; 564 562 95AB832F0DA42CAD00BC83F3 /* Profiler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Profiler.h; path = profiler/Profiler.h; sourceTree = "<group>"; }; … … 959 957 6592C316098B7DE10003D4F6 /* Vector.h */, 960 958 6592C317098B7DE10003D4F6 /* VectorTraits.h */, 961 958D85820DC93230008ABF27 /* StrHash.h */,962 959 ); 963 960 path = wtf; … … 1282 1279 E1B7C8BE0DA3A3360074B0DC /* ThreadSpecific.h in Headers */, 1283 1280 06D358B20DAADA93003B174E /* MainThread.h in Headers */, 1284 958D85830DC93230008ABF27 /* StrHash.h in Headers */,1285 1281 95742F660DD11F5A000917FB /* Profile.h in Headers */, 1286 1282 5DE3D0F50DD8DDFB00468714 /* WebKitAvailability.h in Headers */, -
trunk/JavaScriptCore/kjs/identifier.cpp
r32799 r34361 29 29 #include <wtf/FastMalloc.h> 30 30 #include <wtf/HashSet.h> 31 #include <wtf/StrHash.h>32 31 #if USE(MULTIPLE_THREADS) 33 32 #include <wtf/ThreadSpecific.h> … … 112 111 return false; 113 112 const UChar *d = r->data(); 114 for (int i = 0; i != length; ++i)115 if (d[i] != s[i])116 return false;117 return true;118 }119 120 bool Identifier::equal(const UString::Rep *r, const UString::Rep *b)121 {122 int length = r->len;123 if (length != b->len)124 return false;125 const UChar *d = r->data();126 const UChar *s = b->data();127 113 for (int i = 0; i != length; ++i) 128 114 if (d[i] != s[i]) -
trunk/JavaScriptCore/kjs/identifier.h
r32222 r34361 66 66 static bool equal(const UString::Rep*, const char*); 67 67 static bool equal(const UString::Rep*, const UChar*, int length); 68 static bool equal(const UString::Rep* , const UString::Rep*);68 static bool equal(const UString::Rep* a, const UString::Rep* b) { return KJS::equal(a, b); } 69 69 70 70 static PassRefPtr<UString::Rep> add(const char*); -
trunk/JavaScriptCore/kjs/ustring.cpp
r33941 r34361 1316 1316 } 1317 1317 1318 bool equal(const UString::Rep* r, const UString::Rep* b) 1319 { 1320 int length = r->len; 1321 if (length != b->len) 1322 return false; 1323 const UChar* d = r->data(); 1324 const UChar* s = b->data(); 1325 for (int i = 0; i != length; ++i) 1326 if (d[i] != s[i]) 1327 return false; 1328 return true; 1329 } 1330 1318 1331 CString UString::UTF8String(bool strict) const 1319 1332 { -
trunk/JavaScriptCore/kjs/ustring.h
r33941 r34361 382 382 int compare(const UString &, const UString &); 383 383 384 bool equal(const UString::Rep*, const UString::Rep*); 385 386 384 387 inline UString::UString() 385 388 : m_rep(&Rep::null) … … 430 433 } 431 434 432 } // namespace 435 } // namespace KJS 436 437 438 namespace WTF { 439 440 template<typename T> struct DefaultHash; 441 template<typename T> struct StrHash; 442 443 template<> struct StrHash<KJS::UString::Rep*> { 444 static unsigned hash(const KJS::UString::Rep* key) { return key->hash(); } 445 static bool equal(const KJS::UString::Rep* a, const KJS::UString::Rep* b) { return KJS::equal(a, b); } 446 static const bool safeToCompareToEmptyOrDeleted = false; 447 }; 448 449 template<> struct StrHash<RefPtr<KJS::UString::Rep> > : public StrHash<KJS::UString::Rep*> { 450 using StrHash<KJS::UString::Rep*>::hash; 451 static unsigned hash(const RefPtr<KJS::UString::Rep>& key) { return key->hash(); } 452 using StrHash<KJS::UString::Rep*>::equal; 453 static bool equal(const RefPtr<KJS::UString::Rep>& a, const RefPtr<KJS::UString::Rep>& b) { return KJS::equal(a.get(), b.get()); } 454 static bool equal(const KJS::UString::Rep* a, const RefPtr<KJS::UString::Rep>& b) { return KJS::equal(a, b.get()); } 455 static bool equal(const RefPtr<KJS::UString::Rep>& a, const KJS::UString::Rep* b) { return KJS::equal(a.get(), b); } 456 457 static const bool safeToCompareToEmptyOrDeleted = false; 458 }; 459 460 template<> struct DefaultHash<KJS::UString::Rep*> { 461 typedef StrHash<KJS::UString::Rep*> Hash; 462 }; 463 464 template<> struct DefaultHash<RefPtr<KJS::UString::Rep> > { 465 typedef StrHash<RefPtr<KJS::UString::Rep> > Hash; 466 }; 467 } // namespace WTF 433 468 434 469 #endif -
trunk/JavaScriptCore/profiler/ProfileNode.h
r34310 r34361 34 34 #include <wtf/RefCounted.h> 35 35 #include <wtf/RefPtr.h> 36 #include <wtf/StrHash.h>37 36 38 37 namespace KJS {
Note:
See TracChangeset
for help on using the changeset viewer.