Chromium Code Reviews| 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 442 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 453 } else { | 453 } else { |
| 454 column_number_ = -1; | 454 column_number_ = -1; |
| 455 } | 455 } |
| 456 } | 456 } |
| 457 return column_number_; | 457 return column_number_; |
| 458 } | 458 } |
| 459 | 459 |
| 460 | 460 |
| 461 void ActivationFrame::GetVarDescriptors() { | 461 void ActivationFrame::GetVarDescriptors() { |
| 462 if (var_descriptors_.IsNull()) { | 462 if (var_descriptors_.IsNull()) { |
| 463 var_descriptors_ = code().var_descriptors(); | 463 var_descriptors_ = code().is_optimized() |
| 464 ? Code::Handle(function().unoptimized_code()).var_descriptors() | |
|
srdjan
2015/04/14 16:53:01
unoptimized_code may not exist, you may need to tr
Florian Schneider
2015/04/15 10:07:07
Done.
| |
| 465 : code().var_descriptors(); | |
| 464 ASSERT(!var_descriptors_.IsNull()); | 466 ASSERT(!var_descriptors_.IsNull()); |
| 465 } | 467 } |
| 466 } | 468 } |
| 467 | 469 |
| 468 | 470 |
| 469 bool ActivationFrame::IsDebuggable() const { | 471 bool ActivationFrame::IsDebuggable() const { |
| 470 return Debugger::IsDebuggable(function()); | 472 return Debugger::IsDebuggable(function()); |
| 471 } | 473 } |
| 472 | 474 |
| 473 | 475 |
| (...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 647 } | 649 } |
| 648 vars_initialized_ = true; | 650 vars_initialized_ = true; |
| 649 } | 651 } |
| 650 | 652 |
| 651 | 653 |
| 652 intptr_t ActivationFrame::NumLocalVariables() { | 654 intptr_t ActivationFrame::NumLocalVariables() { |
| 653 GetDescIndices(); | 655 GetDescIndices(); |
| 654 return desc_indices_.length(); | 656 return desc_indices_.length(); |
| 655 } | 657 } |
| 656 | 658 |
| 657 // TODO(hausner): Handle captured variables. | 659 // TODO(hausner): Handle captured variables. |
|
Florian Schneider
2015/04/15 10:07:07
This TODO seems obsolete: captured variables are a
hausner
2015/04/15 16:11:29
Correct, this comment is no longer true. We handle
| |
| 658 RawObject* ActivationFrame::GetLocalVar(intptr_t slot_index) { | 660 RawObject* ActivationFrame::GetLocalVar(intptr_t slot_index) { |
| 659 if (deopt_frame_.IsNull()) { | 661 if (deopt_frame_.IsNull()) { |
| 660 uword var_address = fp() + slot_index * kWordSize; | 662 uword var_address = fp() + slot_index * kWordSize; |
| 661 return reinterpret_cast<RawObject*>( | 663 return reinterpret_cast<RawObject*>( |
| 662 *reinterpret_cast<uword*>(var_address)); | 664 *reinterpret_cast<uword*>(var_address)); |
| 663 } else { | 665 } else { |
| 664 return deopt_frame_.At(deopt_frame_offset_ + slot_index); | 666 return deopt_frame_.At(deopt_frame_offset_ + slot_index); |
| 665 } | 667 } |
| 666 } | 668 } |
| 667 | 669 |
| (...skipping 1968 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2636 } | 2638 } |
| 2637 | 2639 |
| 2638 | 2640 |
| 2639 void Debugger::RegisterCodeBreakpoint(CodeBreakpoint* bpt) { | 2641 void Debugger::RegisterCodeBreakpoint(CodeBreakpoint* bpt) { |
| 2640 ASSERT(bpt->next() == NULL); | 2642 ASSERT(bpt->next() == NULL); |
| 2641 bpt->set_next(code_breakpoints_); | 2643 bpt->set_next(code_breakpoints_); |
| 2642 code_breakpoints_ = bpt; | 2644 code_breakpoints_ = bpt; |
| 2643 } | 2645 } |
| 2644 | 2646 |
| 2645 } // namespace dart | 2647 } // namespace dart |
| OLD | NEW |