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

Side by Side Diff: src/debug/debug-scopes.cc

Issue 2406623002: Revert of [parser] Deprecate ParseInfo constructor taking closure. (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/crankshaft/hydrogen.cc ('k') | src/parsing/parse-info.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 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 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/debug/debug-scopes.h" 5 #include "src/debug/debug-scopes.h"
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #include "src/ast/scopes.h" 9 #include "src/ast/scopes.h"
10 #include "src/debug/debug.h" 10 #include "src/debug/debug.h"
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 info->set_outer_scope_info(handle(function->context()->scope_info())); 100 info->set_outer_scope_info(handle(function->context()->scope_info()));
101 } 101 }
102 // Language mode may be inherited from the eval caller. 102 // Language mode may be inherited from the eval caller.
103 // Retrieve it from shared function info. 103 // Retrieve it from shared function info.
104 info->set_language_mode(shared_info->language_mode()); 104 info->set_language_mode(shared_info->language_mode());
105 } else { 105 } else {
106 DCHECK(scope_info->scope_type() == SCRIPT_SCOPE); 106 DCHECK(scope_info->scope_type() == SCRIPT_SCOPE);
107 } 107 }
108 } else { 108 } else {
109 // Inner function. 109 // Inner function.
110 info.reset(new ParseInfo(&zone, shared_info)); 110 info.reset(new ParseInfo(&zone, function));
111 } 111 }
112 if (Parser::ParseStatic(info.get()) && Rewriter::Rewrite(info.get())) { 112 if (Parser::ParseStatic(info.get()) && Rewriter::Rewrite(info.get())) {
113 DeclarationScope* scope = info->literal()->scope(); 113 DeclarationScope* scope = info->literal()->scope();
114 if (!ignore_nested_scopes || collect_non_locals) { 114 if (!ignore_nested_scopes || collect_non_locals) {
115 CollectNonLocals(info.get(), scope); 115 CollectNonLocals(info.get(), scope);
116 } 116 }
117 if (!ignore_nested_scopes) { 117 if (!ignore_nested_scopes) {
118 DeclarationScope::Analyze(info.get(), AnalyzeMode::kDebugger); 118 DeclarationScope::Analyze(info.get(), AnalyzeMode::kDebugger);
119 RetrieveScopeChain(scope); 119 RetrieveScopeChain(scope);
120 } 120 }
(...skipping 711 matching lines...) Expand 10 before | Expand all | Expand 10 after
832 DCHECK((beg_pos >= 0 && end_pos >= 0) || inner_scope->is_hidden()); 832 DCHECK((beg_pos >= 0 && end_pos >= 0) || inner_scope->is_hidden());
833 if (beg_pos <= position && position < end_pos) { 833 if (beg_pos <= position && position < end_pos) {
834 GetNestedScopeChain(isolate, inner_scope, position); 834 GetNestedScopeChain(isolate, inner_scope, position);
835 return; 835 return;
836 } 836 }
837 } 837 }
838 } 838 }
839 839
840 } // namespace internal 840 } // namespace internal
841 } // namespace v8 841 } // namespace v8
OLDNEW
« no previous file with comments | « src/crankshaft/hydrogen.cc ('k') | src/parsing/parse-info.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698