Changeset 28608 in webkit for trunk/JavaScriptCore/kjs/nodes.h
- Timestamp:
- Dec 10, 2007, 9:47:41 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/kjs/nodes.h
r28551 r28608 1950 1950 }; 1951 1951 1952 // inherited by ProgramNode1953 class FunctionBodyNode : public BlockNode {1954 public:1955 FunctionBodyNode(SourceElements* children) KJS_FAST_CALL; 1952 class ScopeNode : public BlockNode { 1953 public: 1954 ScopeNode(SourceElements*) KJS_FAST_CALL; 1955 1956 1956 int sourceId() KJS_FAST_CALL { return m_sourceId; } 1957 1957 const UString& sourceURL() KJS_FAST_CALL { return m_sourceURL; } 1958 1958 1959 protected: 1960 void initializeDeclarationStacks(ExecState*) KJS_FAST_CALL; 1961 1962 DeclarationStacks::VarStack m_varStack; 1963 DeclarationStacks::FunctionStack m_functionStack; 1964 1965 private: 1966 UString m_sourceURL; 1967 int m_sourceId; 1968 }; 1969 1970 class ProgramNode : public ScopeNode { 1971 public: 1972 ProgramNode(SourceElements*) KJS_FAST_CALL; 1959 1973 virtual Completion execute(ExecState*) KJS_FAST_CALL; 1960 1974 1961 SymbolTable& symbolTable() { return m_symbolTable; } 1962 1963 void addParam(const Identifier& ident) KJS_FAST_CALL; 1964 size_t numParams() const KJS_FAST_CALL { return m_parameters.size(); } 1965 Identifier paramName(size_t pos) const KJS_FAST_CALL { return m_parameters[pos]; } 1975 private: 1976 ALWAYS_INLINE void processDeclarations(ExecState*) KJS_FAST_CALL; 1977 }; 1978 1979 class EvalNode : public ScopeNode { 1980 public: 1981 EvalNode(SourceElements*) KJS_FAST_CALL; 1982 virtual Completion execute(ExecState*) KJS_FAST_CALL; 1983 1984 private: 1985 ALWAYS_INLINE void processDeclarations(ExecState*) KJS_FAST_CALL; 1986 }; 1987 1988 class FunctionBodyNode : public ScopeNode { 1989 public: 1990 FunctionBodyNode(SourceElements*) KJS_FAST_CALL; 1991 1992 virtual Completion execute(ExecState*) KJS_FAST_CALL; 1993 1994 SymbolTable& symbolTable() KJS_FAST_CALL { return m_symbolTable; } 1995 1996 Vector<Identifier>& parameters() KJS_FAST_CALL { return m_parameters; } 1966 1997 UString paramString() const KJS_FAST_CALL; 1967 Vector<Identifier>& parameters() KJS_FAST_CALL { return m_parameters; } 1968 ALWAYS_INLINE void processDeclarations(ExecState*); 1969 ALWAYS_INLINE void processDeclarationsForFunctionCode(ExecState*); 1970 ALWAYS_INLINE void processDeclarationsForProgramCode(ExecState*); 1971 private: 1972 UString m_sourceURL; 1973 int m_sourceId; 1974 1975 void initializeDeclarationStacks(ExecState*); 1976 bool m_initializedDeclarationStacks; 1977 1978 void initializeSymbolTable(); 1979 bool m_initializedSymbolTable; 1980 1981 void optimizeVariableAccess(); 1982 bool m_optimizedResolveNodes; 1983 1984 // Properties that will go into the ActivationImp's local storage. (Used for initializing the ActivationImp.) 1985 DeclarationStacks::VarStack m_varStack; 1986 DeclarationStacks::FunctionStack m_functionStack; 1998 1999 private: 2000 void initializeSymbolTable() KJS_FAST_CALL; 2001 void optimizeVariableAccess() KJS_FAST_CALL; 2002 ALWAYS_INLINE void processDeclarations(ExecState*) KJS_FAST_CALL; 2003 2004 bool m_initialized; 1987 2005 Vector<Identifier> m_parameters; 1988 1989 // Mapping from property name -> local storage index. (Used once to transform the AST, and subsequently for residual slow case lookups.)1990 2006 SymbolTable m_symbolTable; 1991 2007 }; 1992 2008 1993 2009 class FuncExprNode : public ExpressionNode { 1994 2010 public: 1995 2011 FuncExprNode(const Identifier& i, FunctionBodyNode* b, ParameterNode* p = 0) KJS_FAST_CALL … … 2086 2102 }; 2087 2103 2088 class ProgramNode : public FunctionBodyNode {2089 public:2090 ProgramNode(SourceElements* children) KJS_FAST_CALL;2091 };2092 2093 2104 struct ElementList { 2094 2105 ElementNode* head;
Note:
See TracChangeset
for help on using the changeset viewer.