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

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

Issue 1814863005: Pass all parser flags from Parser to PreParser (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@turn-off-legacy-const
Patch Set: Mark a mozilla test as failing Created 4 years, 9 months 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
« no previous file with comments | « no previous file | test/mozilla/mozilla.status » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "src/api.h" 7 #include "src/api.h"
8 #include "src/ast/ast.h" 8 #include "src/ast/ast.h"
9 #include "src/ast/ast-expression-rewriter.h" 9 #include "src/ast/ast-expression-rewriter.h"
10 #include "src/ast/ast-expression-visitor.h" 10 #include "src/ast/ast-expression-visitor.h"
(...skipping 4668 matching lines...) Expand 10 before | Expand all | Expand 10 after
4679 DCHECK_EQ(Token::LBRACE, scanner()->current_token()); 4679 DCHECK_EQ(Token::LBRACE, scanner()->current_token());
4680 4680
4681 if (reusable_preparser_ == NULL) { 4681 if (reusable_preparser_ == NULL) {
4682 reusable_preparser_ = new PreParser(zone(), &scanner_, ast_value_factory(), 4682 reusable_preparser_ = new PreParser(zone(), &scanner_, ast_value_factory(),
4683 NULL, stack_limit_); 4683 NULL, stack_limit_);
4684 reusable_preparser_->set_allow_lazy(true); 4684 reusable_preparser_->set_allow_lazy(true);
4685 #define SET_ALLOW(name) reusable_preparser_->set_allow_##name(allow_##name()); 4685 #define SET_ALLOW(name) reusable_preparser_->set_allow_##name(allow_##name());
4686 SET_ALLOW(natives); 4686 SET_ALLOW(natives);
4687 SET_ALLOW(legacy_const); 4687 SET_ALLOW(legacy_const);
4688 SET_ALLOW(harmony_sloppy); 4688 SET_ALLOW(harmony_sloppy);
4689 SET_ALLOW(harmony_sloppy_function);
4689 SET_ALLOW(harmony_sloppy_let); 4690 SET_ALLOW(harmony_sloppy_let);
4690 SET_ALLOW(harmony_do_expressions); 4691 SET_ALLOW(harmony_do_expressions);
4691 SET_ALLOW(harmony_function_name); 4692 SET_ALLOW(harmony_function_name);
4692 SET_ALLOW(harmony_function_sent); 4693 SET_ALLOW(harmony_function_sent);
4693 SET_ALLOW(harmony_exponentiation_operator); 4694 SET_ALLOW(harmony_exponentiation_operator);
4695 SET_ALLOW(harmony_restrictive_declarations);
4694 #undef SET_ALLOW 4696 #undef SET_ALLOW
4695 } 4697 }
4696 PreParser::PreParseResult result = reusable_preparser_->PreParseLazyFunction( 4698 PreParser::PreParseResult result = reusable_preparser_->PreParseLazyFunction(
4697 language_mode(), function_state_->kind(), scope_->has_simple_parameters(), 4699 language_mode(), function_state_->kind(), scope_->has_simple_parameters(),
4698 logger, bookmark); 4700 logger, bookmark);
4699 if (pre_parse_timer_ != NULL) { 4701 if (pre_parse_timer_ != NULL) {
4700 pre_parse_timer_->Stop(); 4702 pre_parse_timer_->Stop();
4701 } 4703 }
4702 return result; 4704 return result;
4703 } 4705 }
(...skipping 2170 matching lines...) Expand 10 before | Expand all | Expand 10 after
6874 try_block, target); 6876 try_block, target);
6875 final_loop = target; 6877 final_loop = target;
6876 } 6878 }
6877 6879
6878 return final_loop; 6880 return final_loop;
6879 } 6881 }
6880 6882
6881 6883
6882 } // namespace internal 6884 } // namespace internal
6883 } // namespace v8 6885 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | test/mozilla/mozilla.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698