| 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 995 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1006 } | 1006 } |
| 1007 } | 1007 } |
| 1008 | 1008 |
| 1009 if (target_function.HasImplicitClosureFunction()) { | 1009 if (target_function.HasImplicitClosureFunction()) { |
| 1010 // There is a closurized version of this function. If the closure | 1010 // There is a closurized version of this function. If the closure |
| 1011 // is already compiled, we need to set a code breakpoint in its | 1011 // is already compiled, we need to set a code breakpoint in its |
| 1012 // code. | 1012 // code. |
| 1013 const Function& closure = | 1013 const Function& closure = |
| 1014 Function::Handle(target_function.ImplicitClosureFunction()); | 1014 Function::Handle(target_function.ImplicitClosureFunction()); |
| 1015 if (closure.HasCode()) { | 1015 if (closure.HasCode()) { |
| 1016 EnsureFunctionIsDeoptimized(closure); |
| 1016 CodeBreakpoint* closure_bpt = | 1017 CodeBreakpoint* closure_bpt = |
| 1017 MakeCodeBreakpoint(closure, first_token_pos, last_token_pos); | 1018 MakeCodeBreakpoint(closure, first_token_pos, last_token_pos); |
| 1018 if ((closure_bpt != NULL) && (closure_bpt->src_bpt() == NULL)) { | 1019 if ((closure_bpt != NULL) && (closure_bpt->src_bpt() == NULL)) { |
| 1019 closure_bpt->set_src_bpt(source_bpt); | 1020 closure_bpt->set_src_bpt(source_bpt); |
| 1020 } | 1021 } |
| 1021 } | 1022 } |
| 1022 } | 1023 } |
| 1023 source_bpt->Enable(); | 1024 source_bpt->Enable(); |
| 1024 return source_bpt; | 1025 return source_bpt; |
| 1025 } | 1026 } |
| (...skipping 611 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1637 } | 1638 } |
| 1638 | 1639 |
| 1639 | 1640 |
| 1640 void Debugger::RegisterCodeBreakpoint(CodeBreakpoint* bpt) { | 1641 void Debugger::RegisterCodeBreakpoint(CodeBreakpoint* bpt) { |
| 1641 ASSERT(bpt->next() == NULL); | 1642 ASSERT(bpt->next() == NULL); |
| 1642 bpt->set_next(code_breakpoints_); | 1643 bpt->set_next(code_breakpoints_); |
| 1643 code_breakpoints_ = bpt; | 1644 code_breakpoints_ = bpt; |
| 1644 } | 1645 } |
| 1645 | 1646 |
| 1646 } // namespace dart | 1647 } // namespace dart |
| OLD | NEW |