![]() |
v8
3.25.30(node0.11.13)
V8 is Google's open source JavaScript engine
|
#include <parser.h>

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) |
| Expression * | BuildUnaryExpression (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< String > | GetSymbol (Scanner *scanner=NULL) |
| Handle< String > | NextLiteralString (Scanner *scanner, PretenureFlag tenured) |
| Expression * | ThisExpression (Scope *scope, AstNodeFactory< AstConstructionVisitor > *factory) |
| Literal * | ExpressionFromLiteral (Token::Value token, int pos, Scanner *scanner, AstNodeFactory< AstConstructionVisitor > *factory) |
| Expression * | ExpressionFromIdentifier (Handle< String > name, int pos, Scope *scope, AstNodeFactory< AstConstructionVisitor > *factory) |
| Expression * | ExpressionFromString (int pos, Scanner *scanner, AstNodeFactory< AstConstructionVisitor > *factory) |
| ZoneList < v8::internal::Expression * > * | NewExpressionList (int size, Zone *zone) |
| ZoneList < ObjectLiteral::Property * > * | NewPropertyList (int size, Zone *zone) |
| Expression * | ParseV8Intrinsic (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 Expression * | MarkExpressionAsLValue (Expression *expression) |
| static Handle< String > | EmptyIdentifier () |
| static Expression * | EmptyExpression () |
| static Literal * | EmptyLiteral () |
| static ZoneList< Expression * > * | NullExpressionList () |
|
inlineexplicit |
| Expression * BuildUnaryExpression | ( | Expression * | expression, |
| Token::Value | op, | ||
| int | pos, | ||
| AstNodeFactory< AstConstructionVisitor > * | factory | ||
| ) |
Definition at line 556 of file parser.cc.
References v8::internal::ADD, ASSERT, Value::BooleanValue(), v8::internal::DoubleToInt32(), Isolate::factory(), Value::IsNumber(), v8::internal::MUL, v8::internal::NOT, v8::internal::NULL, v8::internal::SUB, and Factory::ToBoolean().
|
static |
Definition at line 454 of file parser.cc.
References ASSERT, and v8::internal::NULL.
|
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 | ||
| ) |
Definition at line 464 of file parser.cc.
References Scope::DeclarationScope(), Isolate::factory(), v8::internal::NULL, and Scope::RecordEvalCall().
| void CheckStrictModeLValue | ( | Expression * | expression, |
| bool * | ok | ||
| ) |
Definition at line 483 of file parser.cc.
References ParserTraits::IsEvalOrArguments(), v8::internal::NULL, and ParserBase< Traits >::ReportMessage().
|
inlinestatic |
Definition at line 547 of file parser.h.
References v8::internal::NULL.
|
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 | ||
| ) |
Definition at line 720 of file parser.cc.
References ParserBase< Traits >::fni_, v8::internal::interface(), Interface::NewUnknown(), Scope::NewUnresolved(), v8::internal::NULL, v8::internal::PrintF(), and FuncNameInferrer::PushVariableName().
| 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 | ||
| ) |
Definition at line 734 of file parser.cc.
References ParserBase< Traits >::fni_, ParserTraits::GetSymbol(), v8::internal::NULL, and FuncNameInferrer::PushLiteralName().
| Literal * GetLiteralTheHole | ( | int | position, |
| AstNodeFactory< AstConstructionVisitor > * | factory | ||
| ) |
Definition at line 743 of file parser.cc.
References Isolate::factory().
Definition at line 664 of file parser.cc.
References Scanner::AllocateInternalizedString(), ASSERT, v8::internal::CONSUME_CACHED_DATA, Handle< T >::is_null(), ParserBase< Traits >::log_, Scanner::LogSymbol(), ParserBase< Traits >::position(), v8::internal::PRODUCE_CACHED_DATA, ParserBase< Traits >::scanner(), and ParserRecorder::ShouldLogSymbols().
Referenced by ParserTraits::ExpressionFromString().
|
inlinestatic |
Definition at line 420 of file parser.cc.
References Isolate::factory().
Referenced by ParserTraits::CheckStrictModeLValue().
|
static |
Definition at line 437 of file parser.cc.
References v8::internal::NULL.
|
static |
Definition at line 428 of file parser.cc.
References ASSERT, and v8::internal::NULL.
|
static |
Definition at line 474 of file parser.cc.
References v8::internal::NULL.
|
inline |
| Handle< String > NextLiteralString | ( | Scanner * | scanner, |
| PretenureFlag | tenured | ||
| ) |
Definition at line 684 of file parser.cc.
References Scanner::AllocateNextLiteralString().
|
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 | ||
| ) |
| Expression * ParseV8Intrinsic | ( | bool * | ok | ) |
|
inlinestatic |
Definition at line 475 of file parser.h.
References FuncNameInferrer::PushLiteralName().
| void PushPropertyName | ( | FuncNameInferrer * | fni, |
| Expression * | expression | ||
| ) |
Definition at line 443 of file parser.cc.
References Isolate::factory(), Expression::IsPropertyName(), and FuncNameInferrer::PushLiteralName().
| void ReportMessage | ( | const char * | message, |
| Vector< Handle< String > > | args, | ||
| bool | is_reference_error = false |
||
| ) |
Definition at line 630 of file parser.cc.
References Scanner::location(), ParserTraits::ReportMessageAt(), and ParserBase< Traits >::scanner().
| void ReportMessageAt | ( | Scanner::Location | source_location, |
| const char * | message, | ||
| Vector< const char * > | args, | ||
| bool | is_reference_error = false |
||
| ) |
Definition at line 602 of file parser.cc.
References ASSERT, Scanner::Location::beg_pos, v8::internal::CStrVector(), Scanner::Location::end_pos, Isolate::factory(), Handle< T >::is_null(), Vector< T >::length(), Factory::NewFixedArray(), Factory::NewJSArrayWithElements(), Factory::NewReferenceError(), Factory::NewStringFromUtf8(), Factory::NewSyntaxError(), ParserBase< Traits >::stack_overflow(), and Isolate::Throw().
Referenced by Parser::Parse(), and ParserTraits::ReportMessage().
| void ReportMessageAt | ( | Scanner::Location | source_location, |
| const char * | message, | ||
| Vector< Handle< String > > | args, | ||
| bool | is_reference_error = false |
||
| ) |
Definition at line 638 of file parser.cc.
References Scanner::Location::beg_pos, Scanner::Location::end_pos, Isolate::factory(), Factory::NewFixedArray(), Factory::NewJSArrayWithElements(), Factory::NewReferenceError(), Factory::NewSyntaxError(), ParserBase< Traits >::stack_overflow(), and Isolate::Throw().
|
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 | ||
| ) |
Definition at line 496 of file parser.cc.
References v8::internal::ADD, v8::internal::ArithmeticShiftRight(), v8::internal::DIV, v8::internal::DoubleToInt32(), v8::internal::DoubleToUint32(), v8::internal::MUL, v8::internal::shift, and v8::internal::SUB.
|
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().