Reviewed by Oliver.
authordarin@apple.com <darin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 1 Jan 2008 08:43:59 +0000 (08:43 +0000)
committerdarin@apple.com <darin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 1 Jan 2008 08:43:59 +0000 (08:43 +0000)
commitd1551c36b0d6eb23629dd6d896f24d64a1e689da
treee6872497913bc30dd318c15509cfa3595c2d2520
parent0d430ae30f1b006872ea292e69f49ed7e40825dd
    Reviewed by Oliver.

        - http://bugs.webkit.org/show_bug.cgi?id=16684
          eliminate debugger overhead from function body execution

        Speeds SunSpider up 1.003x. That's a small amount, but measurable.

        * JavaScriptCore.exp: Updated.
        * kjs/Parser.h:
        (KJS::Parser::parse): Create the node with a static member function named create() instead
        of using new explicitly.

        * kjs/grammar.y: Changed calls to new FunctionBodyNode to use FunctionBodyNode::create().

        * kjs/nodes.cpp:
        (KJS::ProgramNode::create): Added. Calls new.
        (KJS::EvalNode::create): Ditto.
        (KJS::FunctionBodyNode::create): Ditto, but creates FunctionBodyNodeWithDebuggerHooks
        when a debugger is present.
        (KJS::FunctionBodyNode::execute): Removed debugger hooks.
        (KJS::FunctionBodyNodeWithDebuggerHooks::FunctionBodyNodeWithDebuggerHooks): Added.
        (KJS::FunctionBodyNodeWithDebuggerHooks::execute): Calls the debugger, then the code,
        then the debugger again.

        * kjs/nodes.h: Added create functions, made the constructors private and protected.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@29059 268f45cc-cd09-0410-ab3c-d52691b4dbfc
JavaScriptCore/ChangeLog
JavaScriptCore/JavaScriptCore.exp
JavaScriptCore/kjs/Parser.h
JavaScriptCore/kjs/grammar.y
JavaScriptCore/kjs/nodes.cpp
JavaScriptCore/kjs/nodes.h