v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
Loading...
Searching...
No Matches
v8::internal::ExpressionScope< Types > Class Template Reference

#include <expression-scope.h>

Inheritance diagram for v8::internal::ExpressionScope< Types >:
Collaboration diagram for v8::internal::ExpressionScope< Types >:

Public Types

using ParserT = typename Types::Impl
 
using ExpressionT = typename Types::Expression
 

Public Member Functions

 ExpressionScope (const ExpressionScope &)=delete
 
ExpressionScopeoperator= (const ExpressionScope &)=delete
 
VariableProxyNewVariable (const AstRawString *name, int pos=kNoSourcePosition)
 
void MergeVariableList (ScopedList< std::pair< VariableProxy *, int > > *variable_list)
 
VariableDeclare (const AstRawString *name, int pos=kNoSourcePosition)
 
void MarkIdentifierAsAssigned ()
 
void ValidateAsPattern (ExpressionT expression, int begin, int end)
 
void ValidateAsExpression ()
 
void RecordAsyncArrowParametersError (const Scanner::Location &loc, MessageTemplate message)
 
void RecordParameterInitializerError (const Scanner::Location &loc, MessageTemplate message)
 
void RecordThisUse ()
 
void RecordPatternError (const Scanner::Location &loc, MessageTemplate message)
 
void RecordStrictModeParameterError (const Scanner::Location &loc, MessageTemplate message)
 
void RecordDeclarationError (const Scanner::Location &loc, MessageTemplate message)
 
void RecordExpressionError (const Scanner::Location &loc, MessageTemplate message)
 
void RecordNonSimpleParameter ()
 
bool IsCertainlyDeclaration () const
 
int SetInitializers (int variable_index, int peek_position)
 
bool has_possible_arrow_parameter_in_scope_chain () const
 

Protected Types

enum  ScopeType : uint8_t {
  kExpression , kMaybeArrowParameterDeclaration , kMaybeAsyncArrowParameterDeclaration , kParameterDeclaration ,
  kVarDeclaration , kLexicalDeclaration
}
 

Protected Member Functions

ParserTparser () const
 
ExpressionScopeparent () const
 
void Report (const Scanner::Location &loc, MessageTemplate message) const
 
 ExpressionScope (ParserT *parser, ScopeType type)
 
 ~ExpressionScope ()
 
ExpressionParsingScope< Types > * AsExpressionParsingScope ()
 
bool CanBeExpression () const
 
bool CanBeDeclaration () const
 
bool IsVariableDeclaration () const
 
bool IsLexicalDeclaration () const
 
bool IsAsyncArrowHeadParsingScope () const
 
bool IsVarDeclaration () const
 

Private Member Functions

ArrowHeadParsingScope< Types > * AsArrowHeadParsingScope ()
 
ParameterDeclarationParsingScope< Types > * AsParameterDeclarationParsingScope ()
 
VariableDeclarationParsingScope< Types > * AsVariableDeclarationParsingScope ()
 
bool IsArrowHeadParsingScope () const
 
bool IsCertainlyPattern () const
 
bool CanBeParameterDeclaration () const
 
bool CanBeArrowParameterDeclaration () const
 
bool IsCertainlyParameterDeclaration () const
 

Private Attributes

ParserTparser_
 
ExpressionScope< Types > * parent_
 
ScopeType type_
 
bool has_possible_parameter_in_scope_chain_
 
bool has_possible_arrow_parameter_in_scope_chain_
 

Friends

class AccumulationScope< Types >
 
class ExpressionParsingScope< Types >
 

Detailed Description

template<typename Types>
class v8::internal::ExpressionScope< Types >

Definition at line 44 of file expression-scope.h.

Member Typedef Documentation

◆ ExpressionT

template<typename Types >
using v8::internal::ExpressionScope< Types >::ExpressionT = typename Types::Expression

Definition at line 50 of file expression-scope.h.

◆ ParserT

template<typename Types >
using v8::internal::ExpressionScope< Types >::ParserT = typename Types::Impl

Definition at line 49 of file expression-scope.h.

Member Enumeration Documentation

◆ ScopeType

template<typename Types >
enum v8::internal::ExpressionScope::ScopeType : uint8_t
protected
Enumerator
kExpression 
kMaybeArrowParameterDeclaration 
kMaybeAsyncArrowParameterDeclaration 
kParameterDeclaration 
kVarDeclaration 
kLexicalDeclaration 

Definition at line 239 of file expression-scope.h.

Constructor & Destructor Documentation

◆ ExpressionScope() [1/2]

template<typename Types >
v8::internal::ExpressionScope< Types >::ExpressionScope ( const ExpressionScope< Types > & )
delete

◆ ExpressionScope() [2/2]

template<typename Types >
v8::internal::ExpressionScope< Types >::ExpressionScope ( ParserT * parser,
ScopeType type )
inlineprotected

Definition at line 260 of file expression-scope.h.

Here is the call graph for this function:

◆ ~ExpressionScope()

template<typename Types >
v8::internal::ExpressionScope< Types >::~ExpressionScope ( )
inlineprotected

Definition at line 274 of file expression-scope.h.

Member Function Documentation

◆ AsArrowHeadParsingScope()

template<typename Types >
ArrowHeadParsingScope< Types > * v8::internal::ExpressionScope< Types >::AsArrowHeadParsingScope ( )
inlineprivate

Definition at line 310 of file expression-scope.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ AsExpressionParsingScope()

template<typename Types >
ExpressionParsingScope< Types > * v8::internal::ExpressionScope< Types >::AsExpressionParsingScope ( )
inlineprotected

Definition at line 280 of file expression-scope.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ AsParameterDeclarationParsingScope()

template<typename Types >
ParameterDeclarationParsingScope< Types > * v8::internal::ExpressionScope< Types >::AsParameterDeclarationParsingScope ( )
inlineprivate

Definition at line 316 of file expression-scope.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ AsVariableDeclarationParsingScope()

template<typename Types >
VariableDeclarationParsingScope< Types > * v8::internal::ExpressionScope< Types >::AsVariableDeclarationParsingScope ( )
inlineprivate

Definition at line 321 of file expression-scope.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CanBeArrowParameterDeclaration()

template<typename Types >
bool v8::internal::ExpressionScope< Types >::CanBeArrowParameterDeclaration ( ) const
inlineprivate

Definition at line 335 of file expression-scope.h.

Here is the call graph for this function:

◆ CanBeDeclaration()

template<typename Types >
bool v8::internal::ExpressionScope< Types >::CanBeDeclaration ( ) const
inlineprotected

Definition at line 293 of file expression-scope.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CanBeExpression()

template<typename Types >
bool v8::internal::ExpressionScope< Types >::CanBeExpression ( ) const
inlineprotected

Definition at line 289 of file expression-scope.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CanBeParameterDeclaration()

template<typename Types >
bool v8::internal::ExpressionScope< Types >::CanBeParameterDeclaration ( ) const
inlineprivate

Definition at line 331 of file expression-scope.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Declare()

template<typename Types >
Variable * v8::internal::ExpressionScope< Types >::Declare ( const AstRawString * name,
int pos = kNoSourcePosition )
inline

Definition at line 111 of file expression-scope.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ has_possible_arrow_parameter_in_scope_chain()

template<typename Types >
bool v8::internal::ExpressionScope< Types >::has_possible_arrow_parameter_in_scope_chain ( ) const
inline

Definition at line 234 of file expression-scope.h.

◆ IsArrowHeadParsingScope()

template<typename Types >
bool v8::internal::ExpressionScope< Types >::IsArrowHeadParsingScope ( ) const
inlineprivate

Definition at line 326 of file expression-scope.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ IsAsyncArrowHeadParsingScope()

template<typename Types >
bool v8::internal::ExpressionScope< Types >::IsAsyncArrowHeadParsingScope ( ) const
inlineprotected

Definition at line 301 of file expression-scope.h.

Here is the caller graph for this function:

◆ IsCertainlyDeclaration()

template<typename Types >
bool v8::internal::ExpressionScope< Types >::IsCertainlyDeclaration ( ) const
inline

Definition at line 222 of file expression-scope.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ IsCertainlyParameterDeclaration()

template<typename Types >
bool v8::internal::ExpressionScope< Types >::IsCertainlyParameterDeclaration ( ) const
inlineprivate

Definition at line 339 of file expression-scope.h.

Here is the caller graph for this function:

◆ IsCertainlyPattern()

template<typename Types >
bool v8::internal::ExpressionScope< Types >::IsCertainlyPattern ( ) const
inlineprivate

Definition at line 330 of file expression-scope.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ IsLexicalDeclaration()

template<typename Types >
bool v8::internal::ExpressionScope< Types >::IsLexicalDeclaration ( ) const
inlineprotected

Definition at line 300 of file expression-scope.h.

Here is the caller graph for this function:

◆ IsVarDeclaration()

template<typename Types >
bool v8::internal::ExpressionScope< Types >::IsVarDeclaration ( ) const
inlineprotected

Definition at line 304 of file expression-scope.h.

Here is the caller graph for this function:

◆ IsVariableDeclaration()

template<typename Types >
bool v8::internal::ExpressionScope< Types >::IsVariableDeclaration ( ) const
inlineprotected

Definition at line 297 of file expression-scope.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MarkIdentifierAsAssigned()

template<typename Types >
void v8::internal::ExpressionScope< Types >::MarkIdentifierAsAssigned ( )
inline

Definition at line 118 of file expression-scope.h.

Here is the call graph for this function:

◆ MergeVariableList()

template<typename Types >
void v8::internal::ExpressionScope< Types >::MergeVariableList ( ScopedList< std::pair< VariableProxy *, int > > * variable_list)
inline

Definition at line 93 of file expression-scope.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ NewVariable()

template<typename Types >
VariableProxy * v8::internal::ExpressionScope< Types >::NewVariable ( const AstRawString * name,
int pos = kNoSourcePosition )
inline

Definition at line 52 of file expression-scope.h.

Here is the call graph for this function:

◆ operator=()

template<typename Types >
ExpressionScope & v8::internal::ExpressionScope< Types >::operator= ( const ExpressionScope< Types > & )
delete

◆ parent()

template<typename Types >
ExpressionScope * v8::internal::ExpressionScope< Types >::parent ( ) const
inlineprotected

Definition at line 254 of file expression-scope.h.

Here is the caller graph for this function:

◆ parser()

template<typename Types >
ParserT * v8::internal::ExpressionScope< Types >::parser ( ) const
inlineprotected

Definition at line 253 of file expression-scope.h.

Here is the caller graph for this function:

◆ RecordAsyncArrowParametersError()

template<typename Types >
void v8::internal::ExpressionScope< Types >::RecordAsyncArrowParametersError ( const Scanner::Location & loc,
MessageTemplate message )
inline

Definition at line 137 of file expression-scope.h.

Here is the call graph for this function:

◆ RecordDeclarationError()

template<typename Types >
void v8::internal::ExpressionScope< Types >::RecordDeclarationError ( const Scanner::Location & loc,
MessageTemplate message )
inline

Definition at line 199 of file expression-scope.h.

Here is the call graph for this function:

◆ RecordExpressionError()

template<typename Types >
void v8::internal::ExpressionScope< Types >::RecordExpressionError ( const Scanner::Location & loc,
MessageTemplate message )
inline

Definition at line 209 of file expression-scope.h.

Here is the call graph for this function:

◆ RecordNonSimpleParameter()

template<typename Types >
void v8::internal::ExpressionScope< Types >::RecordNonSimpleParameter ( )
inline

Definition at line 217 of file expression-scope.h.

Here is the call graph for this function:

◆ RecordParameterInitializerError()

template<typename Types >
void v8::internal::ExpressionScope< Types >::RecordParameterInitializerError ( const Scanner::Location & loc,
MessageTemplate message )
inline

Definition at line 148 of file expression-scope.h.

Here is the call graph for this function:

◆ RecordPatternError()

template<typename Types >
void v8::internal::ExpressionScope< Types >::RecordPatternError ( const Scanner::Location & loc,
MessageTemplate message )
inline

Definition at line 172 of file expression-scope.h.

Here is the call graph for this function:

◆ RecordStrictModeParameterError()

template<typename Types >
void v8::internal::ExpressionScope< Types >::RecordStrictModeParameterError ( const Scanner::Location & loc,
MessageTemplate message )
inline

Definition at line 182 of file expression-scope.h.

Here is the call graph for this function:

◆ RecordThisUse()

template<typename Types >
void v8::internal::ExpressionScope< Types >::RecordThisUse ( )
inline

Definition at line 162 of file expression-scope.h.

Here is the call graph for this function:

◆ Report()

template<typename Types >
void v8::internal::ExpressionScope< Types >::Report ( const Scanner::Location & loc,
MessageTemplate message ) const
inlineprotected

Definition at line 256 of file expression-scope.h.

Here is the caller graph for this function:

◆ SetInitializers()

template<typename Types >
int v8::internal::ExpressionScope< Types >::SetInitializers ( int variable_index,
int peek_position )
inline

Definition at line 226 of file expression-scope.h.

Here is the call graph for this function:

◆ ValidateAsExpression()

template<typename Types >
void v8::internal::ExpressionScope< Types >::ValidateAsExpression ( )
inline

Definition at line 129 of file expression-scope.h.

Here is the call graph for this function:

◆ ValidateAsPattern()

template<typename Types >
void v8::internal::ExpressionScope< Types >::ValidateAsPattern ( ExpressionT expression,
int begin,
int end )
inline

Definition at line 123 of file expression-scope.h.

Here is the call graph for this function:

Friends And Related Symbol Documentation

◆ AccumulationScope< Types >

template<typename Types >
friend class AccumulationScope< Types >
friend

Definition at line 304 of file expression-scope.h.

◆ ExpressionParsingScope< Types >

template<typename Types >
friend class ExpressionParsingScope< Types >
friend

Definition at line 304 of file expression-scope.h.

Member Data Documentation

◆ has_possible_arrow_parameter_in_scope_chain_

template<typename Types >
bool v8::internal::ExpressionScope< Types >::has_possible_arrow_parameter_in_scope_chain_
private

Definition at line 347 of file expression-scope.h.

◆ has_possible_parameter_in_scope_chain_

template<typename Types >
bool v8::internal::ExpressionScope< Types >::has_possible_parameter_in_scope_chain_
private

Definition at line 346 of file expression-scope.h.

◆ parent_

template<typename Types >
ExpressionScope<Types>* v8::internal::ExpressionScope< Types >::parent_
private

Definition at line 344 of file expression-scope.h.

◆ parser_

template<typename Types >
ParserT* v8::internal::ExpressionScope< Types >::parser_
private

Definition at line 343 of file expression-scope.h.

◆ type_

template<typename Types >
ScopeType v8::internal::ExpressionScope< Types >::type_
private

Definition at line 345 of file expression-scope.h.


The documentation for this class was generated from the following file: