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 1625 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1636 continue; | 1636 continue; |
1637 } | 1637 } |
1638 // Parse class definition if not done yet. | 1638 // Parse class definition if not done yet. |
1639 cls.EnsureIsFinalized(isolate_); | 1639 cls.EnsureIsFinalized(isolate_); |
1640 functions = cls.functions(); | 1640 functions = cls.functions(); |
1641 if (!functions.IsNull()) { | 1641 if (!functions.IsNull()) { |
1642 const intptr_t num_functions = functions.Length(); | 1642 const intptr_t num_functions = functions.Length(); |
1643 for (intptr_t pos = 0; pos < num_functions; pos++) { | 1643 for (intptr_t pos = 0; pos < num_functions; pos++) { |
1644 function ^= functions.At(pos); | 1644 function ^= functions.At(pos); |
1645 ASSERT(!function.IsNull()); | 1645 ASSERT(!function.IsNull()); |
1646 if (function.is_debuggable() && | 1646 if (FunctionContains(function, script, token_pos)) { |
1647 FunctionContains(function, script, token_pos)) { | |
1648 SelectBestFit(&best_fit, &function); | 1647 SelectBestFit(&best_fit, &function); |
1649 } | 1648 } |
1650 } | 1649 } |
1651 } | 1650 } |
1652 | 1651 |
1653 closures = cls.closures(); | 1652 closures = cls.closures(); |
1654 if (!closures.IsNull()) { | 1653 if (!closures.IsNull()) { |
1655 const intptr_t num_closures = closures.Length(); | 1654 const intptr_t num_closures = closures.Length(); |
1656 for (intptr_t pos = 0; pos < num_closures; pos++) { | 1655 for (intptr_t pos = 0; pos < num_closures; pos++) { |
1657 function ^= closures.At(pos); | 1656 function ^= closures.At(pos); |
1658 ASSERT(!function.IsNull()); | 1657 ASSERT(!function.IsNull()); |
1659 if (function.is_debuggable() && | 1658 if (FunctionContains(function, script, token_pos)) { |
1660 FunctionContains(function, script, token_pos)) { | |
1661 SelectBestFit(&best_fit, &function); | 1659 SelectBestFit(&best_fit, &function); |
1662 } | 1660 } |
1663 } | 1661 } |
1664 } | 1662 } |
1665 } | 1663 } |
1666 } | 1664 } |
1667 return best_fit.raw(); | 1665 return best_fit.raw(); |
1668 } | 1666 } |
1669 | 1667 |
1670 | 1668 |
(...skipping 967 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2638 } | 2636 } |
2639 | 2637 |
2640 | 2638 |
2641 void Debugger::RegisterCodeBreakpoint(CodeBreakpoint* bpt) { | 2639 void Debugger::RegisterCodeBreakpoint(CodeBreakpoint* bpt) { |
2642 ASSERT(bpt->next() == NULL); | 2640 ASSERT(bpt->next() == NULL); |
2643 bpt->set_next(code_breakpoints_); | 2641 bpt->set_next(code_breakpoints_); |
2644 code_breakpoints_ = bpt; | 2642 code_breakpoints_ = bpt; |
2645 } | 2643 } |
2646 | 2644 |
2647 } // namespace dart | 2645 } // namespace dart |
OLD | NEW |