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

Side by Side Diff: src/frames.cc

Issue 2664793002: [debugger] account for inlined functions when stepping. (Closed)
Patch Set: comment addressed Created 3 years, 10 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/frames.h ('k') | test/cctest/test-debug.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 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/frames.h" 5 #include "src/frames.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <sstream> 8 #include <sstream>
9 9
10 #include "src/base/bits.h" 10 #include "src/base/bits.h"
(...skipping 936 matching lines...) Expand 10 before | Expand all | Expand 10 after
947 947
948 Address JavaScriptFrame::GetCallerStackPointer() const { 948 Address JavaScriptFrame::GetCallerStackPointer() const {
949 return fp() + StandardFrameConstants::kCallerSPOffset; 949 return fp() + StandardFrameConstants::kCallerSPOffset;
950 } 950 }
951 951
952 void JavaScriptFrame::GetFunctions(List<SharedFunctionInfo*>* functions) const { 952 void JavaScriptFrame::GetFunctions(List<SharedFunctionInfo*>* functions) const {
953 DCHECK(functions->length() == 0); 953 DCHECK(functions->length() == 0);
954 functions->Add(function()->shared()); 954 functions->Add(function()->shared());
955 } 955 }
956 956
957 void JavaScriptFrame::GetFunctions(
958 List<Handle<SharedFunctionInfo>>* functions) const {
959 DCHECK(functions->length() == 0);
960 List<SharedFunctionInfo*> raw_functions;
961 GetFunctions(&raw_functions);
962 for (const auto& raw_function : raw_functions) {
963 functions->Add(Handle<SharedFunctionInfo>(raw_function));
964 }
965 }
966
957 void JavaScriptFrame::Summarize(List<FrameSummary>* functions, 967 void JavaScriptFrame::Summarize(List<FrameSummary>* functions,
958 FrameSummary::Mode mode) const { 968 FrameSummary::Mode mode) const {
959 DCHECK(functions->length() == 0); 969 DCHECK(functions->length() == 0);
960 Code* code = LookupCode(); 970 Code* code = LookupCode();
961 int offset = static_cast<int>(pc() - code->instruction_start()); 971 int offset = static_cast<int>(pc() - code->instruction_start());
962 AbstractCode* abstract_code = AbstractCode::cast(code); 972 AbstractCode* abstract_code = AbstractCode::cast(code);
963 FrameSummary::JavaScriptFrameSummary summary(isolate(), receiver(), 973 FrameSummary::JavaScriptFrameSummary summary(isolate(), receiver(),
964 function(), abstract_code, 974 function(), abstract_code,
965 offset, IsConstructor(), mode); 975 offset, IsConstructor(), mode);
966 functions->Add(summary); 976 functions->Add(summary);
(...skipping 1260 matching lines...) Expand 10 before | Expand all | Expand 10 after
2227 for (StackFrameIterator it(isolate); !it.done(); it.Advance()) { 2237 for (StackFrameIterator it(isolate); !it.done(); it.Advance()) {
2228 StackFrame* frame = AllocateFrameCopy(it.frame(), zone); 2238 StackFrame* frame = AllocateFrameCopy(it.frame(), zone);
2229 list.Add(frame, zone); 2239 list.Add(frame, zone);
2230 } 2240 }
2231 return list.ToVector(); 2241 return list.ToVector();
2232 } 2242 }
2233 2243
2234 2244
2235 } // namespace internal 2245 } // namespace internal
2236 } // namespace v8 2246 } // namespace v8
OLDNEW
« no previous file with comments | « src/frames.h ('k') | test/cctest/test-debug.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698