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

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

Issue 1847543002: Expose a lower bound of malloc'd memory via heap statistics (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: updates Created 4 years, 8 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/lithium-allocator.cc ('k') | src/debug/liveedit.cc » ('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 "src/ast/scopes.h" 7 #include "src/ast/scopes.h"
8 #include "src/debug/debug.h" 8 #include "src/debug/debug.h"
9 #include "src/frames-inl.h" 9 #include "src/frames-inl.h"
10 #include "src/globals.h" 10 #include "src/globals.h"
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 nested_scope_chain_.Add(ExtendedScopeInfo(scope_info, 75 nested_scope_chain_.Add(ExtendedScopeInfo(scope_info,
76 shared_info->start_position(), 76 shared_info->start_position(),
77 shared_info->end_position())); 77 shared_info->end_position()));
78 } 78 }
79 if (!collect_non_locals) return; 79 if (!collect_non_locals) return;
80 } 80 }
81 81
82 // Reparse the code and analyze the scopes. 82 // Reparse the code and analyze the scopes.
83 Scope* scope = NULL; 83 Scope* scope = NULL;
84 // Check whether we are in global, eval or function code. 84 // Check whether we are in global, eval or function code.
85 Zone zone; 85 Zone zone(isolate->allocator());
86 if (scope_info->scope_type() != FUNCTION_SCOPE) { 86 if (scope_info->scope_type() != FUNCTION_SCOPE) {
87 // Global or eval code. 87 // Global or eval code.
88 Handle<Script> script(Script::cast(shared_info->script())); 88 Handle<Script> script(Script::cast(shared_info->script()));
89 ParseInfo info(&zone, script); 89 ParseInfo info(&zone, script);
90 if (scope_info->scope_type() == SCRIPT_SCOPE) { 90 if (scope_info->scope_type() == SCRIPT_SCOPE) {
91 info.set_global(); 91 info.set_global();
92 } else { 92 } else {
93 DCHECK(scope_info->scope_type() == EVAL_SCOPE); 93 DCHECK(scope_info->scope_type() == EVAL_SCOPE);
94 info.set_eval(); 94 info.set_eval();
95 info.set_context(Handle<Context>(function->context())); 95 info.set_context(Handle<Context>(function->context()));
(...skipping 735 matching lines...) Expand 10 before | Expand all | Expand 10 after
831 DCHECK(beg_pos >= 0 && end_pos >= 0); 831 DCHECK(beg_pos >= 0 && end_pos >= 0);
832 if (beg_pos <= position && position < end_pos) { 832 if (beg_pos <= position && position < end_pos) {
833 GetNestedScopeChain(isolate, inner_scope, position); 833 GetNestedScopeChain(isolate, inner_scope, position);
834 return; 834 return;
835 } 835 }
836 } 836 }
837 } 837 }
838 838
839 } // namespace internal 839 } // namespace internal
840 } // namespace v8 840 } // namespace v8
OLDNEW
« no previous file with comments | « src/crankshaft/lithium-allocator.cc ('k') | src/debug/liveedit.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698