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


Ignore:
Timestamp:
Oct 3, 2008, 6:39:43 PM (17 years ago)
Author:
[email protected]
Message:

2008-10-03 Maciej Stachowiak <[email protected]>

Reviewed by Cameron Zwarich.


  • Some code cleanup to how we handle code features.


1) Rename FeatureInfo typedef to CodeFeatures.
2) Rename NodeFeatureInfo template to NodeInfo.
3) Keep CodeFeature bitmask in ScopeNode instead of trying to break it out into individual bools.
4) Rename misleadingly named "needsClosure" method to "containsClosures", which better describes the meaning
of ClosureFeature.
5) Make setUsersArguments() not take an argument since it only goes one way.

  • JavaScriptCore.exp:
  • VM/CodeBlock.h: (JSC::CodeBlock::CodeBlock):
  • kjs/NodeInfo.h:
  • kjs/Parser.cpp: (JSC::Parser::didFinishParsing):
  • kjs/Parser.h: (JSC::Parser::parse):
  • kjs/grammar.y:
  • kjs/nodes.cpp: (JSC::ScopeNode::ScopeNode): (JSC::ProgramNode::ProgramNode): (JSC::ProgramNode::create): (JSC::EvalNode::EvalNode): (JSC::EvalNode::create): (JSC::FunctionBodyNode::FunctionBodyNode): (JSC::FunctionBodyNode::create):
  • kjs/nodes.h: (JSC::ScopeNode::usesEval): (JSC::ScopeNode::containsClosures): (JSC::ScopeNode::usesArguments): (JSC::ScopeNode::setUsesArguments):
File:
1 edited

Legend:

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

    r37184 r37275  
    5353
    5454        void didFinishParsing(SourceElements*, ParserRefCountedData<DeclarationStacks::VarStack>*,
    55                               ParserRefCountedData<DeclarationStacks::FunctionStack>*, bool usesEval, bool needsClosure, bool usesArguments, int lastLine, int numConstants);
     55                              ParserRefCountedData<DeclarationStacks::FunctionStack>*, CodeFeatures features, int lastLine, int numConstants);
    5656
    5757    private:
     
    6464        RefPtr<ParserRefCountedData<DeclarationStacks::VarStack> > m_varDeclarations;
    6565        RefPtr<ParserRefCountedData<DeclarationStacks::FunctionStack> > m_funcDeclarations;
    66         bool m_usesEval;
    67         bool m_needsClosure;
    68         bool m_usesArguments;
     66        CodeFeatures m_features;
    6967        int m_lastLine;
    7068        int m_numConstants;
     
    8280                                         m_funcDeclarations ? &m_funcDeclarations->data : 0,
    8381                                         *m_source,
    84                                          m_usesEval,
    85                                          m_needsClosure,
    86                                          m_usesArguments,
     82                                         m_features,
    8783                                         m_numConstants);
    8884            result->setLoc(m_source->firstLine(), m_lastLine);
Note: See TracChangeset for help on using the changeset viewer.