| 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 2710 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 2721         DCHECK(is_lazy_top_level_function); | 2721         DCHECK(is_lazy_top_level_function); | 
| 2722         bookmark.Apply(); | 2722         bookmark.Apply(); | 
| 2723         // Trigger eager (re-)parsing, just below this block. | 2723         // Trigger eager (re-)parsing, just below this block. | 
| 2724         is_lazy_top_level_function = false; | 2724         is_lazy_top_level_function = false; | 
| 2725 | 2725 | 
| 2726         // This is probably an initialization function. Inform the compiler it | 2726         // This is probably an initialization function. Inform the compiler it | 
| 2727         // should also eager-compile this function, and that we expect it to be | 2727         // should also eager-compile this function, and that we expect it to be | 
| 2728         // used once. | 2728         // used once. | 
| 2729         eager_compile_hint = FunctionLiteral::kShouldEagerCompile; | 2729         eager_compile_hint = FunctionLiteral::kShouldEagerCompile; | 
| 2730         should_be_used_once_hint = true; | 2730         should_be_used_once_hint = true; | 
| 2731         scope->ResetAfterPreparsing(true); | 2731         scope->ResetAfterPreparsing(ast_value_factory(), true); | 
| 2732         zone_scope.Reset(); | 2732         zone_scope.Reset(); | 
| 2733         use_temp_zone = false; | 2733         use_temp_zone = false; | 
| 2734       } | 2734       } | 
| 2735     } | 2735     } | 
| 2736 | 2736 | 
| 2737     if (!is_lazy_top_level_function && !is_lazy_inner_function) { | 2737     if (!is_lazy_top_level_function && !is_lazy_inner_function) { | 
| 2738       body = ParseEagerFunctionBody(function_name, pos, formals, kind, | 2738       body = ParseEagerFunctionBody(function_name, pos, formals, kind, | 
| 2739                                     function_type, CHECK_OK); | 2739                                     function_type, CHECK_OK); | 
| 2740 | 2740 | 
| 2741       materialized_literal_count = function_state.materialized_literal_count(); | 2741       materialized_literal_count = function_state.materialized_literal_count(); | 
| (...skipping 2717 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 5459 | 5459 | 
| 5460   return final_loop; | 5460   return final_loop; | 
| 5461 } | 5461 } | 
| 5462 | 5462 | 
| 5463 #undef CHECK_OK | 5463 #undef CHECK_OK | 
| 5464 #undef CHECK_OK_VOID | 5464 #undef CHECK_OK_VOID | 
| 5465 #undef CHECK_FAILED | 5465 #undef CHECK_FAILED | 
| 5466 | 5466 | 
| 5467 }  // namespace internal | 5467 }  // namespace internal | 
| 5468 }  // namespace v8 | 5468 }  // namespace v8 | 
| OLD | NEW | 
|---|