]> git.saurik.com Git - apple/javascriptcore.git/blobdiff - profiler/ProfileGenerator.cpp
JavaScriptCore-1218.0.1.tar.gz
[apple/javascriptcore.git] / profiler / ProfileGenerator.cpp
index 5db38bca8d56a5ef01d28a5f942b0fd93027fbe2..d240aff349213a4810af970a5416a6311576477d 100644 (file)
 #include "JSStringRef.h"
 #include "JSFunction.h"
 #include "Interpreter.h"
+#include "LegacyProfiler.h"
+#include "Operations.h"
 #include "Profile.h"
-#include "Profiler.h"
 #include "Tracing.h"
 
 namespace JSC {
 
 static const char* NonJSExecution = "(idle)";
 
-PassRefPtr<ProfileGenerator> ProfileGenerator::create(ExecState* exec, const UString& title, unsigned uid)
+PassRefPtr<ProfileGenerator> ProfileGenerator::create(ExecState* exec, const String& title, unsigned uid)
 {
     return adoptRef(new ProfileGenerator(exec, title, uid));
 }
 
-ProfileGenerator::ProfileGenerator(ExecState* exec, const UString& title, unsigned uid)
+ProfileGenerator::ProfileGenerator(ExecState* exec, const String& title, unsigned uid)
     : m_origin(exec ? exec->lexicalGlobalObject() : 0)
     , m_profileGroup(exec ? exec->lexicalGlobalObject()->profileGroup() : 0)
 {
@@ -59,15 +60,15 @@ void ProfileGenerator::addParentForConsoleStart(ExecState* exec)
 {
     int lineNumber;
     intptr_t sourceID;
-    UString sourceURL;
+    String sourceURL;
     JSValue function;
 
     exec->interpreter()->retrieveLastCaller(exec, lineNumber, sourceID, sourceURL, function);
-    m_currentNode = ProfileNode::create(exec, Profiler::createCallIdentifier(exec, function ? function.toThisObject(exec) : 0, sourceURL, lineNumber), m_head.get(), m_head.get());
+    m_currentNode = ProfileNode::create(exec, LegacyProfiler::createCallIdentifier(exec, function ? function.toThisObject(exec) : 0, sourceURL, lineNumber), m_head.get(), m_head.get());
     m_head->insertNode(m_currentNode.get());
 }
 
-const UString& ProfileGenerator::title() const
+const String& ProfileGenerator::title() const
 {
     return m_profile->title();
 }
@@ -135,7 +136,7 @@ void ProfileGenerator::stopProfiling()
     m_currentNode = m_currentNode->parent();
 
    if (double headSelfTime = m_head->selfTime()) {
-        RefPtr<ProfileNode> idleNode = ProfileNode::create(0, CallIdentifier(NonJSExecution, UString(), 0), m_head.get(), m_head.get());
+        RefPtr<ProfileNode> idleNode = ProfileNode::create(0, CallIdentifier(NonJSExecution, String(), 0), m_head.get(), m_head.get());
 
         idleNode->setTotalTime(headSelfTime);
         idleNode->setSelfTime(headSelfTime);