OLD | NEW |
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 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
205 // Iterate through reloc info stopping at each breakable code target. | 205 // Iterate through reloc info stopping at each breakable code target. |
206 bool first = break_index_ == -1; | 206 bool first = break_index_ == -1; |
207 | 207 |
208 if (!first) reloc_iterator_.next(); | 208 if (!first) reloc_iterator_.next(); |
209 first = false; | 209 first = false; |
210 if (Done()) return; | 210 if (Done()) return; |
211 | 211 |
212 int offset = code_offset(); | 212 int offset = code_offset(); |
213 while (!source_position_iterator_.done() && | 213 while (!source_position_iterator_.done() && |
214 source_position_iterator_.code_offset() <= offset) { | 214 source_position_iterator_.code_offset() <= offset) { |
215 position_ = source_position_iterator_.source_position(); | 215 position_ = source_position_iterator_.source_position().ScriptOffset(); |
216 if (source_position_iterator_.is_statement()) { | 216 if (source_position_iterator_.is_statement()) { |
217 statement_position_ = position_; | 217 statement_position_ = position_; |
218 } | 218 } |
219 source_position_iterator_.Advance(); | 219 source_position_iterator_.Advance(); |
220 } | 220 } |
221 | 221 |
222 DCHECK(RelocInfo::IsDebugBreakSlot(rmode()) || | 222 DCHECK(RelocInfo::IsDebugBreakSlot(rmode()) || |
223 RelocInfo::IsDebuggerStatement(rmode())); | 223 RelocInfo::IsDebuggerStatement(rmode())); |
224 break_index_++; | 224 break_index_++; |
225 } | 225 } |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
289 } | 289 } |
290 | 290 |
291 void BytecodeArrayBreakIterator::Next() { | 291 void BytecodeArrayBreakIterator::Next() { |
292 DisallowHeapAllocation no_gc; | 292 DisallowHeapAllocation no_gc; |
293 DCHECK(!Done()); | 293 DCHECK(!Done()); |
294 bool first = break_index_ == -1; | 294 bool first = break_index_ == -1; |
295 while (!Done()) { | 295 while (!Done()) { |
296 if (!first) source_position_iterator_.Advance(); | 296 if (!first) source_position_iterator_.Advance(); |
297 first = false; | 297 first = false; |
298 if (Done()) return; | 298 if (Done()) return; |
299 position_ = source_position_iterator_.source_position(); | 299 position_ = source_position_iterator_.source_position().ScriptOffset(); |
300 if (source_position_iterator_.is_statement()) { | 300 if (source_position_iterator_.is_statement()) { |
301 statement_position_ = position_; | 301 statement_position_ = position_; |
302 } | 302 } |
303 DCHECK(position_ >= 0); | 303 DCHECK(position_ >= 0); |
304 DCHECK(statement_position_ >= 0); | 304 DCHECK(statement_position_ >= 0); |
305 | 305 |
306 DebugBreakType type = GetDebugBreakType(); | 306 DebugBreakType type = GetDebugBreakType(); |
307 if (type == NOT_DEBUG_BREAK) continue; | 307 if (type == NOT_DEBUG_BREAK) continue; |
308 | 308 |
309 if (break_locator_type_ == ALL_BREAK_LOCATIONS) break; | 309 if (break_locator_type_ == ALL_BREAK_LOCATIONS) break; |
(...skipping 2253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2563 } | 2563 } |
2564 | 2564 |
2565 | 2565 |
2566 void LockingCommandMessageQueue::Clear() { | 2566 void LockingCommandMessageQueue::Clear() { |
2567 base::LockGuard<base::Mutex> lock_guard(&mutex_); | 2567 base::LockGuard<base::Mutex> lock_guard(&mutex_); |
2568 queue_.Clear(); | 2568 queue_.Clear(); |
2569 } | 2569 } |
2570 | 2570 |
2571 } // namespace internal | 2571 } // namespace internal |
2572 } // namespace v8 | 2572 } // namespace v8 |
OLD | NEW |