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

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

Issue 1815033002: Pass legacy const runtime flag to preparser appropriately (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Remove useless webkit test 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/message/const-decl-no-init-sloppy.js » ('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 4657 matching lines...) Expand 10 before | Expand all | Expand 10 after
4668 TRACE_EVENT0("v8", "V8.PreParse"); 4668 TRACE_EVENT0("v8", "V8.PreParse");
4669 4669
4670 DCHECK_EQ(Token::LBRACE, scanner()->current_token()); 4670 DCHECK_EQ(Token::LBRACE, scanner()->current_token());
4671 4671
4672 if (reusable_preparser_ == NULL) { 4672 if (reusable_preparser_ == NULL) {
4673 reusable_preparser_ = new PreParser(zone(), &scanner_, ast_value_factory(), 4673 reusable_preparser_ = new PreParser(zone(), &scanner_, ast_value_factory(),
4674 NULL, stack_limit_); 4674 NULL, stack_limit_);
4675 reusable_preparser_->set_allow_lazy(true); 4675 reusable_preparser_->set_allow_lazy(true);
4676 #define SET_ALLOW(name) reusable_preparser_->set_allow_##name(allow_##name()); 4676 #define SET_ALLOW(name) reusable_preparser_->set_allow_##name(allow_##name());
4677 SET_ALLOW(natives); 4677 SET_ALLOW(natives);
4678 SET_ALLOW(legacy_const);
4678 SET_ALLOW(harmony_sloppy); 4679 SET_ALLOW(harmony_sloppy);
4679 SET_ALLOW(harmony_sloppy_let); 4680 SET_ALLOW(harmony_sloppy_let);
4680 SET_ALLOW(harmony_do_expressions); 4681 SET_ALLOW(harmony_do_expressions);
4681 SET_ALLOW(harmony_function_name); 4682 SET_ALLOW(harmony_function_name);
4682 SET_ALLOW(harmony_function_sent); 4683 SET_ALLOW(harmony_function_sent);
4683 #undef SET_ALLOW 4684 #undef SET_ALLOW
4684 } 4685 }
4685 PreParser::PreParseResult result = reusable_preparser_->PreParseLazyFunction( 4686 PreParser::PreParseResult result = reusable_preparser_->PreParseLazyFunction(
4686 language_mode(), function_state_->kind(), scope_->has_simple_parameters(), 4687 language_mode(), function_state_->kind(), scope_->has_simple_parameters(),
4687 logger, bookmark); 4688 logger, bookmark);
(...skipping 2110 matching lines...) Expand 10 before | Expand all | Expand 10 after
6798 try_block, target); 6799 try_block, target);
6799 final_loop = target; 6800 final_loop = target;
6800 } 6801 }
6801 6802
6802 return final_loop; 6803 return final_loop;
6803 } 6804 }
6804 6805
6805 6806
6806 } // namespace internal 6807 } // namespace internal
6807 } // namespace v8 6808 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | test/message/const-decl-no-init-sloppy.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698