Changeset 34957 in webkit for trunk/JavaScriptCore
- Timestamp:
- Jul 2, 2008, 10:40:29 AM (17 years ago)
- Location:
- trunk/JavaScriptCore
- Files:
-
- 1 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/ChangeLog
r34954 r34957 1 2008-07-02 Kevin McCullough <[email protected]> 2 3 Reviewed by Dan. 4 5 Broke CallIdentifier out into its own file. I did this because it's 6 going to grow a lot soon and I wanted this to be a separate patch. 7 8 * JavaScriptCore.xcodeproj/project.pbxproj: 9 * profiler/CallIdentifier.h: Added. 10 (KJS::CallIdentifier::CallIdentifier): 11 (KJS::CallIdentifier::operator==): 12 (KJS::CallIdentifier::operator!=): 13 (KJS::CallIdentifier::operator const char* ): 14 (KJS::CallIdentifier::toString): 15 * profiler/ProfileNode.h: 16 1 17 2008-07-02 Simon Hausmann <[email protected]> 2 18 -
trunk/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj
r34937 r34957 87 87 95AB83420DA4322500BC83F3 /* Profiler.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 95AB832E0DA42CAD00BC83F3 /* Profiler.cpp */; }; 88 88 95AB83560DA43C3000BC83F3 /* ProfileNode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 95AB83540DA43B4400BC83F3 /* ProfileNode.cpp */; }; 89 95E3BC050E1AE68200B2D1C1 /* CallIdentifier.h in Headers */ = {isa = PBXBuildFile; fileRef = 95E3BC040E1AE68200B2D1C1 /* CallIdentifier.h */; settings = {ATTRIBUTES = (Private, ); }; }; 89 90 A72700900DAC6BBC00E548D7 /* JSNotAnObject.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A72700780DAC605600E548D7 /* JSNotAnObject.cpp */; }; 90 91 A72701B60DADE94900E548D7 /* ExceptionHelpers.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A72701B40DADE94900E548D7 /* ExceptionHelpers.cpp */; }; … … 577 578 95AB83550DA43B4400BC83F3 /* ProfileNode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ProfileNode.h; path = profiler/ProfileNode.h; sourceTree = "<group>"; }; 578 579 95C18D3E0C90E7EF00E72F73 /* JSRetainPtr.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSRetainPtr.h; sourceTree = "<group>"; }; 580 95E3BC040E1AE68200B2D1C1 /* CallIdentifier.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CallIdentifier.h; path = profiler/CallIdentifier.h; sourceTree = "<group>"; }; 579 581 A72700770DAC605600E548D7 /* JSNotAnObject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSNotAnObject.h; sourceTree = "<group>"; }; 580 582 A72700780DAC605600E548D7 /* JSNotAnObject.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSNotAnObject.cpp; sourceTree = "<group>"; }; … … 1206 1208 isa = PBXGroup; 1207 1209 children = ( 1210 95E3BC040E1AE68200B2D1C1 /* CallIdentifier.h */, 1208 1211 95AB83540DA43B4400BC83F3 /* ProfileNode.cpp */, 1209 1212 95AB83550DA43B4400BC83F3 /* ProfileNode.h */, … … 1419 1422 BC02E98D0E183E38000F9297 /* ErrorInstance.h in Headers */, 1420 1423 BC1166020E1997B4008066DD /* DateInstance.h in Headers */, 1424 95E3BC050E1AE68200B2D1C1 /* CallIdentifier.h in Headers */, 1421 1425 BC11667B0E199C05008066DD /* InternalFunction.h in Headers */, 1422 1426 BC1167DA0E19BCC9008066DD /* JSCell.h in Headers */, -
trunk/JavaScriptCore/profiler/Profile.cpp
r34800 r34957 99 99 currentNode = next; 100 100 101 if (currentNode->callIdentifier(). name != "profile")101 if (currentNode->callIdentifier().m_name != "profile") 102 102 return; 103 103 … … 118 118 currentNode = next; 119 119 120 if (currentNode->callIdentifier(). name != "profileEnd")120 if (currentNode->callIdentifier().m_name != "profileEnd") 121 121 return; 122 122 -
trunk/JavaScriptCore/profiler/ProfileNode.h
r34778 r34957 30 30 #define ProfileNode_h 31 31 32 #include <kjs/ustring.h> 32 #include "CallIdentifier.h" 33 33 34 #include <wtf/Vector.h> 34 35 #include <wtf/RefCounted.h> … … 41 42 typedef Vector<RefPtr<ProfileNode> >::const_iterator StackIterator; 42 43 typedef HashCountedSet<UString::Rep*> FunctionCallHashCount; 43 44 struct CallIdentifier {45 UString name;46 UString url;47 unsigned lineNumber;48 49 CallIdentifier(UString name, UString url, int lineNumber)50 : name(name)51 , url(url)52 , lineNumber(lineNumber)53 {54 }55 56 CallIdentifier(const CallIdentifier& ci)57 : name(ci.name)58 , url(ci.url)59 , lineNumber(ci.lineNumber)60 {61 }62 63 inline bool operator==(const CallIdentifier& ci) const { return ci.lineNumber == lineNumber && ci.name == name && ci.url == url; }64 inline bool operator!=(const CallIdentifier& ci) const { return !(*this == ci); }65 66 #ifndef NDEBUG67 operator const char* () const { return name.UTF8String().c_str(); }68 const char* toString() const { return *this; }69 #endif70 };71 44 72 45 class ProfileNode : public RefCounted<ProfileNode> { … … 85 58 ProfileNode* nextSibling() const { return m_nextSibling; } 86 59 void setNextSibling(ProfileNode* nextSibling) { m_nextSibling = nextSibling; } 87 UString functionName() const { return m_callIdentifier. name; }88 UString url() const { return m_callIdentifier. url; }89 unsigned lineNumber() const { return m_callIdentifier. lineNumber; }60 UString functionName() const { return m_callIdentifier.m_name; } 61 UString url() const { return m_callIdentifier.m_url; } 62 unsigned lineNumber() const { return m_callIdentifier.m_lineNumber; } 90 63 91 64 double startTime() const { return m_startTime; }
Note:
See TracChangeset
for help on using the changeset viewer.