V8 Project
|
#include <preparser.h>
Classes | |
class | BASE_EMBEDDED |
class | ObjectLiteralChecker |
Public Types | |
typedef Traits::Type::Expression | ExpressionT |
typedef Traits::Type::Identifier | IdentifierT |
typedef Traits::Type::FunctionLiteral | FunctionLiteralT |
typedef Traits::Type::Literal | LiteralT |
typedef Traits::Type::ObjectLiteralProperty | ObjectLiteralPropertyT |
Public Member Functions | |
ParserBase (Scanner *scanner, uintptr_t stack_limit, v8::Extension *extension, ParserRecorder *log, typename Traits::Type::Zone *zone, AstNode::IdGen *ast_node_id_gen, typename Traits::Type::Parser this_object) | |
bool | allow_lazy () const |
bool | allow_natives_syntax () const |
bool | allow_arrow_functions () const |
bool | allow_modules () const |
bool | allow_harmony_scoping () const |
bool | allow_harmony_numeric_literals () const |
bool | allow_classes () const |
bool | allow_harmony_object_literals () const |
void | set_allow_lazy (bool allow) |
void | set_allow_natives_syntax (bool allow) |
void | set_allow_arrow_functions (bool allow) |
void | set_allow_modules (bool allow) |
void | set_allow_harmony_scoping (bool allow) |
void | set_allow_harmony_numeric_literals (bool allow) |
void | set_allow_classes (bool allow) |
void | set_allow_harmony_object_literals (bool allow) |
Protected Types | |
enum | AllowEvalOrArgumentsAsIdentifier { kAllowEvalOrArguments , kDontAllowEvalOrArguments } |
enum | Mode { PARSE_LAZILY , PARSE_EAGERLY } |
enum | PropertyKind { kNone = 0 , kGetterProperty = 1 , kSetterProperty = 2 , kValueProperty = 7 , kValueFlag = 4 } |
Static Protected Member Functions | |
static int | Precedence (Token::Value token, bool accept_IN) |
Protected Attributes | |
bool | parenthesized_function_ |
Traits::Type::Scope * | scope_ |
FunctionState * | function_state_ |
v8::Extension * | extension_ |
FuncNameInferrer * | fni_ |
ParserRecorder * | log_ |
Mode | mode_ |
uintptr_t | stack_limit_ |
Private Attributes | |
Scanner * | scanner_ |
bool | stack_overflow_ |
bool | allow_lazy_ |
bool | allow_natives_syntax_ |
bool | allow_arrow_functions_ |
bool | allow_harmony_object_literals_ |
Traits::Type::Zone * | zone_ |
AstNode::IdGen * | ast_node_id_gen_ |
Friends | |
class | Traits::Checkpoint |
Definition at line 62 of file preparser.h.
typedef Traits::Type::Expression v8::internal::ParserBase< Traits >::ExpressionT |
Definition at line 65 of file preparser.h.
typedef Traits::Type::FunctionLiteral v8::internal::ParserBase< Traits >::FunctionLiteralT |
Definition at line 67 of file preparser.h.
typedef Traits::Type::Identifier v8::internal::ParserBase< Traits >::IdentifierT |
Definition at line 66 of file preparser.h.
typedef Traits::Type::Literal v8::internal::ParserBase< Traits >::LiteralT |
Definition at line 68 of file preparser.h.
typedef Traits::Type::ObjectLiteralProperty v8::internal::ParserBase< Traits >::ObjectLiteralPropertyT |
Definition at line 69 of file preparser.h.
|
protected |
Enumerator | |
---|---|
kAllowEvalOrArguments | |
kDontAllowEvalOrArguments |
Definition at line 128 of file preparser.h.
|
protected |
|
protected |
Enumerator | |
---|---|
kNone | |
kGetterProperty | |
kSetterProperty | |
kValueProperty | |
kValueFlag |
Definition at line 528 of file preparser.h.
|
inline |
Definition at line 71 of file preparser.h.
|
inline |
Definition at line 97 of file preparser.h.
References v8::internal::ParserBase< Traits >::allow_arrow_functions_.
|
inline |
Definition at line 103 of file preparser.h.
References v8::internal::Scanner::HarmonyClasses(), and v8::internal::ParserBase< Traits >::scanner().
|
inline |
Definition at line 100 of file preparser.h.
References v8::internal::Scanner::HarmonyNumericLiterals(), and v8::internal::ParserBase< Traits >::scanner().
|
inline |
Definition at line 104 of file preparser.h.
References v8::internal::ParserBase< Traits >::allow_harmony_object_literals_.
|
inline |
Definition at line 99 of file preparser.h.
References v8::internal::Scanner::HarmonyScoping(), and v8::internal::ParserBase< Traits >::scanner().
|
inline |
Definition at line 95 of file preparser.h.
References v8::internal::ParserBase< Traits >::allow_lazy_.
|
inline |
Definition at line 98 of file preparser.h.
References v8::internal::Scanner::HarmonyModules(), and v8::internal::ParserBase< Traits >::scanner().
|
inline |
Definition at line 96 of file preparser.h.
References v8::internal::ParserBase< Traits >::allow_natives_syntax_.
|
inlineprotected |
Definition at line 292 of file preparser.h.
References v8::internal::ParserBase< Traits >::ast_node_id_gen_.
|
inlineprotected |
Definition at line 319 of file preparser.h.
References v8::internal::ParserBase< Traits >::Consume().
|
protected |
Definition at line 2782 of file preparser.h.
References v8::internal::Scanner::Location::beg_pos, and v8::internal::STRICT.
|
inlineprotected |
Definition at line 361 of file preparser.h.
References v8::internal::ParserBase< Traits >::Consume(), and v8::internal::ParserBase< Traits >::scanner().
|
inlineprotected |
Definition at line 381 of file preparser.h.
References v8::internal::Scanner::Location::beg_pos, v8::internal::Scanner::clear_octal_position(), v8::internal::Scanner::Location::end_pos, v8::internal::Scanner::Location::IsValid(), v8::internal::Scanner::octal_position(), v8::internal::ParserBase< Traits >::ReportMessageAt(), and v8::internal::ParserBase< Traits >::scanner().
|
inlineprotected |
Definition at line 394 of file preparser.h.
References v8::internal::Scanner::Location::IsValid().
|
inlineprotected |
Definition at line 312 of file preparser.h.
Referenced by v8::internal::ParserBase< Traits >::Check(), and v8::internal::ParserBase< Traits >::CheckContextualKeyword().
|
inlineprotected |
Definition at line 328 of file preparser.h.
References v8::internal::ParserBase< Traits >::ReportUnexpectedToken().
Referenced by v8::internal::ParserBase< Traits >::ExpectContextualKeyword(), and v8::internal::ParserBase< Traits >::ExpectSemicolon().
|
inlineprotected |
Definition at line 370 of file preparser.h.
References v8::internal::ParserBase< Traits >::Expect(), v8::internal::ParserBase< Traits >::ReportUnexpectedToken(), and v8::internal::ParserBase< Traits >::scanner().
|
inlineprotected |
Definition at line 336 of file preparser.h.
References v8::internal::ParserBase< Traits >::Expect(), and v8::internal::ParserBase< Traits >::scanner().
|
inlineprotected |
Definition at line 436 of file preparser.h.
References v8::internal::ParserBase< Traits >::function_state_.
Referenced by v8::internal::ParserTraits::NewThrowError().
|
inlineprotected |
Definition at line 299 of file preparser.h.
References v8::internal::GetCurrentStackPosition(), v8::internal::Scanner::Next(), v8::internal::ParserBase< Traits >::scanner(), v8::internal::ParserBase< Traits >::stack_limit_, and v8::internal::ParserBase< Traits >::stack_overflow_.
|
inlineprotected |
Definition at line 294 of file preparser.h.
References v8::internal::Scanner::peek(), v8::internal::ParserBase< Traits >::scanner(), and v8::internal::ParserBase< Traits >::stack_overflow_.
|
inlineprotected |
Definition at line 441 of file preparser.h.
References v8::internal::ParserBase< Traits >::function_state_.
Referenced by v8::internal::ParserBase< Traits >::BASE_EMBEDDED::set_generator_object_variable(), and v8::internal::ParserBase< Traits >::BASE_EMBEDDED::set_is_generator().
|
inlineprotected |
Definition at line 290 of file preparser.h.
References v8::internal::ParserBase< Traits >::mode_.
Referenced by v8::internal::ParserBase< Traits >::BASE_EMBEDDED::ParsingModeScope().
|
protected |
Definition at line 2106 of file preparser.h.
References CHECK_OK_CUSTOM, COMMA, and v8::internal::Code::kMaxArguments.
|
protected |
Definition at line 1888 of file preparser.h.
|
protected |
Definition at line 2610 of file preparser.h.
References CHECK_OK, v8::internal::FUNCTION_SCOPE, v8::internal::Scanner::Location::invalid(), v8::internal::kArrowFunction, v8::internal::Code::kMaxArguments, v8::internal::RelocInfo::kNoPosition, mode(), NULL, and v8::internal::STRICT.
|
protected |
Definition at line 2137 of file preparser.h.
References v8::internal::Scanner::Location::beg_pos, CHECK_OK, v8::internal::Token::IsAssignmentOp(), NULL, and v8::internal::YIELD.
|
protected |
Definition at line 2278 of file preparser.h.
References CHECK_OK, DCHECK, v8::internal::EQ, v8::internal::Token::IsCompareOp(), v8::internal::NOT, and v8::base::internal::y.
|
protected |
Definition at line 2721 of file preparser.h.
References v8::internal::BLOCK_SCOPE, CHECK_OK, name, NULL, and v8::internal::STRICT.
|
protected |
|
protected |
Definition at line 1870 of file preparser.h.
|
protected |
Definition at line 1637 of file preparser.h.
References v8::internal::LET, name, v8::internal::SLOPPY, v8::internal::STRICT, and v8::internal::YIELD.
|
protected |
Definition at line 1684 of file preparser.h.
References v8::internal::Token::IsKeyword(), v8::internal::LET, and v8::internal::YIELD.
|
protected |
Definition at line 1699 of file preparser.h.
|
protected |
|
protected |
Definition at line 2397 of file preparser.h.
References CHECK_OK, mode(), name, and NULL.
|
protected |
Definition at line 2515 of file preparser.h.
References CHECK_OK, v8::internal::function_token_position, v8::internal::Scanner::Location::invalid(), v8::internal::kGeneratorFunction, v8::internal::kNormalFunction, v8::internal::MUL, and name.
|
protected |
Definition at line 2571 of file preparser.h.
|
protected |
Definition at line 2468 of file preparser.h.
References CHECK_OK.
|
protected |
Definition at line 2047 of file preparser.h.
|
protected |
Definition at line 2372 of file preparser.h.
References CHECK_OK, and v8::internal::Token::IsCountOp().
|
protected |
Definition at line 1750 of file preparser.h.
References CHECK_OK, v8::internal::DIV, v8::internal::Scanner::Location::invalid(), v8::internal::LET, name, NULL, STRING, and v8::internal::YIELD.
|
protected |
Definition at line 1942 of file preparser.h.
References CHECK_OK_CUSTOM, v8::internal::ParserBase< Traits >::ObjectLiteralChecker::CheckProperty(), v8::internal::kConciseGeneratorMethod, v8::internal::kConciseMethod, v8::internal::RelocInfo::kNoPosition, v8::internal::kNormalFunction, v8::internal::MUL, name, and NULL.
|
protected |
Definition at line 1919 of file preparser.h.
References STRING, and UNREACHABLE.
|
protected |
Definition at line 1710 of file preparser.h.
|
protected |
Definition at line 2322 of file preparser.h.
References CHECK_OK, v8::internal::Token::IsCountOp(), v8::internal::Token::IsUnaryOp(), and v8::internal::STRICT.
|
protected |
Definition at line 2207 of file preparser.h.
References CHECK_OK, COMMA, DCHECK_EQ, v8::internal::MUL, and v8::internal::YIELD.
|
inlineprotected |
|
inlineprotected |
Definition at line 287 of file preparser.h.
References v8::internal::Scanner::Location::beg_pos, v8::internal::Scanner::peek_location(), and v8::internal::ParserBase< Traits >::scanner_.
|
inlineprotected |
Definition at line 286 of file preparser.h.
References v8::internal::Scanner::Location::beg_pos, v8::internal::Scanner::location(), and v8::internal::ParserBase< Traits >::scanner_.
|
inlinestaticprotected |
Definition at line 430 of file preparser.h.
References IN, and v8::internal::Token::Precedence().
|
inlineprotected |
Definition at line 444 of file preparser.h.
References v8::internal::Scanner::location(), and v8::internal::ParserBase< Traits >::scanner().
Referenced by v8::internal::ParserBase< Traits >::ObjectLiteralChecker::CheckProperty().
|
inlineprotected |
Definition at line 450 of file preparser.h.
References NULL.
Referenced by v8::internal::ParserBase< Traits >::CheckOctalLiteral().
|
protected |
Definition at line 1608 of file preparser.h.
References DCHECK, v8::internal::LET, name, NULL, v8::internal::SLOPPY, STRING, v8::internal::Token::String(), and v8::internal::YIELD.
Referenced by v8::internal::ParserBase< Traits >::Expect(), and v8::internal::ParserBase< Traits >::ExpectContextualKeyword().
|
inlineprotected |
Definition at line 285 of file preparser.h.
References v8::internal::ParserBase< Traits >::scanner_.
Referenced by v8::internal::ParserBase< Traits >::allow_classes(), v8::internal::ParserBase< Traits >::allow_harmony_numeric_literals(), v8::internal::ParserBase< Traits >::allow_harmony_scoping(), v8::internal::ParserBase< Traits >::allow_modules(), v8::internal::ParserBase< Traits >::CheckContextualKeyword(), v8::internal::ParserBase< Traits >::CheckOctalLiteral(), v8::internal::ParserBase< Traits >::ExpectContextualKeyword(), v8::internal::ParserBase< Traits >::ExpectSemicolon(), v8::internal::ParserTraits::GetNextSymbol(), v8::internal::ParserTraits::GetNumberAsSymbol(), v8::internal::ParserTraits::GetSymbol(), v8::internal::ParserBase< Traits >::INLINE(), v8::internal::ParserTraits::IsFutureStrictReserved(), v8::internal::ParserTraits::ReportMessage(), v8::internal::ParserBase< Traits >::ReportMessage(), v8::internal::ParserBase< Traits >::ObjectLiteralChecker::scanner(), v8::internal::ParserBase< Traits >::set_allow_classes(), v8::internal::ParserBase< Traits >::set_allow_harmony_numeric_literals(), v8::internal::ParserBase< Traits >::set_allow_harmony_scoping(), and v8::internal::ParserBase< Traits >::set_allow_modules().
|
inline |
Definition at line 112 of file preparser.h.
References v8::internal::ParserBase< Traits >::allow_arrow_functions_.
Referenced by v8::internal::Parser::ParseLazyFunctionBodyWithPreParser().
|
inline |
Definition at line 120 of file preparser.h.
References v8::internal::ParserBase< Traits >::scanner(), and v8::internal::Scanner::SetHarmonyClasses().
Referenced by v8::internal::Parser::ParseLazyFunctionBodyWithPreParser().
|
inline |
Definition at line 117 of file preparser.h.
References v8::internal::ParserBase< Traits >::scanner(), and v8::internal::Scanner::SetHarmonyNumericLiterals().
Referenced by v8::internal::Parser::ParseLazyFunctionBodyWithPreParser().
|
inline |
Definition at line 121 of file preparser.h.
References v8::internal::ParserBase< Traits >::allow_harmony_object_literals_.
Referenced by v8::internal::Parser::ParseLazyFunctionBodyWithPreParser().
|
inline |
Definition at line 114 of file preparser.h.
References v8::internal::ParserBase< Traits >::scanner(), and v8::internal::Scanner::SetHarmonyScoping().
Referenced by v8::internal::Parser::ParseLazyFunctionBodyWithPreParser().
|
inline |
Definition at line 110 of file preparser.h.
References v8::internal::ParserBase< Traits >::allow_lazy_.
Referenced by v8::internal::Parser::Parse(), and v8::internal::Parser::ParseLazyFunctionBodyWithPreParser().
|
inline |
Definition at line 113 of file preparser.h.
References v8::internal::ParserBase< Traits >::scanner(), and v8::internal::Scanner::SetHarmonyModules().
Referenced by v8::internal::Parser::ParseLazyFunctionBodyWithPreParser().
|
inline |
Definition at line 111 of file preparser.h.
References v8::internal::ParserBase< Traits >::allow_natives_syntax_.
Referenced by v8::internal::Parser::ParseLazyFunctionBodyWithPreParser().
|
inlineprotected |
Definition at line 289 of file preparser.h.
References v8::internal::ParserBase< Traits >::stack_overflow_.
|
inlineprotected |
Definition at line 288 of file preparser.h.
References v8::internal::ParserBase< Traits >::stack_overflow_.
Referenced by v8::internal::ParserTraits::ReportMessageAt().
|
inlineprotected |
|
inlineprotected |
Definition at line 291 of file preparser.h.
References v8::internal::ParserBase< Traits >::zone_.
Referenced by v8::internal::ParserTraits::GetIterator(), and v8::internal::ParserTraits::NewThrowError().
|
friend |
Definition at line 126 of file preparser.h.
|
private |
Definition at line 591 of file preparser.h.
Referenced by v8::internal::ParserBase< Traits >::allow_arrow_functions(), and v8::internal::ParserBase< Traits >::set_allow_arrow_functions().
|
private |
Definition at line 592 of file preparser.h.
Referenced by v8::internal::ParserBase< Traits >::allow_harmony_object_literals(), and v8::internal::ParserBase< Traits >::set_allow_harmony_object_literals().
|
private |
Definition at line 589 of file preparser.h.
Referenced by v8::internal::ParserBase< Traits >::allow_lazy(), and v8::internal::ParserBase< Traits >::set_allow_lazy().
|
private |
Definition at line 590 of file preparser.h.
Referenced by v8::internal::ParserBase< Traits >::allow_natives_syntax(), and v8::internal::ParserBase< Traits >::set_allow_natives_syntax().
|
private |
Definition at line 595 of file preparser.h.
Referenced by v8::internal::ParserBase< Traits >::ast_node_id_gen(), v8::internal::ParserTraits::Checkpoint::Checkpoint(), and v8::internal::ParserTraits::Checkpoint::Restore().
|
protected |
Definition at line 579 of file preparser.h.
|
protected |
Definition at line 580 of file preparser.h.
Referenced by v8::internal::ParserTraits::ExpressionFromIdentifier(), and v8::internal::ParserTraits::ExpressionFromString().
|
protected |
|
protected |
Definition at line 581 of file preparser.h.
Referenced by v8::internal::PreParserTraits::ReportMessageAt().
|
protected |
Definition at line 582 of file preparser.h.
Referenced by v8::internal::ParserBase< Traits >::mode().
|
protected |
Definition at line 575 of file preparser.h.
|
private |
Definition at line 586 of file preparser.h.
Referenced by v8::internal::ParserBase< Traits >::peek_position(), v8::internal::ParserBase< Traits >::position(), and v8::internal::ParserBase< Traits >::scanner().
|
protected |
Definition at line 577 of file preparser.h.
Referenced by v8::internal::ParserBase< Traits >::BASE_EMBEDDED::BlockState(), and v8::internal::ParserBase< Traits >::strict_mode().
|
protected |
Definition at line 583 of file preparser.h.
Referenced by v8::internal::ParserBase< Traits >::INLINE().
|
private |
Definition at line 587 of file preparser.h.
Referenced by v8::internal::ParserBase< Traits >::INLINE(), v8::internal::ParserBase< Traits >::set_stack_overflow(), and v8::internal::ParserBase< Traits >::stack_overflow().
|
private |
Definition at line 594 of file preparser.h.
Referenced by v8::internal::ParserBase< Traits >::zone().