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


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.cpp

    r37184 r37275  
    6868
    6969void Parser::didFinishParsing(SourceElements* sourceElements, ParserRefCountedData<DeclarationStacks::VarStack>* varStack,
    70                               ParserRefCountedData<DeclarationStacks::FunctionStack>* funcStack, bool usesEval, bool needsClosure, bool usesArguments, int lastLine, int numConstants)
     70                              ParserRefCountedData<DeclarationStacks::FunctionStack>* funcStack, CodeFeatures features, int lastLine, int numConstants)
    7171{
    7272    m_sourceElements = sourceElements;
    7373    m_varDeclarations = varStack;
    7474    m_funcDeclarations = funcStack;
    75     m_usesEval = usesEval;
    76     m_needsClosure = needsClosure;
    77     m_usesArguments = usesArguments;
     75    m_features = features;
    7876    m_lastLine = lastLine;
    7977    m_numConstants = numConstants;
Note: See TracChangeset for help on using the changeset viewer.