Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(83)

Side by Side Diff: src/parsing/parser.cc

Issue 2479213002: [parser] Only track parsing-mode (and possibly switch to the preparser) in the parser (Closed)
Patch Set: Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/parsing/parser.h" 5 #include "src/parsing/parser.h"
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #include "src/api.h" 9 #include "src/api.h"
10 #include "src/ast/ast-expression-rewriter.h" 10 #include "src/ast/ast-expression-rewriter.h"
(...skipping 572 matching lines...) Expand 10 before | Expand all | Expand 10 after
583 583
584 return factory()->NewCallRuntime(context_index, args, pos); 584 return factory()->NewCallRuntime(context_index, args, pos);
585 } 585 }
586 586
587 Parser::Parser(ParseInfo* info) 587 Parser::Parser(ParseInfo* info)
588 : ParserBase<Parser>(info->zone(), &scanner_, info->stack_limit(), 588 : ParserBase<Parser>(info->zone(), &scanner_, info->stack_limit(),
589 info->extension(), info->ast_value_factory()), 589 info->extension(), info->ast_value_factory()),
590 scanner_(info->unicode_cache()), 590 scanner_(info->unicode_cache()),
591 reusable_preparser_(nullptr), 591 reusable_preparser_(nullptr),
592 original_scope_(nullptr), 592 original_scope_(nullptr),
593 mode_(PARSE_EAGERLY), // Lazy mode must be set explicitly.
593 target_stack_(nullptr), 594 target_stack_(nullptr),
594 compile_options_(info->compile_options()), 595 compile_options_(info->compile_options()),
595 cached_parse_data_(nullptr), 596 cached_parse_data_(nullptr),
596 total_preparse_skipped_(0), 597 total_preparse_skipped_(0),
597 parsing_on_main_thread_(true), 598 parsing_on_main_thread_(true),
598 log_(nullptr) { 599 log_(nullptr) {
599 // Even though we were passed ParseInfo, we should not store it in 600 // Even though we were passed ParseInfo, we should not store it in
600 // Parser - this makes sure that Isolate is not accidentally accessed via 601 // Parser - this makes sure that Isolate is not accidentally accessed via
601 // ParseInfo during background parsing. 602 // ParseInfo during background parsing.
602 DCHECK(!info->script().is_null() || info->source_stream() != nullptr || 603 DCHECK(!info->script().is_null() || info->source_stream() != nullptr ||
(...skipping 4815 matching lines...) Expand 10 before | Expand all | Expand 10 after
5418 5419
5419 return final_loop; 5420 return final_loop;
5420 } 5421 }
5421 5422
5422 #undef CHECK_OK 5423 #undef CHECK_OK
5423 #undef CHECK_OK_VOID 5424 #undef CHECK_OK_VOID
5424 #undef CHECK_FAILED 5425 #undef CHECK_FAILED
5425 5426
5426 } // namespace internal 5427 } // namespace internal
5427 } // namespace v8 5428 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698