Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(121)

Side by Side Diff: src/parsing/parser.cc

Issue 2380993003: Readd default function variables upon scope reset for preparse abort (Closed)
Patch Set: Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/ast/scopes.cc ('k') | src/parsing/parser-base.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « src/ast/scopes.cc ('k') | src/parsing/parser-base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698