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

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

Issue 1854713002: Correctly annotate eval origin. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: rebase 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/debug/debug-evaluate.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-frames.h" 5 #include "src/debug/debug-frames.h"
6 6
7 #include "src/frames-inl.h" 7 #include "src/frames-inl.h"
8 8
9 namespace v8 { 9 namespace v8 {
10 namespace internal { 10 namespace internal {
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 return is_optimized_ ? deoptimized_frame_->GetExpression(index) 65 return is_optimized_ ? deoptimized_frame_->GetExpression(index)
66 : handle(frame_->GetExpression(index), isolate_); 66 : handle(frame_->GetExpression(index), isolate_);
67 } 67 }
68 68
69 69
70 int FrameInspector::GetSourcePosition() { 70 int FrameInspector::GetSourcePosition() {
71 if (is_optimized_) { 71 if (is_optimized_) {
72 return deoptimized_frame_->GetSourcePosition(); 72 return deoptimized_frame_->GetSourcePosition();
73 } else if (is_interpreted_) { 73 } else if (is_interpreted_) {
74 InterpretedFrame* frame = reinterpret_cast<InterpretedFrame*>(frame_); 74 InterpretedFrame* frame = reinterpret_cast<InterpretedFrame*>(frame_);
75 BytecodeArray* bytecode_array = 75 BytecodeArray* bytecode_array = frame->GetBytecodeArray();
76 frame->function()->shared()->bytecode_array();
77 return bytecode_array->SourcePosition(frame->GetBytecodeOffset()); 76 return bytecode_array->SourcePosition(frame->GetBytecodeOffset());
78 } else { 77 } else {
79 Code* code = frame_->LookupCode(); 78 Code* code = frame_->LookupCode();
80 int offset = static_cast<int>(frame_->pc() - code->instruction_start()); 79 int offset = static_cast<int>(frame_->pc() - code->instruction_start());
81 return code->SourcePosition(offset); 80 return code->SourcePosition(offset);
82 } 81 }
83 } 82 }
84 83
85 84
86 bool FrameInspector::IsConstructor() { 85 bool FrameInspector::IsConstructor() {
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
217 if (!frames[i].function()->shared()->IsSubjectToDebugging()) continue; 216 if (!frames[i].function()->shared()->IsSubjectToDebugging()) continue;
218 if (++count == index) return i; 217 if (++count == index) return i;
219 } 218 }
220 } 219 }
221 return -1; 220 return -1;
222 } 221 }
223 222
224 223
225 } // namespace internal 224 } // namespace internal
226 } // namespace v8 225 } // namespace v8
OLDNEW
« no previous file with comments | « src/debug/debug-evaluate.cc ('k') | src/debug/liveedit.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698