| 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 3886 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3897 LazyParsingResult result = impl()->SkipLazyFunctionBody( | 3897 LazyParsingResult result = impl()->SkipLazyFunctionBody( |
| 3898 &materialized_literal_count, &expected_property_count, true, | 3898 &materialized_literal_count, &expected_property_count, true, |
| 3899 CHECK_OK); | 3899 CHECK_OK); |
| 3900 | 3900 |
| 3901 if (formal_parameters.materialized_literals_count > 0) { | 3901 if (formal_parameters.materialized_literals_count > 0) { |
| 3902 materialized_literal_count += | 3902 materialized_literal_count += |
| 3903 formal_parameters.materialized_literals_count; | 3903 formal_parameters.materialized_literals_count; |
| 3904 } | 3904 } |
| 3905 | 3905 |
| 3906 if (result == kLazyParsingAborted) { | 3906 if (result == kLazyParsingAborted) { |
| 3907 bookmark.Reset(); | 3907 bookmark.Apply(); |
| 3908 // Trigger eager (re-)parsing, just below this block. | 3908 // Trigger eager (re-)parsing, just below this block. |
| 3909 is_lazily_parsed = false; | 3909 is_lazily_parsed = false; |
| 3910 | 3910 |
| 3911 // This is probably an initialization function. Inform the compiler it | 3911 // This is probably an initialization function. Inform the compiler it |
| 3912 // should also eager-compile this function, and that we expect it to | 3912 // should also eager-compile this function, and that we expect it to |
| 3913 // be used once. | 3913 // be used once. |
| 3914 eager_compile_hint = FunctionLiteral::kShouldEagerCompile; | 3914 eager_compile_hint = FunctionLiteral::kShouldEagerCompile; |
| 3915 should_be_used_once_hint = true; | 3915 should_be_used_once_hint = true; |
| 3916 } | 3916 } |
| 3917 } | 3917 } |
| (...skipping 1109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5027 has_seen_constructor_ = true; | 5027 has_seen_constructor_ = true; |
| 5028 return; | 5028 return; |
| 5029 } | 5029 } |
| 5030 } | 5030 } |
| 5031 | 5031 |
| 5032 | 5032 |
| 5033 } // namespace internal | 5033 } // namespace internal |
| 5034 } // namespace v8 | 5034 } // namespace v8 |
| 5035 | 5035 |
| 5036 #endif // V8_PARSING_PARSER_BASE_H | 5036 #endif // V8_PARSING_PARSER_BASE_H |
| OLD | NEW |