Ignore:
Timestamp:
Jun 6, 2008, 9:48:54 AM (17 years ago)
Author:
[email protected]
Message:

2008-06-06 Kevin McCullough <[email protected]>

Reviewed by Adam.

<rdar://problem/5969992> JSProfiler: Remove the recursion limit in the
profiler.

  • Change the remaining functions that do not take arguments, from using recursion to using iteration.
  • JavaScriptCore.exp:
  • profiler/Profile.cpp: (KJS::stopProfiling): (KJS::restoreAll): (KJS::Profile::stopProfiling): Use foreach instead of recursion. (KJS::Profile::restoreAll): Ditto.
  • profiler/Profile.h:
  • profiler/ProfileNode.cpp: Remove recursion. (KJS::ProfileNode::stopProfiling): (KJS::ProfileNode::restore):
  • profiler/ProfileNode.h:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/profiler/Profile.cpp

    r34392 r34402  
    3838const unsigned DEPTH_LIMIT = 1000;
    3939
     40static void stopProfiling(ProfileNode* n) { n->stopProfiling(); }
     41static void restoreAll(ProfileNode* n) { n->restore(); }
     42
    4043Profile::Profile(const UString& title, ExecState* originatingGlobalExec, unsigned pageGroupIdentifier)
    4144    : m_title(title)
     
    5457    m_currentNode = 0;
    5558    m_originatingGlobalExec = 0;
    56     m_head->stopProfiling();
     59    forEach(KJS::stopProfiling);
    5760    m_depth = 0;
    5861}
     
    8790}
    8891
    89 void Profile::forEach(UnaryFunction function) {
     92void Profile::forEach(UnaryFunction function)
     93{
    9094
    9195    ProfileNode* currentNode = m_head->firstChild();
     
    99103    }
    100104}
     105
     106void Profile::restoreAll()
     107{
     108    forEach(KJS::restoreAll);
     109}
     110
    101111
    102112#ifndef NDEBUG
Note: See TracChangeset for help on using the changeset viewer.