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 <memory> | 7 #include <memory> |
8 | 8 |
9 #include "src/api.h" | 9 #include "src/api.h" |
10 #include "src/ast/ast-expression-rewriter.h" | 10 #include "src/ast/ast-expression-rewriter.h" |
(...skipping 3023 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3034 Scanner::BookmarkScope bookmark(scanner()); | 3034 Scanner::BookmarkScope bookmark(scanner()); |
3035 bookmark.Set(); | 3035 bookmark.Set(); |
3036 LazyParsingResult result = | 3036 LazyParsingResult result = |
3037 SkipLazyFunctionBody(&materialized_literal_count, | 3037 SkipLazyFunctionBody(&materialized_literal_count, |
3038 &expected_property_count, true, CHECK_OK); | 3038 &expected_property_count, true, CHECK_OK); |
3039 | 3039 |
3040 materialized_literal_count += formals.materialized_literals_count + | 3040 materialized_literal_count += formals.materialized_literals_count + |
3041 function_state.materialized_literal_count(); | 3041 function_state.materialized_literal_count(); |
3042 | 3042 |
3043 if (result == kLazyParsingAborted) { | 3043 if (result == kLazyParsingAborted) { |
3044 bookmark.Reset(); | 3044 bookmark.Apply(); |
3045 // Trigger eager (re-)parsing, just below this block. | 3045 // Trigger eager (re-)parsing, just below this block. |
3046 is_lazily_parsed = false; | 3046 is_lazily_parsed = false; |
3047 | 3047 |
3048 // This is probably an initialization function. Inform the compiler it | 3048 // This is probably an initialization function. Inform the compiler it |
3049 // should also eager-compile this function, and that we expect it to be | 3049 // should also eager-compile this function, and that we expect it to be |
3050 // used once. | 3050 // used once. |
3051 eager_compile_hint = FunctionLiteral::kShouldEagerCompile; | 3051 eager_compile_hint = FunctionLiteral::kShouldEagerCompile; |
3052 should_be_used_once_hint = true; | 3052 should_be_used_once_hint = true; |
3053 } | 3053 } |
3054 } | 3054 } |
(...skipping 2770 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5825 | 5825 |
5826 return final_loop; | 5826 return final_loop; |
5827 } | 5827 } |
5828 | 5828 |
5829 #undef CHECK_OK | 5829 #undef CHECK_OK |
5830 #undef CHECK_OK_VOID | 5830 #undef CHECK_OK_VOID |
5831 #undef CHECK_FAILED | 5831 #undef CHECK_FAILED |
5832 | 5832 |
5833 } // namespace internal | 5833 } // namespace internal |
5834 } // namespace v8 | 5834 } // namespace v8 |
OLD | NEW |