V8 Project
v8::internal::PreParserTraits Class Reference

#include <preparser.h>

+ Inheritance diagram for v8::internal::PreParserTraits:
+ Collaboration diagram for v8::internal::PreParserTraits:

Classes

class  Checkpoint
 
struct  Type
 

Public Member Functions

 PreParserTraits (PreParser *pre_parser)
 
bool ShortcutNumericLiteralBinaryExpression (PreParserExpression *x, PreParserExpression y, Token::Value op, int pos, PreParserFactory *factory)
 
PreParserExpression BuildUnaryExpression (PreParserExpression expression, Token::Value op, int pos, PreParserFactory *factory)
 
PreParserExpression NewThrowReferenceError (const char *type, int pos)
 
PreParserExpression NewThrowSyntaxError (const char *type, Handle< Object > arg, int pos)
 
PreParserExpression NewThrowTypeError (const char *type, Handle< Object > arg, int pos)
 
PreParserScope NewScope (PreParserScope *outer_scope, ScopeType scope_type)
 
void ReportMessageAt (Scanner::Location location, const char *message, const char *arg=NULL, bool is_reference_error=false)
 
void ReportMessageAt (int start_pos, int end_pos, const char *message, const char *arg=NULL, bool is_reference_error=false)
 
PreParserIdentifier GetSymbol (Scanner *scanner)
 
PreParserIdentifier GetNumberAsSymbol (Scanner *scanner)
 
PreParserExpression ExpressionFromString (int pos, Scanner *scanner, PreParserFactory *factory=NULL)
 
PreParserExpression GetIterator (PreParserExpression iterable, PreParserFactory *factory)
 
void SkipLazyFunctionBody (PreParserIdentifier function_name, int *materialized_literal_count, int *expected_property_count, bool *ok)
 
PreParserStatementList ParseEagerFunctionBody (PreParserIdentifier function_name, int pos, Variable *fvar, Token::Value fvar_init_op, bool is_generator, bool *ok)
 
int DeclareArrowParametersFromExpression (PreParserExpression expression, PreParserScope *scope, Scanner::Location *dupe_loc, bool *ok)
 
void CheckConflictingVarDeclarations (PreParserScope scope, bool *ok)
 
PreParserExpression ParseV8Intrinsic (bool *ok)
 
PreParserExpression ParseFunctionLiteral (PreParserIdentifier name, Scanner::Location function_name_location, bool name_is_strict_reserved, FunctionKind kind, int function_token_position, FunctionLiteral::FunctionType type, FunctionLiteral::ArityRestriction arity_restriction, bool *ok)
 

Static Public Member Functions

template<typename FunctionState >
static void SetUpFunctionState (FunctionState *function_state)
 
template<typename FunctionState >
static void TearDownFunctionState (FunctionState *function_state)
 
static bool IsEvalOrArguments (PreParserIdentifier identifier)
 
static bool IsPrototype (PreParserIdentifier identifier)
 
static bool IsConstructor (PreParserIdentifier identifier)
 
static bool IsThisProperty (PreParserExpression expression)
 
static bool IsIdentifier (PreParserExpression expression)
 
static PreParserIdentifier AsIdentifier (PreParserExpression expression)
 
static bool IsFutureStrictReserved (PreParserIdentifier identifier)
 
static bool IsBoilerplateProperty (PreParserExpression property)
 
static bool IsArrayIndex (PreParserIdentifier string, uint32_t *index)
 
static void PushLiteralName (FuncNameInferrer *fni, PreParserIdentifier id)
 
static void PushPropertyName (FuncNameInferrer *fni, PreParserExpression expression)
 
static void InferFunctionName (FuncNameInferrer *fni, PreParserExpression expression)
 
static void CheckFunctionLiteralInsideTopLevelObjectLiteral (PreParserScope *scope, PreParserExpression property, bool *has_function)
 
static void CheckAssigningFunctionLiteralToProperty (PreParserExpression left, PreParserExpression right)
 
static void CheckPossibleEvalCall (PreParserExpression expression, PreParserScope *scope)
 
static PreParserExpression MarkExpressionAsAssigned (PreParserExpression expression)
 
static PreParserIdentifier EmptyIdentifier ()
 
static PreParserIdentifier EmptyIdentifierString ()
 
static PreParserExpression EmptyExpression ()
 
static PreParserExpression EmptyArrowParamList ()
 
static PreParserExpression EmptyLiteral ()
 
static PreParserExpression EmptyObjectLiteralProperty ()
 
static PreParserExpression EmptyFunctionLiteral ()
 
static PreParserExpressionList NullExpressionList ()
 
static PreParserExpression GetLiteralTheHole (int position, PreParserFactory *factory)
 
static PreParserIdentifier GetNextSymbol (Scanner *scanner)
 
static PreParserExpression ThisExpression (PreParserScope *scope, PreParserFactory *factory)
 
static PreParserExpression SuperReference (PreParserScope *scope, PreParserFactory *factory)
 
static PreParserExpression ClassLiteral (PreParserIdentifier name, PreParserExpression extends, PreParserExpression constructor, PreParserExpressionList properties, int position, PreParserFactory *factory)
 
static PreParserExpression ExpressionFromLiteral (Token::Value token, int pos, Scanner *scanner, PreParserFactory *factory)
 
static PreParserExpression ExpressionFromIdentifier (PreParserIdentifier name, int pos, PreParserScope *scope, PreParserFactory *factory)
 
static PreParserExpressionList NewExpressionList (int size, void *zone)
 
static PreParserStatementList NewStatementList (int size, void *zone)
 
static PreParserExpressionList NewPropertyList (int size, void *zone)
 
static AstValueFactoryast_value_factory ()
 

Private Attributes

PreParserpre_parser_
 

Detailed Description

Definition at line 1107 of file preparser.h.

Constructor & Destructor Documentation

◆ PreParserTraits()

v8::internal::PreParserTraits::PreParserTraits ( PreParser pre_parser)
inlineexplicit

Definition at line 1144 of file preparser.h.

1144 : pre_parser_(pre_parser) {}

Member Function Documentation

◆ AsIdentifier()

static PreParserIdentifier v8::internal::PreParserTraits::AsIdentifier ( PreParserExpression  expression)
inlinestatic

Definition at line 1175 of file preparser.h.

1175  {
1176  return expression.AsIdentifier();
1177  }

References v8::internal::PreParserExpression::AsIdentifier().

+ Here is the call graph for this function:

◆ ast_value_factory()

static AstValueFactory* v8::internal::PreParserTraits::ast_value_factory ( )
inlinestatic

Definition at line 1380 of file preparser.h.

1380 { return NULL; }
enable harmony numeric enable harmony object literal extensions Optimize object Array DOM strings and string trace pretenuring decisions of HAllocate instructions Enables optimizations which favor memory size over execution speed maximum source size in bytes considered for a single inlining maximum cumulative number of AST nodes considered for inlining trace the tracking of allocation sites deoptimize every n garbage collections perform array bounds checks elimination analyze liveness of environment slots and zap dead values flushes the cache of optimized code for closures on every GC allow uint32 values on optimize frames if they are used only in safe operations track concurrent recompilation artificial compilation delay in ms do not emit check maps for constant values that have a leaf deoptimize the optimized code if the layout of the maps changes enable context specialization in TurboFan execution budget before interrupt is triggered max percentage of megamorphic generic ICs to allow optimization enable use of SAHF instruction if enable use of VFP3 instructions if available enable use of NEON instructions if enable use of SDIV and UDIV instructions if enable use of MLS instructions if enable loading bit constant by means of movw movt instruction enable unaligned accesses for enable use of d16 d31 registers on ARM this requires VFP3 force all emitted branches to be in long enable alignment of csp to bytes on platforms which prefer the register to always be NULL

References NULL.

Referenced by v8::internal::PreParser::ParseFunctionLiteral(), and v8::internal::PreParser::PreParseLazyFunction().

+ Here is the caller graph for this function:

◆ BuildUnaryExpression()

PreParserExpression v8::internal::PreParserTraits::BuildUnaryExpression ( PreParserExpression  expression,
Token::Value  op,
int  pos,
PreParserFactory factory 
)
inline

Definition at line 1235 of file preparser.h.

1237  {
1239  }
static PreParserExpression Default()
Definition: preparser.h:678

References v8::internal::PreParserExpression::Default().

+ Here is the call graph for this function:

◆ CheckAssigningFunctionLiteralToProperty()

static void v8::internal::PreParserTraits::CheckAssigningFunctionLiteralToProperty ( PreParserExpression  left,
PreParserExpression  right 
)
inlinestatic

Definition at line 1213 of file preparser.h.

1214  {}

◆ CheckConflictingVarDeclarations()

void v8::internal::PreParserTraits::CheckConflictingVarDeclarations ( PreParserScope  scope,
bool ok 
)
inline

Definition at line 1382 of file preparser.h.

1382 {}

◆ CheckFunctionLiteralInsideTopLevelObjectLiteral()

static void v8::internal::PreParserTraits::CheckFunctionLiteralInsideTopLevelObjectLiteral ( PreParserScope scope,
PreParserExpression  property,
bool has_function 
)
inlinestatic

Definition at line 1209 of file preparser.h.

1210  {
1211  }

◆ CheckPossibleEvalCall()

static void v8::internal::PreParserTraits::CheckPossibleEvalCall ( PreParserExpression  expression,
PreParserScope scope 
)
inlinestatic

Definition at line 1217 of file preparser.h.

1218  {}

◆ ClassLiteral()

static PreParserExpression v8::internal::PreParserTraits::ClassLiteral ( PreParserIdentifier  name,
PreParserExpression  extends,
PreParserExpression  constructor,
PreParserExpressionList  properties,
int  position,
PreParserFactory factory 
)
inlinestatic

Definition at line 1317 of file preparser.h.

1322  {
1324  }

References v8::internal::PreParserExpression::Default().

+ Here is the call graph for this function:

◆ DeclareArrowParametersFromExpression()

int v8::internal::PreParserTraits::DeclareArrowParametersFromExpression ( PreParserExpression  expression,
PreParserScope scope,
Scanner::Location dupe_loc,
bool ok 
)
inline

Definition at line 1371 of file preparser.h.

1374  {
1375  // TODO(aperez): Detect duplicated identifiers in paramlists.
1376  *ok = expression.IsValidArrowParamList();
1377  return 0;
1378  }

References v8::internal::PreParserExpression::IsValidArrowParamList().

+ Here is the call graph for this function:

◆ EmptyArrowParamList()

static PreParserExpression v8::internal::PreParserTraits::EmptyArrowParamList ( )
inlinestatic

Definition at line 1277 of file preparser.h.

1277  {
1279  }
static PreParserExpression EmptyArrowParamList()
Definition: preparser.h:697

References v8::internal::PreParserExpression::EmptyArrowParamList().

+ Here is the call graph for this function:

◆ EmptyExpression()

static PreParserExpression v8::internal::PreParserTraits::EmptyExpression ( )
inlinestatic

Definition at line 1274 of file preparser.h.

1274  {
1276  }

References v8::internal::PreParserExpression::Default().

+ Here is the call graph for this function:

◆ EmptyFunctionLiteral()

static PreParserExpression v8::internal::PreParserTraits::EmptyFunctionLiteral ( )
inlinestatic

Definition at line 1286 of file preparser.h.

1286  {
1288  }

References v8::internal::PreParserExpression::Default().

+ Here is the call graph for this function:

◆ EmptyIdentifier()

static PreParserIdentifier v8::internal::PreParserTraits::EmptyIdentifier ( )
inlinestatic

Definition at line 1268 of file preparser.h.

1268  {
1270  }
static PreParserIdentifier Default()
Definition: preparser.h:602

References v8::internal::PreParserIdentifier::Default().

+ Here is the call graph for this function:

◆ EmptyIdentifierString()

static PreParserIdentifier v8::internal::PreParserTraits::EmptyIdentifierString ( )
inlinestatic

Definition at line 1271 of file preparser.h.

1271  {
1273  }

References v8::internal::PreParserIdentifier::Default().

+ Here is the call graph for this function:

◆ EmptyLiteral()

static PreParserExpression v8::internal::PreParserTraits::EmptyLiteral ( )
inlinestatic

Definition at line 1280 of file preparser.h.

1280  {
1282  }

References v8::internal::PreParserExpression::Default().

+ Here is the call graph for this function:

◆ EmptyObjectLiteralProperty()

static PreParserExpression v8::internal::PreParserTraits::EmptyObjectLiteralProperty ( )
inlinestatic

Definition at line 1283 of file preparser.h.

1283  {
1285  }

References v8::internal::PreParserExpression::Default().

+ Here is the call graph for this function:

◆ ExpressionFromIdentifier()

static PreParserExpression v8::internal::PreParserTraits::ExpressionFromIdentifier ( PreParserIdentifier  name,
int  pos,
PreParserScope scope,
PreParserFactory factory 
)
inlinestatic

Definition at line 1332 of file preparser.h.

1334  {
1336  }
static PreParserExpression FromIdentifier(PreParserIdentifier id)
Definition: preparser.h:682
enable harmony numeric enable harmony object literal extensions Optimize object Array DOM strings and string trace pretenuring decisions of HAllocate instructions Enables optimizations which favor memory size over execution speed maximum source size in bytes considered for a single inlining maximum cumulative number of AST nodes considered for inlining trace the tracking of allocation sites deoptimize every n garbage collections perform array bounds checks elimination analyze liveness of environment slots and zap dead values flushes the cache of optimized code for closures on every GC allow uint32 values on optimize frames if they are used only in safe operations track concurrent recompilation artificial compilation delay in ms do not emit check maps for constant values that have a leaf deoptimize the optimized code if the layout of the maps changes enable context specialization in TurboFan execution budget before interrupt is triggered max percentage of megamorphic generic ICs to allow optimization enable use of SAHF instruction if enable use of VFP3 instructions if available enable use of NEON instructions if enable use of SDIV and UDIV instructions if enable use of MLS instructions if enable loading bit constant by means of movw movt instruction enable unaligned accesses for enable use of d16 d31 registers on ARM this requires VFP3 force all emitted branches to be in long enable alignment of csp to bytes on platforms which prefer the register to always be expose gc extension under the specified name show built in functions in stack traces use random jit cookie to mask large constants minimum length for automatic enable preparsing CPU profiler sampling interval in microseconds trace out of bounds accesses to external arrays default size of stack region v8 is allowed to maximum length of function source code printed in a stack trace min size of a semi the new space consists of two semi spaces print one trace line following each garbage collection do not print trace line after scavenger collection print cumulative GC statistics in name

References v8::internal::PreParserExpression::FromIdentifier(), and name.

+ Here is the call graph for this function:

◆ ExpressionFromLiteral()

static PreParserExpression v8::internal::PreParserTraits::ExpressionFromLiteral ( Token::Value  token,
int  pos,
Scanner scanner,
PreParserFactory factory 
)
inlinestatic

Definition at line 1326 of file preparser.h.

1328  {
1330  }

References v8::internal::PreParserExpression::Default().

+ Here is the call graph for this function:

◆ ExpressionFromString()

PreParserExpression v8::internal::PreParserTraits::ExpressionFromString ( int  pos,
Scanner scanner,
PreParserFactory factory = NULL 
)

Definition at line 96 of file preparser.cc.

97  {
98  if (scanner->UnescapedLiteralMatches("use strict", 10)) {
100  }
102 }
static PreParserExpression UseStrictStringLiteral()
Definition: preparser.h:707
static PreParserExpression StringLiteral()
Definition: preparser.h:703

References v8::internal::PreParserExpression::StringLiteral(), v8::internal::Scanner::UnescapedLiteralMatches(), and v8::internal::PreParserExpression::UseStrictStringLiteral().

+ Here is the call graph for this function:

◆ GetIterator()

PreParserExpression v8::internal::PreParserTraits::GetIterator ( PreParserExpression  iterable,
PreParserFactory factory 
)
inline

Definition at line 1342 of file preparser.h.

1343  {
1345  }

References v8::internal::PreParserExpression::Default().

+ Here is the call graph for this function:

◆ GetLiteralTheHole()

static PreParserExpression v8::internal::PreParserTraits::GetLiteralTheHole ( int  position,
PreParserFactory factory 
)
inlinestatic

Definition at line 1294 of file preparser.h.

1295  {
1297  }

References v8::internal::PreParserExpression::Default().

+ Here is the call graph for this function:

◆ GetNextSymbol()

static PreParserIdentifier v8::internal::PreParserTraits::GetNextSymbol ( Scanner scanner)
inlinestatic

Definition at line 1303 of file preparser.h.

1303  {
1305  }

References v8::internal::PreParserIdentifier::Default().

+ Here is the call graph for this function:

◆ GetNumberAsSymbol()

PreParserIdentifier v8::internal::PreParserTraits::GetNumberAsSymbol ( Scanner scanner)

Definition at line 91 of file preparser.cc.

91  {
93 }

References v8::internal::PreParserIdentifier::Default().

+ Here is the call graph for this function:

◆ GetSymbol()

PreParserIdentifier v8::internal::PreParserTraits::GetSymbol ( Scanner scanner)

Definition at line 64 of file preparser.cc.

64  {
65  if (scanner->current_token() == Token::FUTURE_RESERVED_WORD) {
67  } else if (scanner->current_token() ==
68  Token::FUTURE_STRICT_RESERVED_WORD) {
70  } else if (scanner->current_token() == Token::LET) {
71  return PreParserIdentifier::Let();
72  } else if (scanner->current_token() == Token::YIELD) {
74  }
75  if (scanner->UnescapedLiteralMatches("eval", 4)) {
77  }
78  if (scanner->UnescapedLiteralMatches("arguments", 9)) {
80  }
81  if (scanner->UnescapedLiteralMatches("prototype", 9)) {
83  }
84  if (scanner->UnescapedLiteralMatches("constructor", 11)) {
86  }
88 }
static PreParserIdentifier Eval()
Definition: preparser.h:605
static PreParserIdentifier Arguments()
Definition: preparser.h:608
static PreParserIdentifier Prototype()
Definition: preparser.h:623
static PreParserIdentifier FutureStrictReserved()
Definition: preparser.h:614
static PreParserIdentifier FutureReserved()
Definition: preparser.h:611
static PreParserIdentifier Let()
Definition: preparser.h:617
static PreParserIdentifier Constructor()
Definition: preparser.h:626
static PreParserIdentifier Yield()
Definition: preparser.h:620

References v8::internal::PreParserIdentifier::Arguments(), v8::internal::PreParserIdentifier::Constructor(), v8::internal::Scanner::current_token(), v8::internal::PreParserIdentifier::Default(), v8::internal::PreParserIdentifier::Eval(), v8::internal::PreParserIdentifier::FutureReserved(), v8::internal::PreParserIdentifier::FutureStrictReserved(), v8::internal::LET, v8::internal::PreParserIdentifier::Let(), v8::internal::PreParserIdentifier::Prototype(), v8::internal::Scanner::UnescapedLiteralMatches(), v8::internal::YIELD, and v8::internal::PreParserIdentifier::Yield().

+ Here is the call graph for this function:

◆ InferFunctionName()

static void v8::internal::PreParserTraits::InferFunctionName ( FuncNameInferrer fni,
PreParserExpression  expression 
)
inlinestatic

Definition at line 1203 of file preparser.h.

1204  {
1205  // PreParser should not use FuncNameInferrer.
1206  UNREACHABLE();
1207  }
#define UNREACHABLE()
Definition: logging.h:30

References UNREACHABLE.

◆ IsArrayIndex()

static bool v8::internal::PreParserTraits::IsArrayIndex ( PreParserIdentifier  string,
uint32_t index 
)
inlinestatic

Definition at line 1188 of file preparser.h.

1188  {
1189  return false;
1190  }

◆ IsBoilerplateProperty()

static bool v8::internal::PreParserTraits::IsBoilerplateProperty ( PreParserExpression  property)
inlinestatic

Definition at line 1183 of file preparser.h.

1183  {
1184  // PreParser doesn't count boilerplate properties.
1185  return false;
1186  }

◆ IsConstructor()

static bool v8::internal::PreParserTraits::IsConstructor ( PreParserIdentifier  identifier)
inlinestatic

Definition at line 1162 of file preparser.h.

1162  {
1163  return identifier.IsConstructor();
1164  }

References v8::internal::PreParserIdentifier::IsConstructor().

+ Here is the call graph for this function:

◆ IsEvalOrArguments()

static bool v8::internal::PreParserTraits::IsEvalOrArguments ( PreParserIdentifier  identifier)
inlinestatic

Definition at line 1154 of file preparser.h.

1154  {
1155  return identifier.IsEvalOrArguments();
1156  }

References v8::internal::PreParserIdentifier::IsEvalOrArguments().

+ Here is the call graph for this function:

◆ IsFutureStrictReserved()

static bool v8::internal::PreParserTraits::IsFutureStrictReserved ( PreParserIdentifier  identifier)
inlinestatic

Definition at line 1179 of file preparser.h.

1179  {
1180  return identifier.IsYield() || identifier.IsFutureStrictReserved();
1181  }

References v8::internal::PreParserIdentifier::IsFutureStrictReserved(), and v8::internal::PreParserIdentifier::IsYield().

+ Here is the call graph for this function:

◆ IsIdentifier()

static bool v8::internal::PreParserTraits::IsIdentifier ( PreParserExpression  expression)
inlinestatic

Definition at line 1171 of file preparser.h.

1171  {
1172  return expression.IsIdentifier();
1173  }

References v8::internal::PreParserExpression::IsIdentifier().

+ Here is the call graph for this function:

◆ IsPrototype()

static bool v8::internal::PreParserTraits::IsPrototype ( PreParserIdentifier  identifier)
inlinestatic

Definition at line 1158 of file preparser.h.

1158  {
1159  return identifier.IsPrototype();
1160  }

References v8::internal::PreParserIdentifier::IsPrototype().

+ Here is the call graph for this function:

◆ IsThisProperty()

static bool v8::internal::PreParserTraits::IsThisProperty ( PreParserExpression  expression)
inlinestatic

Definition at line 1167 of file preparser.h.

1167  {
1168  return expression.IsThisProperty();
1169  }

References v8::internal::PreParserExpression::IsThisProperty().

+ Here is the call graph for this function:

◆ MarkExpressionAsAssigned()

static PreParserExpression v8::internal::PreParserTraits::MarkExpressionAsAssigned ( PreParserExpression  expression)
inlinestatic

Definition at line 1220 of file preparser.h.

1221  {
1222  // TODO(marja): To be able to produce the same errors, the preparser needs
1223  // to start tracking which expressions are variables and which are assigned.
1224  return expression;
1225  }

◆ NewExpressionList()

static PreParserExpressionList v8::internal::PreParserTraits::NewExpressionList ( int  size,
void *  zone 
)
inlinestatic

Definition at line 1347 of file preparser.h.

1347  {
1348  return PreParserExpressionList();
1349  }

◆ NewPropertyList()

static PreParserExpressionList v8::internal::PreParserTraits::NewPropertyList ( int  size,
void *  zone 
)
inlinestatic

Definition at line 1355 of file preparser.h.

1355  {
1356  return PreParserExpressionList();
1357  }

◆ NewScope()

PreParserScope v8::internal::PreParserTraits::NewScope ( PreParserScope outer_scope,
ScopeType  scope_type 
)
inline

Definition at line 1252 of file preparser.h.

1252  {
1253  return PreParserScope(outer_scope, scope_type);
1254  }

◆ NewStatementList()

static PreParserStatementList v8::internal::PreParserTraits::NewStatementList ( int  size,
void *  zone 
)
inlinestatic

Definition at line 1351 of file preparser.h.

1351  {
1352  return PreParserStatementList();
1353  }

◆ NewThrowReferenceError()

PreParserExpression v8::internal::PreParserTraits::NewThrowReferenceError ( const char *  type,
int  pos 
)
inline

Definition at line 1241 of file preparser.h.

1241  {
1243  }

References v8::internal::PreParserExpression::Default().

+ Here is the call graph for this function:

◆ NewThrowSyntaxError()

PreParserExpression v8::internal::PreParserTraits::NewThrowSyntaxError ( const char *  type,
Handle< Object arg,
int  pos 
)
inline

Definition at line 1244 of file preparser.h.

1245  {
1247  }

References v8::internal::PreParserExpression::Default().

+ Here is the call graph for this function:

◆ NewThrowTypeError()

PreParserExpression v8::internal::PreParserTraits::NewThrowTypeError ( const char *  type,
Handle< Object arg,
int  pos 
)
inline

Definition at line 1248 of file preparser.h.

1249  {
1251  }

References v8::internal::PreParserExpression::Default().

+ Here is the call graph for this function:

◆ NullExpressionList()

static PreParserExpressionList v8::internal::PreParserTraits::NullExpressionList ( )
inlinestatic

Definition at line 1289 of file preparser.h.

1289  {
1290  return PreParserExpressionList();
1291  }

◆ ParseEagerFunctionBody()

PreParserStatementList v8::internal::PreParserTraits::ParseEagerFunctionBody ( PreParserIdentifier  function_name,
int  pos,
Variable fvar,
Token::Value  fvar_init_op,
bool  is_generator,
bool ok 
)
inline

Definition at line 1545 of file preparser.h.

1547  {
1548  return pre_parser_->ParseEagerFunctionBody(function_name, pos, fvar,
1549  fvar_init_op, is_generator, ok);
1550 }
PreParserStatementList ParseEagerFunctionBody(PreParserIdentifier function_name, int pos, Variable *fvar, Token::Value fvar_init_op, bool is_generator, bool *ok)
Definition: preparser.h:1532

References v8::internal::PreParser::ParseEagerFunctionBody(), and pre_parser_.

+ Here is the call graph for this function:

◆ ParseFunctionLiteral()

PreParserExpression v8::internal::PreParserTraits::ParseFunctionLiteral ( PreParserIdentifier  name,
Scanner::Location  function_name_location,
bool  name_is_strict_reserved,
FunctionKind  kind,
int  function_token_position,
FunctionLiteral::FunctionType  type,
FunctionLiteral::ArityRestriction  arity_restriction,
bool ok 
)

Definition at line 110 of file preparser.cc.

114  {
116  name, function_name_location, name_is_strict_reserved, kind,
117  function_token_position, type, arity_restriction, ok);
118 }
Expression ParseFunctionLiteral(Identifier name, Scanner::Location function_name_location, bool name_is_strict_reserved, FunctionKind kind, int function_token_pos, FunctionLiteral::FunctionType function_type, FunctionLiteral::ArityRestriction arity_restriction, bool *ok)
Definition: preparser.cc:823
kExpectedNofPropertiesOffset function_token_position
Definition: objects-inl.h:5513

References v8::internal::function_token_position, name, v8::internal::PreParser::ParseFunctionLiteral(), and pre_parser_.

+ Here is the call graph for this function:

◆ ParseV8Intrinsic()

PreParserExpression v8::internal::PreParserTraits::ParseV8Intrinsic ( bool ok)

Definition at line 105 of file preparser.cc.

105  {
106  return pre_parser_->ParseV8Intrinsic(ok);
107 }
Expression ParseV8Intrinsic(bool *ok)
Definition: preparser.cc:942

References v8::internal::PreParser::ParseV8Intrinsic(), and pre_parser_.

+ Here is the call graph for this function:

◆ PushLiteralName()

static void v8::internal::PreParserTraits::PushLiteralName ( FuncNameInferrer fni,
PreParserIdentifier  id 
)
inlinestatic

Definition at line 1194 of file preparser.h.

1194  {
1195  // PreParser should not use FuncNameInferrer.
1196  UNREACHABLE();
1197  }

References UNREACHABLE.

◆ PushPropertyName()

static void v8::internal::PreParserTraits::PushPropertyName ( FuncNameInferrer fni,
PreParserExpression  expression 
)
inlinestatic

Definition at line 1198 of file preparser.h.

1199  {
1200  // PreParser should not use FuncNameInferrer.
1201  UNREACHABLE();
1202  }

References UNREACHABLE.

◆ ReportMessageAt() [1/2]

void v8::internal::PreParserTraits::ReportMessageAt ( int  start_pos,
int  end_pos,
const char *  message,
const char *  arg = NULL,
bool  is_reference_error = false 
)

Definition at line 54 of file preparser.cc.

58  {
59  pre_parser_->log_->LogMessage(start_pos, end_pos, message, arg,
60  is_reference_error);
61 }
ParserRecorder * log_
Definition: preparser.h:581
virtual void LogMessage(int start, int end, const char *message, const char *argument_opt, bool is_reference_error)=0

References v8::internal::ParserBase< Traits >::log_, v8::internal::ParserRecorder::LogMessage(), and pre_parser_.

+ Here is the call graph for this function:

◆ ReportMessageAt() [2/2]

void v8::internal::PreParserTraits::ReportMessageAt ( Scanner::Location  location,
const char *  message,
const char *  arg = NULL,
bool  is_reference_error = false 
)

Definition at line 42 of file preparser.cc.

45  {
46  ReportMessageAt(location.beg_pos,
47  location.end_pos,
48  message,
49  arg,
50  is_reference_error);
51 }
void ReportMessageAt(Scanner::Location location, const char *message, const char *arg=NULL, bool is_reference_error=false)
Definition: preparser.cc:42

References v8::internal::Scanner::Location::beg_pos, and v8::internal::Scanner::Location::end_pos.

Referenced by v8::internal::PreParser::ParseStatement().

+ Here is the caller graph for this function:

◆ SetUpFunctionState()

template<typename FunctionState >
static void v8::internal::PreParserTraits::SetUpFunctionState ( FunctionState *  function_state)
inlinestatic

Definition at line 1149 of file preparser.h.

1149 {}

◆ ShortcutNumericLiteralBinaryExpression()

bool v8::internal::PreParserTraits::ShortcutNumericLiteralBinaryExpression ( PreParserExpression x,
PreParserExpression  y,
Token::Value  op,
int  pos,
PreParserFactory factory 
)
inline

Definition at line 1227 of file preparser.h.

1231  {
1232  return false;
1233  }

◆ SkipLazyFunctionBody()

void v8::internal::PreParserTraits::SkipLazyFunctionBody ( PreParserIdentifier  function_name,
int materialized_literal_count,
int expected_property_count,
bool ok 
)
inline

Definition at line 1359 of file preparser.h.

1361  {
1362  UNREACHABLE();
1363  }

References UNREACHABLE.

◆ SuperReference()

static PreParserExpression v8::internal::PreParserTraits::SuperReference ( PreParserScope scope,
PreParserFactory factory 
)
inlinestatic

Definition at line 1312 of file preparser.h.

1313  {
1314  return PreParserExpression::Super();
1315  }
static PreParserExpression Super()
Definition: preparser.h:715

References v8::internal::PreParserExpression::Super().

+ Here is the call graph for this function:

◆ TearDownFunctionState()

template<typename FunctionState >
static void v8::internal::PreParserTraits::TearDownFunctionState ( FunctionState *  function_state)
inlinestatic

Definition at line 1151 of file preparser.h.

1151 {}

◆ ThisExpression()

static PreParserExpression v8::internal::PreParserTraits::ThisExpression ( PreParserScope scope,
PreParserFactory factory 
)
inlinestatic

Definition at line 1307 of file preparser.h.

1308  {
1309  return PreParserExpression::This();
1310  }
static PreParserExpression This()
Definition: preparser.h:711

References v8::internal::PreParserExpression::This().

+ Here is the call graph for this function:

Member Data Documentation

◆ pre_parser_

PreParser* v8::internal::PreParserTraits::pre_parser_
private

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