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 738 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
749 } | 749 } |
750 | 750 |
751 | 751 |
752 ClassLiteral* ParserTraits::ParseClassLiteral( | 752 ClassLiteral* ParserTraits::ParseClassLiteral( |
753 const AstRawString* name, Scanner::Location class_name_location, | 753 const AstRawString* name, Scanner::Location class_name_location, |
754 bool name_is_strict_reserved, int pos, bool* ok) { | 754 bool name_is_strict_reserved, int pos, bool* ok) { |
755 return parser_->ParseClassLiteral(name, class_name_location, | 755 return parser_->ParseClassLiteral(name, class_name_location, |
756 name_is_strict_reserved, pos, ok); | 756 name_is_strict_reserved, pos, ok); |
757 } | 757 } |
758 | 758 |
759 | |
760 Parser::Parser(ParseInfo* info) | 759 Parser::Parser(ParseInfo* info) |
761 : ParserBase<ParserTraits>(info->zone(), &scanner_, info->stack_limit(), | 760 : ParserBase<ParserTraits>(info->zone(), &scanner_, info->stack_limit(), |
762 info->extension(), info->ast_value_factory(), | 761 info->extension(), info->ast_value_factory(), |
763 NULL, this), | 762 NULL, this), |
764 scanner_(info->unicode_cache()), | 763 scanner_(info->unicode_cache(), info->ignore_html_comments()), |
765 reusable_preparser_(NULL), | 764 reusable_preparser_(NULL), |
766 original_scope_(NULL), | 765 original_scope_(NULL), |
767 target_stack_(NULL), | 766 target_stack_(NULL), |
768 compile_options_(info->compile_options()), | 767 compile_options_(info->compile_options()), |
769 cached_parse_data_(NULL), | 768 cached_parse_data_(NULL), |
770 total_preparse_skipped_(0), | 769 total_preparse_skipped_(0), |
771 pre_parse_timer_(NULL), | 770 pre_parse_timer_(NULL), |
772 parsing_on_main_thread_(true) { | 771 parsing_on_main_thread_(true) { |
773 // Even though we were passed ParseInfo, we should not store it in | 772 // Even though we were passed ParseInfo, we should not store it in |
774 // Parser - this makes sure that Isolate is not accidentally accessed via | 773 // Parser - this makes sure that Isolate is not accidentally accessed via |
(...skipping 6008 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6783 try_block, target); | 6782 try_block, target); |
6784 final_loop = target; | 6783 final_loop = target; |
6785 } | 6784 } |
6786 | 6785 |
6787 return final_loop; | 6786 return final_loop; |
6788 } | 6787 } |
6789 | 6788 |
6790 | 6789 |
6791 } // namespace internal | 6790 } // namespace internal |
6792 } // namespace v8 | 6791 } // namespace v8 |
OLD | NEW |