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

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

Issue 2451853002: Uniform and precise source positions for inlining (Closed)
Patch Set: fixed gcmole issue Created 4 years, 1 month 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
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 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 // Iterate through reloc info stopping at each breakable code target. 204 // Iterate through reloc info stopping at each breakable code target.
205 bool first = break_index_ == -1; 205 bool first = break_index_ == -1;
206 206
207 if (!first) reloc_iterator_.next(); 207 if (!first) reloc_iterator_.next();
208 first = false; 208 first = false;
209 if (Done()) return; 209 if (Done()) return;
210 210
211 int offset = code_offset(); 211 int offset = code_offset();
212 while (!source_position_iterator_.done() && 212 while (!source_position_iterator_.done() &&
213 source_position_iterator_.code_offset() <= offset) { 213 source_position_iterator_.code_offset() <= offset) {
214 position_ = source_position_iterator_.source_position(); 214 position_ = source_position_iterator_.source_position().ScriptOffset();
215 if (source_position_iterator_.is_statement()) { 215 if (source_position_iterator_.is_statement()) {
216 statement_position_ = position_; 216 statement_position_ = position_;
217 } 217 }
218 source_position_iterator_.Advance(); 218 source_position_iterator_.Advance();
219 } 219 }
220 220
221 DCHECK(RelocInfo::IsDebugBreakSlot(rmode()) || 221 DCHECK(RelocInfo::IsDebugBreakSlot(rmode()) ||
222 RelocInfo::IsDebuggerStatement(rmode())); 222 RelocInfo::IsDebuggerStatement(rmode()));
223 break_index_++; 223 break_index_++;
224 } 224 }
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
288 } 288 }
289 289
290 void BytecodeArrayBreakIterator::Next() { 290 void BytecodeArrayBreakIterator::Next() {
291 DisallowHeapAllocation no_gc; 291 DisallowHeapAllocation no_gc;
292 DCHECK(!Done()); 292 DCHECK(!Done());
293 bool first = break_index_ == -1; 293 bool first = break_index_ == -1;
294 while (!Done()) { 294 while (!Done()) {
295 if (!first) source_position_iterator_.Advance(); 295 if (!first) source_position_iterator_.Advance();
296 first = false; 296 first = false;
297 if (Done()) return; 297 if (Done()) return;
298 position_ = source_position_iterator_.source_position(); 298 position_ = source_position_iterator_.source_position().ScriptOffset();
299 if (source_position_iterator_.is_statement()) { 299 if (source_position_iterator_.is_statement()) {
300 statement_position_ = position_; 300 statement_position_ = position_;
301 } 301 }
302 DCHECK(position_ >= 0); 302 DCHECK(position_ >= 0);
303 DCHECK(statement_position_ >= 0); 303 DCHECK(statement_position_ >= 0);
304 304
305 DebugBreakType type = GetDebugBreakType(); 305 DebugBreakType type = GetDebugBreakType();
306 if (type == NOT_DEBUG_BREAK) continue; 306 if (type == NOT_DEBUG_BREAK) continue;
307 307
308 if (break_locator_type_ == ALL_BREAK_LOCATIONS) break; 308 if (break_locator_type_ == ALL_BREAK_LOCATIONS) break;
(...skipping 2336 matching lines...) Expand 10 before | Expand all | Expand 10 after
2645 } 2645 }
2646 2646
2647 2647
2648 void LockingCommandMessageQueue::Clear() { 2648 void LockingCommandMessageQueue::Clear() {
2649 base::LockGuard<base::Mutex> lock_guard(&mutex_); 2649 base::LockGuard<base::Mutex> lock_guard(&mutex_);
2650 queue_.Clear(); 2650 queue_.Clear();
2651 } 2651 }
2652 2652
2653 } // namespace internal 2653 } // namespace internal
2654 } // namespace v8 2654 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698