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 357 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
368 break; | 368 break; |
369 } | 369 } |
370 } | 370 } |
371 } | 371 } |
372 return token_pos_; | 372 return token_pos_; |
373 } | 373 } |
374 | 374 |
375 | 375 |
376 intptr_t ActivationFrame::TryIndex() { | 376 intptr_t ActivationFrame::TryIndex() { |
377 if (desc_rec_ == NULL) { | 377 if (desc_rec_ == NULL) { |
| 378 TokenPos(); // Side effect: compute desc_rec_ lazily. |
| 379 } |
| 380 if (desc_rec_ == NULL) { |
378 return -1; | 381 return -1; |
379 } else { | 382 } else { |
380 return desc_rec_->try_index(); | 383 return desc_rec_->try_index(); |
381 } | 384 } |
382 } | 385 } |
383 | 386 |
384 | 387 |
385 intptr_t ActivationFrame::LineNumber() { | 388 intptr_t ActivationFrame::LineNumber() { |
386 // Compute line number lazily since it causes scanning of the script. | 389 // Compute line number lazily since it causes scanning of the script. |
387 if ((line_number_ < 0) && (TokenPos() >= 0)) { | 390 if ((line_number_ < 0) && (TokenPos() >= 0)) { |
(...skipping 2187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2575 } | 2578 } |
2576 | 2579 |
2577 | 2580 |
2578 void Debugger::RegisterCodeBreakpoint(CodeBreakpoint* bpt) { | 2581 void Debugger::RegisterCodeBreakpoint(CodeBreakpoint* bpt) { |
2579 ASSERT(bpt->next() == NULL); | 2582 ASSERT(bpt->next() == NULL); |
2580 bpt->set_next(code_breakpoints_); | 2583 bpt->set_next(code_breakpoints_); |
2581 code_breakpoints_ = bpt; | 2584 code_breakpoints_ = bpt; |
2582 } | 2585 } |
2583 | 2586 |
2584 } // namespace dart | 2587 } // namespace dart |
OLD | NEW |