| OLD | NEW |
| 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 797 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 808 info->isolate()->is_tail_call_elimination_enabled()); | 808 info->isolate()->is_tail_call_elimination_enabled()); |
| 809 set_allow_harmony_do_expressions(FLAG_harmony_do_expressions); | 809 set_allow_harmony_do_expressions(FLAG_harmony_do_expressions); |
| 810 set_allow_harmony_for_in(FLAG_harmony_for_in); | 810 set_allow_harmony_for_in(FLAG_harmony_for_in); |
| 811 set_allow_harmony_function_sent(FLAG_harmony_function_sent); | 811 set_allow_harmony_function_sent(FLAG_harmony_function_sent); |
| 812 set_allow_harmony_restrictive_declarations( | 812 set_allow_harmony_restrictive_declarations( |
| 813 FLAG_harmony_restrictive_declarations); | 813 FLAG_harmony_restrictive_declarations); |
| 814 set_allow_harmony_exponentiation_operator( | 814 set_allow_harmony_exponentiation_operator( |
| 815 FLAG_harmony_exponentiation_operator); | 815 FLAG_harmony_exponentiation_operator); |
| 816 set_allow_harmony_async_await(FLAG_harmony_async_await); | 816 set_allow_harmony_async_await(FLAG_harmony_async_await); |
| 817 set_allow_harmony_restrictive_generators(FLAG_harmony_restrictive_generators); | 817 set_allow_harmony_restrictive_generators(FLAG_harmony_restrictive_generators); |
| 818 set_allow_harmony_trailing_commas(FLAG_harmony_trailing_commas); |
| 818 for (int feature = 0; feature < v8::Isolate::kUseCounterFeatureCount; | 819 for (int feature = 0; feature < v8::Isolate::kUseCounterFeatureCount; |
| 819 ++feature) { | 820 ++feature) { |
| 820 use_counts_[feature] = 0; | 821 use_counts_[feature] = 0; |
| 821 } | 822 } |
| 822 if (info->ast_value_factory() == NULL) { | 823 if (info->ast_value_factory() == NULL) { |
| 823 // info takes ownership of AstValueFactory. | 824 // info takes ownership of AstValueFactory. |
| 824 info->set_ast_value_factory(new AstValueFactory(zone(), info->hash_seed())); | 825 info->set_ast_value_factory(new AstValueFactory(zone(), info->hash_seed())); |
| 825 info->set_ast_value_factory_owned(); | 826 info->set_ast_value_factory_owned(); |
| 826 ast_value_factory_ = info->ast_value_factory(); | 827 ast_value_factory_ = info->ast_value_factory(); |
| 827 } | 828 } |
| (...skipping 4041 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4869 NULL, stack_limit_); | 4870 NULL, stack_limit_); |
| 4870 reusable_preparser_->set_allow_lazy(true); | 4871 reusable_preparser_->set_allow_lazy(true); |
| 4871 #define SET_ALLOW(name) reusable_preparser_->set_allow_##name(allow_##name()); | 4872 #define SET_ALLOW(name) reusable_preparser_->set_allow_##name(allow_##name()); |
| 4872 SET_ALLOW(natives); | 4873 SET_ALLOW(natives); |
| 4873 SET_ALLOW(harmony_do_expressions); | 4874 SET_ALLOW(harmony_do_expressions); |
| 4874 SET_ALLOW(harmony_for_in); | 4875 SET_ALLOW(harmony_for_in); |
| 4875 SET_ALLOW(harmony_function_sent); | 4876 SET_ALLOW(harmony_function_sent); |
| 4876 SET_ALLOW(harmony_exponentiation_operator); | 4877 SET_ALLOW(harmony_exponentiation_operator); |
| 4877 SET_ALLOW(harmony_restrictive_declarations); | 4878 SET_ALLOW(harmony_restrictive_declarations); |
| 4878 SET_ALLOW(harmony_async_await); | 4879 SET_ALLOW(harmony_async_await); |
| 4880 SET_ALLOW(harmony_trailing_commas); |
| 4879 #undef SET_ALLOW | 4881 #undef SET_ALLOW |
| 4880 } | 4882 } |
| 4881 PreParser::PreParseResult result = reusable_preparser_->PreParseLazyFunction( | 4883 PreParser::PreParseResult result = reusable_preparser_->PreParseLazyFunction( |
| 4882 language_mode(), function_state_->kind(), scope_->has_simple_parameters(), | 4884 language_mode(), function_state_->kind(), scope_->has_simple_parameters(), |
| 4883 parsing_module_, logger, bookmark, use_counts_); | 4885 parsing_module_, logger, bookmark, use_counts_); |
| 4884 if (pre_parse_timer_ != NULL) { | 4886 if (pre_parse_timer_ != NULL) { |
| 4885 pre_parse_timer_->Stop(); | 4887 pre_parse_timer_->Stop(); |
| 4886 } | 4888 } |
| 4887 return result; | 4889 return result; |
| 4888 } | 4890 } |
| (...skipping 2100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6989 try_block, target); | 6991 try_block, target); |
| 6990 final_loop = target; | 6992 final_loop = target; |
| 6991 } | 6993 } |
| 6992 | 6994 |
| 6993 return final_loop; | 6995 return final_loop; |
| 6994 } | 6996 } |
| 6995 | 6997 |
| 6996 | 6998 |
| 6997 } // namespace internal | 6999 } // namespace internal |
| 6998 } // namespace v8 | 7000 } // namespace v8 |
| OLD | NEW |