v8  3.25.30(node0.11.13)
V8 is Google's open source JavaScript engine
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
ParserTraits Class Reference

#include <parser.h>

Inheritance diagram for ParserTraits:

Data Structures

struct  Type
 

Public Member Functions

 ParserTraits (Parser *parser)
 
bool IsEvalOrArguments (Handle< String > identifier) const
 
void PushPropertyName (FuncNameInferrer *fni, Expression *expression)
 
void CheckPossibleEvalCall (Expression *expression, Scope *scope)
 
void CheckStrictModeLValue (Expression *expression, bool *ok)
 
bool ShortcutNumericLiteralBinaryExpression (Expression **x, Expression *y, Token::Value op, int pos, AstNodeFactory< AstConstructionVisitor > *factory)
 
ExpressionBuildUnaryExpression (Expression *expression, Token::Value op, int pos, AstNodeFactory< AstConstructionVisitor > *factory)
 
void ReportMessageAt (Scanner::Location source_location, const char *message, Vector< const char * > args, bool is_reference_error=false)
 
void ReportMessage (const char *message, Vector< Handle< String > > args, bool is_reference_error=false)
 
void ReportMessageAt (Scanner::Location source_location, const char *message, Vector< Handle< String > > args, bool is_reference_error=false)
 
Literal * GetLiteralTheHole (int position, AstNodeFactory< AstConstructionVisitor > *factory)
 
Handle< StringGetSymbol (Scanner *scanner=NULL)
 
Handle< StringNextLiteralString (Scanner *scanner, PretenureFlag tenured)
 
ExpressionThisExpression (Scope *scope, AstNodeFactory< AstConstructionVisitor > *factory)
 
Literal * ExpressionFromLiteral (Token::Value token, int pos, Scanner *scanner, AstNodeFactory< AstConstructionVisitor > *factory)
 
ExpressionExpressionFromIdentifier (Handle< String > name, int pos, Scope *scope, AstNodeFactory< AstConstructionVisitor > *factory)
 
ExpressionExpressionFromString (int pos, Scanner *scanner, AstNodeFactory< AstConstructionVisitor > *factory)
 
ZoneList
< v8::internal::Expression * > * 
NewExpressionList (int size, Zone *zone)
 
ZoneList
< ObjectLiteral::Property * > * 
NewPropertyList (int size, Zone *zone)
 
ExpressionParseV8Intrinsic (bool *ok)
 
FunctionLiteral * ParseFunctionLiteral (Handle< String > name, Scanner::Location function_name_location, bool name_is_strict_reserved, bool is_generator, int function_token_position, FunctionLiteral::FunctionType type, bool *ok)
 

Static Public Member Functions

template<typename FunctionState >
static void SetUpFunctionState (FunctionState *function_state, Zone *zone)
 
template<typename FunctionState >
static void TearDownFunctionState (FunctionState *function_state)
 
static bool IsThisProperty (Expression *expression)
 
static bool IsIdentifier (Expression *expression)
 
static bool IsBoilerplateProperty (ObjectLiteral::Property *property)
 
static bool IsArrayIndex (Handle< String > string, uint32_t *index)
 
static void PushLiteralName (FuncNameInferrer *fni, Handle< String > id)
 
static void CheckFunctionLiteralInsideTopLevelObjectLiteral (Scope *scope, Expression *value, bool *has_function)
 
static void CheckAssigningFunctionLiteralToProperty (Expression *left, Expression *right)
 
static ExpressionMarkExpressionAsLValue (Expression *expression)
 
static Handle< StringEmptyIdentifier ()
 
static ExpressionEmptyExpression ()
 
static Literal * EmptyLiteral ()
 
static ZoneList< Expression * > * NullExpressionList ()
 

Detailed Description

Definition at line 412 of file parser.h.

Constructor & Destructor Documentation

ParserTraits ( Parser parser)
inlineexplicit

Definition at line 438 of file parser.h.

Member Function Documentation

Expression * BuildUnaryExpression ( Expression expression,
Token::Value  op,
int  pos,
AstNodeFactory< AstConstructionVisitor > *  factory 
)
void CheckAssigningFunctionLiteralToProperty ( Expression left,
Expression right 
)
static

Definition at line 454 of file parser.cc.

References ASSERT, and v8::internal::NULL.

static void CheckFunctionLiteralInsideTopLevelObjectLiteral ( Scope scope,
Expression value,
bool *  has_function 
)
inlinestatic

Definition at line 480 of file parser.h.

References Scope::DeclarationScope(), Scope::is_global_scope(), and v8::internal::NULL.

void CheckPossibleEvalCall ( Expression expression,
Scope scope 
)
void CheckStrictModeLValue ( Expression expression,
bool *  ok 
)
static Expression* EmptyExpression ( )
inlinestatic

Definition at line 547 of file parser.h.

References v8::internal::NULL.

static Handle<String> EmptyIdentifier ( )
inlinestatic

Definition at line 544 of file parser.h.

static Literal* EmptyLiteral ( )
inlinestatic

Definition at line 550 of file parser.h.

References v8::internal::NULL.

Expression * ExpressionFromIdentifier ( Handle< String name,
int  pos,
Scope scope,
AstNodeFactory< AstConstructionVisitor > *  factory 
)
Literal * ExpressionFromLiteral ( Token::Value  token,
int  pos,
Scanner scanner,
AstNodeFactory< AstConstructionVisitor > *  factory 
)

Definition at line 697 of file parser.cc.

References ASSERT, Scanner::DoubleValue(), Isolate::factory(), and v8::internal::NULL.

Expression * ExpressionFromString ( int  pos,
Scanner scanner,
AstNodeFactory< AstConstructionVisitor > *  factory 
)
Literal * GetLiteralTheHole ( int  position,
AstNodeFactory< AstConstructionVisitor > *  factory 
)

Definition at line 743 of file parser.cc.

References Isolate::factory().

static bool IsArrayIndex ( Handle< String string,
uint32_t *  index 
)
inlinestatic

Definition at line 469 of file parser.h.

static bool IsBoilerplateProperty ( ObjectLiteral::Property *  property)
inlinestatic

Definition at line 465 of file parser.h.

bool IsEvalOrArguments ( Handle< String identifier) const

Definition at line 420 of file parser.cc.

References Isolate::factory().

Referenced by ParserTraits::CheckStrictModeLValue().

bool IsIdentifier ( Expression expression)
static

Definition at line 437 of file parser.cc.

References v8::internal::NULL.

bool IsThisProperty ( Expression expression)
static

Definition at line 428 of file parser.cc.

References ASSERT, and v8::internal::NULL.

Expression * MarkExpressionAsLValue ( Expression expression)
static

Definition at line 474 of file parser.cc.

References v8::internal::NULL.

ZoneList<v8::internal::Expression*>* NewExpressionList ( int  size,
Zone zone 
)
inline

Definition at line 577 of file parser.h.

ZoneList<ObjectLiteral::Property*>* NewPropertyList ( int  size,
Zone zone 
)
inline

Definition at line 580 of file parser.h.

Handle< String > NextLiteralString ( Scanner scanner,
PretenureFlag  tenured 
)

Definition at line 684 of file parser.cc.

References Scanner::AllocateNextLiteralString().

static ZoneList<Expression*>* NullExpressionList ( )
inlinestatic

Definition at line 554 of file parser.h.

References v8::internal::NULL.

FunctionLiteral * ParseFunctionLiteral ( Handle< String name,
Scanner::Location  function_name_location,
bool  name_is_strict_reserved,
bool  is_generator,
int  function_token_position,
FunctionLiteral::FunctionType  type,
bool *  ok 
)

Definition at line 755 of file parser.cc.

Expression * ParseV8Intrinsic ( bool *  ok)

Definition at line 750 of file parser.cc.

static void PushLiteralName ( FuncNameInferrer fni,
Handle< String id 
)
inlinestatic

Definition at line 475 of file parser.h.

References FuncNameInferrer::PushLiteralName().

void PushPropertyName ( FuncNameInferrer fni,
Expression expression 
)
void ReportMessage ( const char *  message,
Vector< Handle< String > >  args,
bool  is_reference_error = false 
)
static void SetUpFunctionState ( FunctionState *  function_state,
Zone zone 
)
inlinestatic

Definition at line 442 of file parser.h.

References BailoutId::FirstUsable(), and Zone::isolate().

bool ShortcutNumericLiteralBinaryExpression ( Expression **  x,
Expression y,
Token::Value  op,
int  pos,
AstNodeFactory< AstConstructionVisitor > *  factory 
)
static void TearDownFunctionState ( FunctionState *  function_state)
inlinestatic

Definition at line 450 of file parser.h.

References v8::internal::NULL.

Expression * ThisExpression ( Scope scope,
AstNodeFactory< AstConstructionVisitor > *  factory 
)

Definition at line 690 of file parser.cc.

References Scope::receiver().


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