Home | History | Annotate | Download | only in parsing

Lines Matching refs:Parser

5 #include "src/parsing/parser.h"
110 DiscardableZoneScope(Parser* parser, Zone* temp_zone, bool use_temp_zone)
111 : ast_node_factory_scope_(parser->factory(), temp_zone, use_temp_zone),
112 fni_(parser->ast_value_factory_, temp_zone),
113 parser_(parser),
114 prev_fni_(parser->fni_),
115 prev_zone_(parser->zone_) {
139 Parser* parser_;
146 void Parser::SetCachedData(ParseInfo* info) {
156 Expression* Parser::CallClassFieldInitializer(Scope* scope,
174 Expression* Parser::RewriteSuperCall(Expression* super_call) {
210 FunctionLiteral* Parser::DefaultConstructor(const AstRawString* name,
314 // Implementation of Parser
316 bool Parser::ShortcutNumericLiteralBinaryExpression(Expression** x,
386 Expression* Parser::BuildUnaryExpression(Expression* expression,
430 Expression* Parser::BuildIteratorResult(Expression* value, bool done) {
443 Expression* Parser::NewThrowError(Runtime::FunctionId id,
453 Expression* Parser::NewSuperPropertyReference(int pos) {
465 Expression* Parser::NewSuperCallReference(int pos) {
475 Expression* Parser::NewTargetExpression(int pos) {
481 Expression* Parser::FunctionSentExpression(int pos) {
491 Literal* Parser::ExpressionFromLiteral(Token::Value token, int pos) {
514 Expression* Parser::GetIterator(Expression* iterable, int pos) {
523 void Parser::MarkTailPosition(Expression* expression) {
527 Expression* Parser::NewV8Intrinsic(const AstRawString* name,
582 Parser::Parser(ParseInfo* info)
583 : ParserBase<Parser>(info->zone(), &scanner_, info->stack_limit(),
597 // Parser - this makes sure that Isolate is not accidentally accessed via
603 // builtins cannot be handled lazily by the parser, since we have to know
605 // parser records.
643 void Parser::DeserializeScopeChain(
661 FunctionLiteral* Parser::ParseProgram(Isolate* isolate, ParseInfo* info) {
681 // Initialize parser state.
726 FunctionLiteral* Parser::DoParseProgram(ParseInfo* info) {
785 // The parser will peek but not consume EOS. Our scope logically goes all
830 FunctionLiteral* Parser::ParseFunction(Isolate* isolate, ParseInfo* info) {
846 // Initialize parser state.
883 FunctionLiteral* Parser::DoParseFunction(ParseInfo* info,
971 // The pre-parser saw an arrow function here, so the full parser
1015 Statement* Parser::ParseModuleItem(bool* ok) {
1034 void Parser::ParseModuleItemList(ZoneList<Statement*>* body, bool* ok) {
1053 const AstRawString* Parser::ParseModuleSpecifier(bool* ok) {
1062 void Parser::ParseExportClause(ZoneList<const AstRawString*>* export_names,
1112 ZoneList<const Parser::NamedImport*>* Parser::ParseNamedImports(
1167 void Parser::ParseImportDeclaration(bool* ok) {
1271 Statement* Parser::ParseExportDefault(bool* ok) {
1335 Statement* Parser::ParseExportDeclaration(bool* ok) {
1451 VariableProxy* Parser::NewUnresolved(const AstRawString* name, int begin_pos,
1456 VariableProxy* Parser::NewUnresolved(const AstRawString* name) {
1460 Declaration* Parser::DeclareVariable(const AstRawString* name,
1466 Declaration* Parser::DeclareVariable(const AstRawString* name,
1480 Variable* Parser::Declare(Declaration* declaration,
1513 Block* Parser::BuildInitializationBlock(
1526 void Parser::DeclareAndInitializeVariables(
1535 Statement* Parser::DeclareFunction(const AstRawString* variable_name,
1568 Statement* Parser::DeclareClass(const AstRawString* variable_name,
1583 Statement* Parser::DeclareNative(const AstRawString* name, int pos, bool* ok) {
1602 ZoneList<const AstRawString*>* Parser::DeclareLabel(
1626 bool Parser::ContainsLabel(ZoneList<const AstRawString*>* labels,
1637 Expression* Parser::RewriteReturn(Expression* return_value, int pos) {
1684 Expression* Parser::RewriteDoExpression(Block* body, int pos, bool* ok) {
1694 Statement* Parser::RewriteSwitchStatement(Expression* tag,
1736 void Parser::RewriteCatchPattern(CatchInfo* catch_info, bool* ok) {
1769 void Parser::ValidateCatchBlock(const CatchInfo& catch_info, bool* ok) {
1788 Statement* Parser::RewriteTryStatement(Block* try_block, Block* catch_block,
1835 Expression* Parser::BuildIteratorNextResult(Expression* iterator,
1870 Statement* Parser::InitializeForEachStatement(ForEachStatement* stmt,
1917 Block* Parser::RewriteForVarInLegacy(const ForInfo& for_info) {
1953 void Parser::DesugarBindingInForEachStatement(ForInfo* for_info,
2012 Block* Parser::CreateForEachStatementTDZ(Block* init_block,
2031 Statement* Parser::InitializeForOfStatement(ForOfStatement* for_of,
2091 factory()->NewSmiLiteral(Parser::kAbruptCompletion, nopos), nopos);
2132 factory()->NewSmiLiteral(Parser::kNormalCompletion, nopos), nopos);
2154 Statement* Parser::DesugarLexicalBindingsInForStatement(
2394 void Parser::AddArrowFunctionFormalParameters(
2447 void Parser::DeclareArrowFunctionFormalParameters(
2479 void Parser::ReindexLiterals(const ParserFormalParameters& parameters) {
2492 void Parser::PrepareGeneratorVariables(FunctionState* function_state) {
2507 FunctionLiteral* Parser::ParseFunctionLiteral(
2590 // - The invoker of this parser can't depend on the AST being eagerly
2651 // which case the parser is expected to have backtracked), or if we didn't
2745 Parser::LazyParsingResult Parser::SkipFunction(
2812 // Return immediately if pre-parser decided to abort parsing.
2846 Statement* Parser::BuildAssertIsCoercible(Variable* var) {
2873 InitializerRewriter(uintptr_t stack_limit, Expression* root, Parser* parser,
2876 parser_(parser),
2887 Parser::PatternRewriter::RewriteDestructuringAssignment(parser_, to_rewrite,
2895 Parser
2900 void Parser::RewriteParameterInitializer(Expression* expr, Scope* scope) {
2906 Block* Parser::BuildParameterInitializationBlock(
2978 Block* Parser::BuildRejectPromiseOnException(Block* inner_block, bool* ok) {
3048 Expression* Parser::BuildCreateJSGeneratorObject(int pos, FunctionKind kind) {
3059 Expression* Parser::BuildResolvePromise(Expression* value, int pos) {
3071 Expression* Parser::BuildRejectPromise(Expression* value, int pos) {
3086 Variable* Parser::PromiseVariable() {
3098 Expression* Parser::BuildInitialYield(int pos, FunctionKind kind) {
3113 ZoneList<Statement*>* Parser::ParseFunction(
3159 ZoneList<Statement*>* Parser::ParseEagerFunctionBody(
3315 Expression* Parser::InstallHomeObject(Expression* function_literal,
3346 FunctionLiteral* Parser::SynthesizeClassFieldInitializer(int count) {
3424 FunctionLiteral* Parser::InsertClassFieldInitializer(
3439 void Parser::DeclareClassVariable(const AstRawString* name, Scope* block_scope,
3461 void Parser::DeclareClassProperty(const AstRawString* class_name,
3528 Expression* Parser::RewriteClassLiteral(const AstRawString* name,
3630 Literal* Parser::GetLiteralUndefined(int position) {
3635 void Parser::CheckConflictingVarDeclarations(Scope* scope, bool* ok) {
3651 void Parser::InsertShadowingVarBindingInitializers(Block* inner_block) {
3676 void Parser::InsertSloppyBlockFunctionVarBindings(DeclarationScope* scope) {
3688 // Parser support
3690 bool Parser::TargetStackContainsLabel(const AstRawString* label) {
3698 BreakableStatement* Parser::LookupBreakTarget(const AstRawString* label,
3712 IterationStatement* Parser::LookupContinueTarget(const AstRawString* label,
3728 void Parser::HandleSourceURLComments(Isolate* isolate, Handle<Script> script) {
3740 void Parser::Internalize(Isolate* isolate, Handle<Script> script, bool error) {
3782 // The Parser interface.
3785 bool Parser::ParseStatic(ParseInfo* info) {
3786 Parser parser(info);
3787 if (parser.Parse(info)) {
3795 bool Parser::Parse(ParseInfo* info) {
3815 void Parser::ParseOnBackground(ParseInfo* info) {
3860 // care of calling Parser::Internalize just before compilation.
3872 Parser::TemplateLiteralState Parser::OpenTemplateLiteral(int pos) {
3877 void Parser::AddTemplateSpan(TemplateLiteralState* state, bool tail) {
3888 void Parser::AddTemplateExpression(TemplateLiteralState* state,
3894 Expression* Parser::CloseTemplateLiteral(TemplateLiteralState* state, int start,
3959 uint32_t Parser::ComputeTemplateLiteralHash(const TemplateLiteral* lit) {
3988 ZoneList<Expression*>* Parser::PrepareSpreadArguments(
4050 Expression* Parser::SpreadCall(Expression* function,
4093 Expression* Parser::SpreadCallNew(Expression* function,
4101 void Parser::SetLanguageMode(Scope* scope, LanguageMode mode) {
4113 void Parser::SetAsmModule() {
4121 void Parser::MarkCollectedTailCallExpressions() {
4129 Expression* Parser::ExpressionListToExpression(ZoneList<Expression*>* args) {
4140 void Parser::PrepareAsyncFunctionBody(ZoneList<Statement*>* body,
4163 void Parser::RewriteAsyncFunctionBody(ZoneList<Statement*>* body, Block* block,
4181 Expression* Parser::RewriteAwaitExpression(Expression* value, int await_pos) {
4230 // The parser emits calls to AsyncFunctionAwaitCaught, but the
4250 NonPatternRewriter(uintptr_t stack_limit, Parser* parser)
4251 : AstExpressionRewriter(stack_limit), parser_(parser) {}
4282 Parser* parser_;
4285 void Parser::RewriteNonPattern(bool* ok) {
4301 void Parser::RewriteDestructuringAssignments() {
4321 Expression* Parser::RewriteExponentiation(Expression* left, Expression* right,
4329 Expression* Parser::RewriteAssignExponentiation(Expression* left,
4374 Expression* Parser::RewriteSpreads(ArrayLiteral* lit) {
4463 void Parser::QueueDestructuringAssignmentForRewriting(Expression* expr) {
4469 void Parser::QueueNonPatternForRewriting(Expression* expr, bool* ok) {
4474 void Parser::AddAccessorPrefixToFunctionName(bool is_get,
4483 void Parser::SetFunctionNameFromPropertyName(ObjectLiteralProperty* property,
4502 void Parser::SetFunctionNameFromIdentifierRef(Expression* value,
4508 void Parser::SetFunctionName(Expression* value, const AstRawString* name) {
4601 Expression* Parser::RewriteYieldStar(Expression* generator,
4752 factory()->NewSmiLiteral(Parser::kNormalCompletion, nopos));
5003 Statement* Parser::CheckCallable(Variable* var, Expression* error, int pos) {
5022 void Parser::BuildIteratorClose(ZoneList<Statement*>* statements,
5119 void Parser::FinalizeIteratorUse(Scope* use_scope, Variable* completion,
5149 factory()->NewSmiLiteral(Parser::kNormalCompletion, nopos), nopos);
5159 factory()->NewSmiLiteral(Parser::kAbruptCompletion, nopos), nopos);
5164 factory()->NewSmiLiteral(Parser::kThrowCompletion, nopos), nopos);
5235 void Parser::BuildIteratorCloseForCompletion(Scope* scope,
5369 factory()->NewSmiLiteral(Parser::kThrowCompletion, nopos), nopos);
5395 Statement* Parser::FinalizeForOfStatement(ForOfStatement* loop,
5425 factory()->NewSmiLiteral(Parser::kNormalCompletion, nopos), nopos);
5439 // The scope in which the parser creates this loop.