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 746 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
757 } | 757 } |
758 | 758 |
759 | 759 |
760 ClassLiteral* ParserTraits::ParseClassLiteral( | 760 ClassLiteral* ParserTraits::ParseClassLiteral( |
761 const AstRawString* name, Scanner::Location class_name_location, | 761 const AstRawString* name, Scanner::Location class_name_location, |
762 bool name_is_strict_reserved, int pos, bool* ok) { | 762 bool name_is_strict_reserved, int pos, bool* ok) { |
763 return parser_->ParseClassLiteral(name, class_name_location, | 763 return parser_->ParseClassLiteral(name, class_name_location, |
764 name_is_strict_reserved, pos, ok); | 764 name_is_strict_reserved, pos, ok); |
765 } | 765 } |
766 | 766 |
| 767 |
767 Parser::Parser(ParseInfo* info) | 768 Parser::Parser(ParseInfo* info) |
768 : ParserBase<ParserTraits>(info->zone(), &scanner_, info->stack_limit(), | 769 : ParserBase<ParserTraits>(info->zone(), &scanner_, info->stack_limit(), |
769 info->extension(), info->ast_value_factory(), | 770 info->extension(), info->ast_value_factory(), |
770 NULL, this), | 771 NULL, this), |
771 scanner_(info->unicode_cache(), info->allow_html_comments()), | 772 scanner_(info->unicode_cache()), |
772 reusable_preparser_(NULL), | 773 reusable_preparser_(NULL), |
773 original_scope_(NULL), | 774 original_scope_(NULL), |
774 target_stack_(NULL), | 775 target_stack_(NULL), |
775 compile_options_(info->compile_options()), | 776 compile_options_(info->compile_options()), |
776 cached_parse_data_(NULL), | 777 cached_parse_data_(NULL), |
777 total_preparse_skipped_(0), | 778 total_preparse_skipped_(0), |
778 pre_parse_timer_(NULL), | 779 pre_parse_timer_(NULL), |
779 parsing_on_main_thread_(true) { | 780 parsing_on_main_thread_(true) { |
780 // Even though we were passed ParseInfo, we should not store it in | 781 // Even though we were passed ParseInfo, we should not store it in |
781 // Parser - this makes sure that Isolate is not accidentally accessed via | 782 // Parser - this makes sure that Isolate is not accidentally accessed via |
(...skipping 6092 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6874 try_block, target); | 6875 try_block, target); |
6875 final_loop = target; | 6876 final_loop = target; |
6876 } | 6877 } |
6877 | 6878 |
6878 return final_loop; | 6879 return final_loop; |
6879 } | 6880 } |
6880 | 6881 |
6881 | 6882 |
6882 } // namespace internal | 6883 } // namespace internal |
6883 } // namespace v8 | 6884 } // namespace v8 |
OLD | NEW |