Changeset 29059 in webkit for trunk/JavaScriptCore/kjs/Parser.h


Ignore:
Timestamp:
Jan 1, 2008, 12:43:59 AM (17 years ago)
Author:
Darin Adler
Message:

Reviewed by Oliver.

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.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/kjs/Parser.h

    r28937 r29059  
    8585            return 0;
    8686        }
    87         RefPtr<ParsedNode> node = new ParsedNode(m_sourceElements.release().get(),
    88                                                  m_varDeclarations ? &m_varDeclarations->data : 0,
    89                                                  m_funcDeclarations ? &m_funcDeclarations->data : 0);
     87        RefPtr<ParsedNode> node = ParsedNode::create(m_sourceElements.release().get(),
     88                                                     m_varDeclarations ? &m_varDeclarations->data : 0,
     89                                                     m_funcDeclarations ? &m_funcDeclarations->data : 0);
    9090        m_varDeclarations = 0;
    9191        m_funcDeclarations = 0;
Note: See TracChangeset for help on using the changeset viewer.