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

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

Issue 1858773004: Revert of Correctly annotate eval origin. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: 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 = frame->GetBytecodeArray(); 75 BytecodeArray* bytecode_array =
76 frame->function()->shared()->bytecode_array();
76 return bytecode_array->SourcePosition(frame->GetBytecodeOffset()); 77 return bytecode_array->SourcePosition(frame->GetBytecodeOffset());
77 } else { 78 } else {
78 Code* code = frame_->LookupCode(); 79 Code* code = frame_->LookupCode();
79 int offset = static_cast<int>(frame_->pc() - code->instruction_start()); 80 int offset = static_cast<int>(frame_->pc() - code->instruction_start());
80 return code->SourcePosition(offset); 81 return code->SourcePosition(offset);
81 } 82 }
82 } 83 }
83 84
84 85
85 bool FrameInspector::IsConstructor() { 86 bool FrameInspector::IsConstructor() {
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
216 if (!frames[i].function()->shared()->IsSubjectToDebugging()) continue; 217 if (!frames[i].function()->shared()->IsSubjectToDebugging()) continue;
217 if (++count == index) return i; 218 if (++count == index) return i;
218 } 219 }
219 } 220 }
220 return -1; 221 return -1;
221 } 222 }
222 223
223 224
224 } // namespace internal 225 } // namespace internal
225 } // namespace v8 226 } // 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