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


Ignore:
Timestamp:
Dec 7, 2007, 4:01:13 PM (17 years ago)
Author:
[email protected]
Message:

Reviewed by Sam Weinig.


Refactored parsing of global code: Removed the assumption that
ProgramNode inherits from FunctionBodyNode from the parser.

  • kjs/Parser.cpp: (KJS::Parser::parseProgram): (KJS::Parser::parseFunctionBody): (KJS::Parser::parse):
  • kjs/Parser.h: (KJS::Parser::didFinishParsing):
  • kjs/function.cpp:
  • kjs/grammar.y:
  • kjs/nodes.h:
File:
1 edited

Legend:

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

    r27844 r28540  
    2929#include <wtf/Noncopyable.h>
    3030#include <wtf/RefPtr.h>
     31#include "nodes.h"
    3132
    3233namespace KJS {
     
    4950
    5051        int sourceId() { return m_sourceId; }
    51        
    52         void didFinishParsing(PassRefPtr<ProgramNode>);
     52
     53        void didFinishParsing(SourceElements* sourceElements)
     54        {
     55            m_sourceElements.set(sourceElements);
     56        }
    5357
    5458    private:
     
    6165
    6266        int m_sourceId;
    63         RefPtr<ProgramNode> m_progNode;
     67        OwnPtr<SourceElements> m_sourceElements;
    6468    };
    6569   
Note: See TracChangeset for help on using the changeset viewer.