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

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

Issue 2788413004: [inspector] cache stack frame for call sites (Closed)
Patch Set: reverted v8-debugger change Created 3 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/compiler/bytecode-graph-builder.cc ('k') | src/extensions/statistics-extension.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/debug/debug.h" 5 #include "src/debug/debug.h"
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #include "src/api.h" 9 #include "src/api.h"
10 #include "src/arguments.h" 10 #include "src/arguments.h"
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 } 179 }
180 Next(); 180 Next();
181 } 181 }
182 return closest_break; 182 return closest_break;
183 } 183 }
184 184
185 CodeBreakIterator::CodeBreakIterator(Handle<DebugInfo> debug_info) 185 CodeBreakIterator::CodeBreakIterator(Handle<DebugInfo> debug_info)
186 : BreakIterator(debug_info), 186 : BreakIterator(debug_info),
187 reloc_iterator_(debug_info->DebugCode(), GetModeMask()), 187 reloc_iterator_(debug_info->DebugCode(), GetModeMask()),
188 source_position_iterator_( 188 source_position_iterator_(
189 debug_info->DebugCode()->source_position_table()) { 189 debug_info->DebugCode()->SourcePositionTable()) {
190 // There is at least one break location. 190 // There is at least one break location.
191 DCHECK(!Done()); 191 DCHECK(!Done());
192 Next(); 192 Next();
193 } 193 }
194 194
195 int CodeBreakIterator::GetModeMask() { 195 int CodeBreakIterator::GetModeMask() {
196 int mask = 0; 196 int mask = 0;
197 mask |= RelocInfo::ModeMask(RelocInfo::DEBUG_BREAK_SLOT_AT_RETURN); 197 mask |= RelocInfo::ModeMask(RelocInfo::DEBUG_BREAK_SLOT_AT_RETURN);
198 mask |= RelocInfo::ModeMask(RelocInfo::DEBUG_BREAK_SLOT_AT_CALL); 198 mask |= RelocInfo::ModeMask(RelocInfo::DEBUG_BREAK_SLOT_AT_CALL);
199 mask |= RelocInfo::ModeMask(RelocInfo::DEBUG_BREAK_SLOT_AT_TAIL_CALL); 199 mask |= RelocInfo::ModeMask(RelocInfo::DEBUG_BREAK_SLOT_AT_TAIL_CALL);
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
270 270
271 BreakLocation CodeBreakIterator::GetBreakLocation() { 271 BreakLocation CodeBreakIterator::GetBreakLocation() {
272 Handle<AbstractCode> code(AbstractCode::cast(debug_info_->DebugCode())); 272 Handle<AbstractCode> code(AbstractCode::cast(debug_info_->DebugCode()));
273 return BreakLocation(code, GetDebugBreakType(), code_offset(), position_); 273 return BreakLocation(code, GetDebugBreakType(), code_offset(), position_);
274 } 274 }
275 275
276 BytecodeArrayBreakIterator::BytecodeArrayBreakIterator( 276 BytecodeArrayBreakIterator::BytecodeArrayBreakIterator(
277 Handle<DebugInfo> debug_info) 277 Handle<DebugInfo> debug_info)
278 : BreakIterator(debug_info), 278 : BreakIterator(debug_info),
279 source_position_iterator_( 279 source_position_iterator_(
280 debug_info->DebugBytecodeArray()->source_position_table()) { 280 debug_info->DebugBytecodeArray()->SourcePositionTable()) {
281 // There is at least one break location. 281 // There is at least one break location.
282 DCHECK(!Done()); 282 DCHECK(!Done());
283 Next(); 283 Next();
284 } 284 }
285 285
286 void BytecodeArrayBreakIterator::Next() { 286 void BytecodeArrayBreakIterator::Next() {
287 DisallowHeapAllocation no_gc; 287 DisallowHeapAllocation no_gc;
288 DCHECK(!Done()); 288 DCHECK(!Done());
289 bool first = break_index_ == -1; 289 bool first = break_index_ == -1;
290 while (!Done()) { 290 while (!Done()) {
(...skipping 2203 matching lines...) Expand 10 before | Expand all | Expand 10 after
2494 isolate_->Throw(*isolate_->factory()->NewEvalError( 2494 isolate_->Throw(*isolate_->factory()->NewEvalError(
2495 MessageTemplate::kNoSideEffectDebugEvaluate)); 2495 MessageTemplate::kNoSideEffectDebugEvaluate));
2496 } 2496 }
2497 isolate_->set_needs_side_effect_check(old_needs_side_effect_check_); 2497 isolate_->set_needs_side_effect_check(old_needs_side_effect_check_);
2498 isolate_->debug()->UpdateHookOnFunctionCall(); 2498 isolate_->debug()->UpdateHookOnFunctionCall();
2499 isolate_->debug()->side_effect_check_failed_ = false; 2499 isolate_->debug()->side_effect_check_failed_ = false;
2500 } 2500 }
2501 2501
2502 } // namespace internal 2502 } // namespace internal
2503 } // namespace v8 2503 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/bytecode-graph-builder.cc ('k') | src/extensions/statistics-extension.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698