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 #ifndef V8_PARSING_PREPARSER_H | 5 #ifndef V8_PARSING_PREPARSER_H |
6 #define V8_PARSING_PREPARSER_H | 6 #define V8_PARSING_PREPARSER_H |
7 | 7 |
8 #include "src/ast/scopes.h" | 8 #include "src/ast/scopes.h" |
9 #include "src/parsing/parser-base.h" | 9 #include "src/parsing/parser-base.h" |
10 | 10 |
(...skipping 802 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
813 } | 813 } |
814 | 814 |
815 // Parses a single function literal, from the opening parentheses before | 815 // Parses a single function literal, from the opening parentheses before |
816 // parameters to the closing brace after the body. | 816 // parameters to the closing brace after the body. |
817 // Returns a FunctionEntry describing the body of the function in enough | 817 // Returns a FunctionEntry describing the body of the function in enough |
818 // detail that it can be lazily compiled. | 818 // detail that it can be lazily compiled. |
819 // The scanner is expected to have matched the "function" or "function*" | 819 // The scanner is expected to have matched the "function" or "function*" |
820 // keyword and parameters, and have consumed the initial '{'. | 820 // keyword and parameters, and have consumed the initial '{'. |
821 // At return, unless an error occurred, the scanner is positioned before the | 821 // At return, unless an error occurred, the scanner is positioned before the |
822 // the final '}'. | 822 // the final '}'. |
823 PreParseResult PreParseLazyFunction(LanguageMode language_mode, | 823 PreParseResult PreParseLazyFunction(DeclarationScope* function_scope, |
824 FunctionKind kind, | |
825 bool has_simple_parameters, | |
826 bool parsing_module, ParserRecorder* log, | 824 bool parsing_module, ParserRecorder* log, |
827 bool may_abort, int* use_counts); | 825 bool may_abort, int* use_counts); |
828 | 826 |
829 private: | 827 private: |
830 // These types form an algebra over syntactic categories that is just | 828 // These types form an algebra over syntactic categories that is just |
831 // rich enough to let us recognize and propagate the constructs that | 829 // rich enough to let us recognize and propagate the constructs that |
832 // are either being counted in the preparser data, or is important | 830 // are either being counted in the preparser data, or is important |
833 // to throw the correct syntax error exceptions. | 831 // to throw the correct syntax error exceptions. |
834 | 832 |
835 // All ParseXXX functions take as the last argument an *ok parameter | 833 // All ParseXXX functions take as the last argument an *ok parameter |
(...skipping 624 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1460 function_state_->NextMaterializedLiteralIndex(); | 1458 function_state_->NextMaterializedLiteralIndex(); |
1461 function_state_->NextMaterializedLiteralIndex(); | 1459 function_state_->NextMaterializedLiteralIndex(); |
1462 } | 1460 } |
1463 return EmptyExpression(); | 1461 return EmptyExpression(); |
1464 } | 1462 } |
1465 | 1463 |
1466 } // namespace internal | 1464 } // namespace internal |
1467 } // namespace v8 | 1465 } // namespace v8 |
1468 | 1466 |
1469 #endif // V8_PARSING_PREPARSER_H | 1467 #endif // V8_PARSING_PREPARSER_H |
OLD | NEW |