| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 #include "vm/debugger.h" | 5 #include "vm/debugger.h" |
| 6 | 6 |
| 7 #include "include/dart_api.h" | 7 #include "include/dart_api.h" |
| 8 | 8 |
| 9 #include "vm/code_generator.h" | 9 #include "vm/code_generator.h" |
| 10 #include "vm/code_patcher.h" | 10 #include "vm/code_patcher.h" |
| (...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 316 if (pc_desc_.IsNull()) { | 316 if (pc_desc_.IsNull()) { |
| 317 pc_desc_ = code().pc_descriptors(); | 317 pc_desc_ = code().pc_descriptors(); |
| 318 ASSERT(!pc_desc_.IsNull()); | 318 ASSERT(!pc_desc_.IsNull()); |
| 319 } | 319 } |
| 320 } | 320 } |
| 321 | 321 |
| 322 | 322 |
| 323 // Compute token_pos_ and pc_desc_index_. | 323 // Compute token_pos_ and pc_desc_index_. |
| 324 intptr_t ActivationFrame::TokenPos() { | 324 intptr_t ActivationFrame::TokenPos() { |
| 325 if (token_pos_ < 0) { | 325 if (token_pos_ < 0) { |
| 326 token_pos_ = Scanner::kNoSourcePos; |
| 326 GetPcDescriptors(); | 327 GetPcDescriptors(); |
| 327 for (intptr_t i = 0; i < pc_desc_.Length(); i++) { | 328 for (intptr_t i = 0; i < pc_desc_.Length(); i++) { |
| 328 if (pc_desc_.PC(i) == pc_) { | 329 if (pc_desc_.PC(i) == pc_) { |
| 329 pc_desc_index_ = i; | 330 pc_desc_index_ = i; |
| 330 token_pos_ = pc_desc_.TokenPos(i); | 331 token_pos_ = pc_desc_.TokenPos(i); |
| 331 break; | 332 break; |
| 332 } | 333 } |
| 333 } | 334 } |
| 334 } | 335 } |
| 335 return token_pos_; | 336 return token_pos_; |
| (...skipping 1921 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2257 } | 2258 } |
| 2258 | 2259 |
| 2259 | 2260 |
| 2260 void Debugger::RegisterCodeBreakpoint(CodeBreakpoint* bpt) { | 2261 void Debugger::RegisterCodeBreakpoint(CodeBreakpoint* bpt) { |
| 2261 ASSERT(bpt->next() == NULL); | 2262 ASSERT(bpt->next() == NULL); |
| 2262 bpt->set_next(code_breakpoints_); | 2263 bpt->set_next(code_breakpoints_); |
| 2263 code_breakpoints_ = bpt; | 2264 code_breakpoints_ = bpt; |
| 2264 } | 2265 } |
| 2265 | 2266 |
| 2266 } // namespace dart | 2267 } // namespace dart |
| OLD | NEW |