| 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_PARSER_BASE_H | 5 #ifndef V8_PARSING_PARSER_BASE_H |
| 6 #define V8_PARSING_PARSER_BASE_H | 6 #define V8_PARSING_PARSER_BASE_H |
| 7 | 7 |
| 8 #include "src/ast/ast.h" | 8 #include "src/ast/ast.h" |
| 9 #include "src/ast/scopes.h" | 9 #include "src/ast/scopes.h" |
| 10 #include "src/bailout-reason.h" | 10 #include "src/bailout-reason.h" |
| (...skipping 3865 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3876 | 3876 |
| 3877 if (formal_parameters.materialized_literals_count > 0) { | 3877 if (formal_parameters.materialized_literals_count > 0) { |
| 3878 materialized_literal_count += | 3878 materialized_literal_count += |
| 3879 formal_parameters.materialized_literals_count; | 3879 formal_parameters.materialized_literals_count; |
| 3880 } | 3880 } |
| 3881 | 3881 |
| 3882 if (result == kLazyParsingAborted) { | 3882 if (result == kLazyParsingAborted) { |
| 3883 bookmark.Reset(); | 3883 bookmark.Reset(); |
| 3884 // Trigger eager (re-)parsing, just below this block. | 3884 // Trigger eager (re-)parsing, just below this block. |
| 3885 is_lazily_parsed = false; | 3885 is_lazily_parsed = false; |
| 3886 scope()->set_is_lazily_parsed(false); |
| 3886 | 3887 |
| 3887 // This is probably an initialization function. Inform the compiler it | 3888 // This is probably an initialization function. Inform the compiler it |
| 3888 // should also eager-compile this function, and that we expect it to | 3889 // should also eager-compile this function, and that we expect it to |
| 3889 // be used once. | 3890 // be used once. |
| 3890 eager_compile_hint = FunctionLiteral::kShouldEagerCompile; | 3891 eager_compile_hint = FunctionLiteral::kShouldEagerCompile; |
| 3891 should_be_used_once_hint = true; | 3892 should_be_used_once_hint = true; |
| 3892 } | 3893 } |
| 3893 } | 3894 } |
| 3894 if (!is_lazily_parsed) { | 3895 if (!is_lazily_parsed) { |
| 3895 body = impl()->ParseEagerFunctionBody( | 3896 body = impl()->ParseEagerFunctionBody( |
| (...skipping 1003 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4899 has_seen_constructor_ = true; | 4900 has_seen_constructor_ = true; |
| 4900 return; | 4901 return; |
| 4901 } | 4902 } |
| 4902 } | 4903 } |
| 4903 | 4904 |
| 4904 | 4905 |
| 4905 } // namespace internal | 4906 } // namespace internal |
| 4906 } // namespace v8 | 4907 } // namespace v8 |
| 4907 | 4908 |
| 4908 #endif // V8_PARSING_PARSER_BASE_H | 4909 #endif // V8_PARSING_PARSER_BASE_H |
| OLD | NEW |