V8 API Reference, 7.2.502.16 (for Deno 0.2.4)
v8::internal::PreParser Class Reference
Inheritance diagram for v8::internal::PreParser:
v8::internal::ParserBase< PreParser >

Public Types

enum  PreParseResult { kPreParseStackOverflow, kPreParseAbort, kPreParseNotIdentifiableError, kPreParseSuccess }
 
typedef PreParserIdentifier Identifier
 
typedef PreParserExpression Expression
 
typedef PreParserStatement Statement
 
- Public Types inherited from v8::internal::ParserBase< PreParser >
typedef ParserTypes< PreParserTypes
 
typedef v8::internal::ExpressionClassifier< TypesExpressionClassifier
 
typedef Types::Block BlockT
 
typedef Types::BreakableStatement BreakableStatementT
 
typedef Types::ClassLiteralProperty ClassLiteralPropertyT
 
typedef Types::ClassPropertyList ClassPropertyListT
 
typedef Types::Expression ExpressionT
 
typedef Types::ExpressionList ExpressionListT
 
typedef Types::FormalParameters FormalParametersT
 
typedef Types::ForStatement ForStatementT
 
typedef Types::FunctionLiteral FunctionLiteralT
 
typedef Types::Identifier IdentifierT
 
typedef Types::IterationStatement IterationStatementT
 
typedef Types::ObjectLiteralProperty ObjectLiteralPropertyT
 
typedef Types::ObjectPropertyList ObjectPropertyListT
 
typedef Types::RewritableExpression RewritableExpressionT
 
typedef Types::Statement StatementT
 
typedef Types::StatementList StatementListT
 
typedef Types::Suspend SuspendExpressionT
 
typedef Types::Factory FactoryT
 
typedef Types::FuncNameInferrer FuncNameInferrer
 
typedef Types::FuncNameInferrer::State FuncNameInferrerState
 
typedef Types::SourceRange SourceRange
 
typedef Types::SourceRangeScope SourceRangeScope
 
typedef Types::Target TargetT
 
typedef Types::TargetScope TargetScopeT
 

Public Member Functions

 PreParser (Zone *zone, Scanner *scanner, uintptr_t stack_limit, AstValueFactory *ast_value_factory, PendingCompilationErrorHandler *pending_error_handler, RuntimeCallStats *runtime_call_stats, Logger *logger, int script_id=-1, bool parsing_module=false, bool parsing_on_main_thread=true)
 
PreParserLoggerlogger ()
 
PreParseResult PreParseProgram ()
 
PreParseResult PreParseFunction (const AstRawString *function_name, FunctionKind kind, FunctionLiteral::FunctionType function_type, DeclarationScope *function_scope, bool may_abort, int *use_counts, ProducedPreParsedScopeData **produced_preparser_scope_data, int script_id)
 
PreParsedScopeDataBuilderpreparsed_scope_data_builder () const
 
void set_preparsed_scope_data_builder (PreParsedScopeDataBuilder *preparsed_scope_data_builder)
 
- Public Member Functions inherited from v8::internal::ParserBase< PreParser >
PreParserimpl ()
 
const PreParserimpl () const
 
 ParserBase (Zone *zone, Scanner *scanner, uintptr_t stack_limit, v8::Extension *extension, AstValueFactory *ast_value_factory, PendingCompilationErrorHandler *pending_error_handler, RuntimeCallStats *runtime_call_stats, Logger *logger, int script_id, bool parsing_module, bool parsing_on_main_thread)
 
void set_rewritable_length (int i)
 
 ALLOW_ACCESSORS (natives)
 
 ALLOW_ACCESSORS (harmony_public_fields)
 
 ALLOW_ACCESSORS (harmony_static_fields)
 
 ALLOW_ACCESSORS (harmony_dynamic_import)
 
 ALLOW_ACCESSORS (harmony_import_meta)
 
 ALLOW_ACCESSORS (harmony_private_methods)
 
 ALLOW_ACCESSORS (eval_cache)
 
V8_INLINE bool has_error () const
 
bool allow_harmony_numeric_separator () const
 
void set_allow_harmony_numeric_separator (bool allow)
 
bool allow_harmony_private_fields () const
 
void set_allow_harmony_private_fields (bool allow)
 
uintptr_t stack_limit () const
 
void set_stack_limit (uintptr_t stack_limit)
 
void set_default_eager_compile_hint (FunctionLiteral::EagerCompileHint eager_compile_hint)
 
FunctionLiteral::EagerCompileHint default_eager_compile_hint () const
 
int GetNextFunctionLiteralId ()
 
int GetLastFunctionLiteralId () const
 
void SkipFunctionLiterals (int delta)
 
void ResetFunctionLiteralId ()
 
Zonemain_zone () const
 
Zonezone () const
 

Static Public Member Functions

static bool IsPreParser ()
 

Friends

class ParserBase< PreParser >
 
class v8::internal::ExpressionClassifier< ParserTypes< PreParser > >
 

Additional Inherited Members

- Protected Types inherited from v8::internal::ParserBase< PreParser >
enum  AllowRestrictedIdentifiers
 
enum  LazyParsingResult
 
enum  VariableDeclarationContext
 
enum  PropertyPosition
 
enum  FunctionBodyType
 
- Protected Member Functions inherited from v8::internal::ParserBase< PreParser >
ClassLiteralProperty::Kind ClassPropertyKindFor (ParsePropertyKind kind)
 
const AstRawStringClassFieldVariableName (AstValueFactory *ast_value_factory, int index)
 
DeclarationScopeNewScriptScope () const
 
DeclarationScopeNewVarblockScope () const
 
ModuleScopeNewModuleScope (DeclarationScope *parent) const
 
DeclarationScopeNewEvalScope (Scope *parent) const
 
ScopeNewScope (ScopeType scope_type) const
 
ScopeNewScopeWithParent (Scope *parent, ScopeType scope_type) const
 
DeclarationScopeNewFunctionScope (FunctionKind kind, Zone *parse_zone=nullptr) const
 
V8_INLINE DeclarationScopeGetDeclarationScope () const
 
V8_INLINE DeclarationScopeGetClosureScope () const
 
Scannerscanner () const
 
AstValueFactoryast_value_factory () const
 
int position () const
 
int peek_position () const
 
int end_position () const
 
int peek_end_position () const
 
bool stack_overflow () const
 
void set_stack_overflow ()
 
void CheckStackOverflow ()
 
int script_id ()
 
void set_script_id (int id)
 
V8_INLINE Token::Value peek ()
 
int PositionAfterSemicolon ()
 
V8_INLINE Token::Value PeekAhead ()
 
V8_INLINE Token::Value Next ()
 
V8_INLINE void Consume (Token::Value token)
 
V8_INLINE bool Check (Token::Value token)
 
void Expect (Token::Value token)
 
void ExpectSemicolon ()
 
bool peek_any_identifier ()
 
bool PeekContextualKeyword (const AstRawString *name)
 
bool CheckContextualKeyword (const AstRawString *name)
 
void ExpectMetaProperty (const AstRawString *property_name, const char *full_name, int pos)
 
void ExpectContextualKeyword (const AstRawString *name)
 
bool CheckInOrOf (ForEachStatement::VisitMode *visit_mode)
 
bool PeekInOrOf ()
 
void CheckStrictOctalLiteral (int beg_pos, int end_pos)
 
bool CheckTemplateEscapes (bool should_throw)
 
void CheckDestructuringElement (ExpressionT element, int beg_pos, int end_pos)
 
void CheckArrowFormalParameter (ExpressionT formal)
 
void CheckFunctionName (LanguageMode language_mode, IdentifierT function_name, FunctionNameValidity function_name_validity, const Scanner::Location &function_name_loc)
 
Types::Factory * factory ()
 
DeclarationScopeGetReceiverScope () const
 
LanguageMode language_mode ()
 
void RaiseLanguageMode (LanguageMode mode)
 
bool is_generator () const
 
bool is_async_function () const
 
bool is_async_generator () const
 
bool is_resumable () const
 
const PendingCompilationErrorHandlerpending_error_handler () const
 
PendingCompilationErrorHandlerpending_error_handler ()
 
V8_NOINLINE void ReportMessage (MessageTemplate message)
 
V8_NOINLINE void ReportMessage (MessageTemplate message, T arg, ParseErrorType error_type=kSyntaxError)
 
V8_NOINLINE void ReportMessageAt (Scanner::Location location, MessageTemplate message, ParseErrorType error_type)
 
V8_NOINLINE void ReportUnexpectedToken (Token::Value token)
 
V8_NOINLINE void ReportUnexpectedTokenAt (Scanner::Location location, Token::Value token, MessageTemplate message=MessageTemplate::kUnexpectedToken)
 
V8_NOINLINE void ReportClassifierError (const typename ExpressionClassifier::Error &error)
 
void ValidateExpression ()
 
void ValidateFormalParameterInitializer ()
 
void ValidateBindingPattern ()
 
void ValidatePattern ()
 
void ValidatePattern (ExpressionT expression)
 
void ValidateFormalParameters (LanguageMode language_mode, const FormalParametersT &parameters, bool allow_duplicates)
 
void ValidateArrowFormalParameters (ExpressionT expression)
 
void ValidateLetPattern ()
 
IdentifierT ParseIdentifier (AllowRestrictedIdentifiers)
 
V8_INLINE IdentifierT ParseAndClassifyIdentifier ()
 
IdentifierT ParseIdentifierOrStrictReservedWord (FunctionKind function_kind, bool *is_strict_reserved, bool *is_await)
 
IdentifierT ParseIdentifierOrStrictReservedWord (bool *is_strict_reserved, bool *is_await)
 
V8_INLINE IdentifierT ParseIdentifierName ()
 
ExpressionT ParseIdentifierNameOrPrivateName ()
 
ExpressionT ParseRegExpLiteral ()
 
ExpressionT ParseBindingPattern ()
 
ExpressionT ParsePrimaryExpression ()
 
V8_INLINE ExpressionT ParseExpression ()
 
ExpressionT ParseExpressionCoverGrammar ()
 
ExpressionT ParseArrowFormalsWithRest (ExpressionListT *list)
 
ExpressionT ParseArrayLiteral ()
 
ExpressionT ParsePropertyName (ParsePropertyInfo *prop_info)
 
ExpressionT ParseObjectLiteral ()
 
ClassLiteralPropertyT ParseClassPropertyDefinition (ClassInfo *class_info, ParsePropertyInfo *prop_info, bool has_extends)
 
void CheckClassFieldName (IdentifierT name, bool is_static)
 
void CheckClassMethodName (IdentifierT name, ParsePropertyKind type, ParseFunctionFlags flags, bool is_static, bool *has_seen_constructor)
 
ExpressionT ParseMemberInitializer (ClassInfo *class_info, int beg_pos, bool is_static)
 
ObjectLiteralPropertyT ParseObjectPropertyDefinition (ParsePropertyInfo *prop_info, bool *has_seen_proto)
 
void ParseArguments (ExpressionListT *args, bool *has_spread, bool maybe_arrow)
 
void ParseArguments (ExpressionListT *args, bool *has_spread)
 
ExpressionT ParseAssignmentExpression ()
 
ExpressionT ParseYieldExpression ()
 
V8_INLINE ExpressionT ParseConditionalExpression ()
 
ExpressionT ParseConditionalContinuation (ExpressionT expression, int pos)
 
ExpressionT ParseBinaryContinuation (ExpressionT x, int prec, int prec1)
 
V8_INLINE ExpressionT ParseBinaryExpression (int prec)
 
ExpressionT ParseUnaryOrPrefixExpression ()
 
ExpressionT ParseAwaitExpression ()
 
V8_INLINE ExpressionT ParseUnaryExpression ()
 
V8_INLINE ExpressionT ParsePostfixExpression ()
 
V8_INLINE ExpressionT ParseLeftHandSideExpression ()
 
ExpressionT ParseLeftHandSideContinuation (ExpressionT expression)
 
ExpressionT ParseMemberWithPresentNewPrefixesExpression ()
 
V8_INLINE ExpressionT ParseMemberWithNewPrefixesExpression ()
 
ExpressionT ParseFunctionExpression ()
 
V8_INLINE ExpressionT ParseMemberExpression ()
 
V8_INLINE ExpressionT ParseMemberExpressionContinuation (ExpressionT expression)
 
ExpressionT DoParseMemberExpressionContinuation (ExpressionT expression)
 
ExpressionT ParseArrowFunctionLiteral (const FormalParametersT &parameters)
 
void ParseAsyncFunctionBody (Scope *scope, StatementListT *body)
 
ExpressionT ParseAsyncFunctionLiteral ()
 
ExpressionT ParseClassLiteral (IdentifierT name, Scanner::Location class_name_location, bool name_is_strict_reserved, int class_token_pos)
 
ExpressionT ParseTemplateLiteral (ExpressionT tag, int start, bool tagged)
 
ExpressionT ParseSuperExpression (bool is_new)
 
ExpressionT ParseImportExpressions ()
 
ExpressionT ParseNewTargetExpression ()
 
V8_INLINE void ParseFormalParameter (FormalParametersT *parameters)
 
void ParseFormalParameterList (FormalParametersT *parameters)
 
void CheckArityRestrictions (int param_count, FunctionKind function_type, bool has_rest, int formals_start_pos, int formals_end_pos)
 
BlockT ParseVariableDeclarations (VariableDeclarationContext var_context, DeclarationParsingResult *parsing_result, ZonePtrList< const AstRawString > *names)
 
StatementT ParseAsyncFunctionDeclaration (ZonePtrList< const AstRawString > *names, bool default_export)
 
StatementT ParseFunctionDeclaration ()
 
StatementT ParseHoistableDeclaration (ZonePtrList< const AstRawString > *names, bool default_export)
 
StatementT ParseHoistableDeclaration (int pos, ParseFunctionFlags flags, ZonePtrList< const AstRawString > *names, bool default_export)
 
StatementT ParseClassDeclaration (ZonePtrList< const AstRawString > *names, bool default_export)
 
StatementT ParseNativeDeclaration ()
 
void ParseFunctionBody (StatementListT *result, IdentifierT function_name, int pos, const FormalParametersT &parameters, FunctionKind kind, FunctionLiteral::FunctionType function_type, FunctionBodyType body_type)
 
V8_INLINE void ParseStatementList (StatementListT *body, Token::Value end_token)
 
V8_INLINE LazyParsingResult ParseStatementList (StatementListT *body, Token::Value end_token, bool may_abort)
 
StatementT ParseStatementListItem ()
 
StatementT ParseStatement (ZonePtrList< const AstRawString > *labels, ZonePtrList< const AstRawString > *own_labels)
 
StatementT ParseStatement (ZonePtrList< const AstRawString > *labels, ZonePtrList< const AstRawString > *own_labels, AllowLabelledFunctionStatement allow_function)
 
BlockT ParseBlock (ZonePtrList< const AstRawString > *labels)
 
StatementT ParseScopedStatement (ZonePtrList< const AstRawString > *labels)
 
StatementT ParseVariableStatement (VariableDeclarationContext var_context, ZonePtrList< const AstRawString > *names)
 
ExpressionT ParseV8Intrinsic ()
 
StatementT ParseDebuggerStatement ()
 
StatementT ParseExpressionOrLabelledStatement (ZonePtrList< const AstRawString > *labels, ZonePtrList< const AstRawString > *own_labels, AllowLabelledFunctionStatement allow_function)
 
StatementT ParseIfStatement (ZonePtrList< const AstRawString > *labels)
 
StatementT ParseContinueStatement ()
 
StatementT ParseBreakStatement (ZonePtrList< const AstRawString > *labels)
 
StatementT ParseReturnStatement ()
 
StatementT ParseWithStatement (ZonePtrList< const AstRawString > *labels)
 
StatementT ParseDoWhileStatement (ZonePtrList< const AstRawString > *labels, ZonePtrList< const AstRawString > *own_labels)
 
StatementT ParseWhileStatement (ZonePtrList< const AstRawString > *labels, ZonePtrList< const AstRawString > *own_labels)
 
StatementT ParseThrowStatement ()
 
StatementT ParseSwitchStatement (ZonePtrList< const AstRawString > *labels)
 
V8_INLINE StatementT ParseTryStatement ()
 
StatementT ParseForStatement (ZonePtrList< const AstRawString > *labels, ZonePtrList< const AstRawString > *own_labels)
 
StatementT ParseForEachStatementWithDeclarations (int stmt_pos, ForInfo *for_info, ZonePtrList< const AstRawString > *labels, ZonePtrList< const AstRawString > *own_labels, Scope *inner_block_scope)
 
StatementT ParseForEachStatementWithoutDeclarations (int stmt_pos, ExpressionT expression, int lhs_beg_pos, int lhs_end_pos, ForInfo *for_info, ZonePtrList< const AstRawString > *labels, ZonePtrList< const AstRawString > *own_labels)
 
ForStatementT ParseStandardForLoop (int stmt_pos, ZonePtrList< const AstRawString > *labels, ZonePtrList< const AstRawString > *own_labels, ExpressionT *cond, StatementT *next, StatementT *body)
 
StatementT ParseStandardForLoopWithLexicalDeclarations (int stmt_pos, StatementT init, ForInfo *for_info, ZonePtrList< const AstRawString > *labels, ZonePtrList< const AstRawString > *own_labels)
 
StatementT ParseForAwaitStatement (ZonePtrList< const AstRawString > *labels, ZonePtrList< const AstRawString > *own_labels)
 
bool IsNextLetKeyword ()
 
V8_INLINE ExpressionT RewriteInvalidReferenceExpression (ExpressionT expression, int beg_pos, int end_pos, MessageTemplate message)
 
ExpressionT RewriteInvalidReferenceExpression (ExpressionT expression, int beg_pos, int end_pos, MessageTemplate message, ParseErrorType type)
 
bool IsValidReferenceExpression (ExpressionT expression)
 
bool IsAssignableIdentifier (ExpressionT expression)
 
FunctionKind FunctionKindForImpl (bool is_method, ParseFunctionFlags flags)
 
FunctionKind FunctionKindFor (ParseFunctionFlags flags)
 
FunctionKind MethodKindFor (ParseFunctionFlags flags)
 
Call::PossiblyEval CheckPossibleEvalCall (ExpressionT expression, Scope *scope)
 
StatementT BuildReturnStatement (ExpressionT expr, int pos, int end_pos=kNoSourcePosition)
 
ModuleDescriptormodule () const
 
Scopescope () const
 
V8_INLINE ExpressionClassifierclassifier () const
 
V8_INLINE void Accumulate (unsigned productions)
 
V8_INLINE void AccumulateFormalParameterContainmentErrors ()
 
std::vector< void *> * pointer_buffer ()
 
- Static Protected Member Functions inherited from v8::internal::ParserBase< PreParser >
static bool IsAccessor (ParsePropertyKind kind)
 
static void MarkLoopVariableAsAssigned (Scope *scope, Variable *var, typename DeclarationDescriptor::Kind declaration_kind)
 
- Protected Attributes inherited from v8::internal::ParserBase< PreParser >
Scopescope_
 
Scopeoriginal_scope_
 
FunctionState * function_state_
 
v8::Extension * extension_
 
FuncNameInferrer fni_
 
AstValueFactoryast_value_factory_
 
Types::Factory ast_node_factory_
 
RuntimeCallStatsruntime_call_stats_
 
internal::Loggerlogger_
 
bool parsing_on_main_thread_
 
const bool parsing_module_
 
uintptr_t stack_limit_
 
PendingCompilationErrorHandlerpending_error_handler_
 
- Static Protected Attributes inherited from v8::internal::ParserBase< PreParser >
static const int kLazyParseTrialLimit
 

Detailed Description

Definition at line 950 of file preparser.h.


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