| 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 2128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2139 } else { | 2139 } else { |
| 2140 return bpt_location->AddRepeated(this); | 2140 return bpt_location->AddRepeated(this); |
| 2141 } | 2141 } |
| 2142 } | 2142 } |
| 2143 | 2143 |
| 2144 | 2144 |
| 2145 Breakpoint* Debugger::SetBreakpointAtActivation(const Instance& closure) { | 2145 Breakpoint* Debugger::SetBreakpointAtActivation(const Instance& closure) { |
| 2146 if (!closure.IsClosure()) { | 2146 if (!closure.IsClosure()) { |
| 2147 return NULL; | 2147 return NULL; |
| 2148 } | 2148 } |
| 2149 const Function& func = Function::Handle(Closure::function(closure)); | 2149 const Function& func = Function::Handle(Closure::Cast(closure).function()); |
| 2150 const Script& script = Script::Handle(func.script()); | 2150 const Script& script = Script::Handle(func.script()); |
| 2151 BreakpointLocation* bpt_location = SetBreakpoint(script, | 2151 BreakpointLocation* bpt_location = SetBreakpoint(script, |
| 2152 func.token_pos(), | 2152 func.token_pos(), |
| 2153 func.end_token_pos(), | 2153 func.end_token_pos(), |
| 2154 -1, -1 /* no line/col */); | 2154 -1, -1 /* no line/col */); |
| 2155 return bpt_location->AddPerClosure(this, closure); | 2155 return bpt_location->AddPerClosure(this, closure); |
| 2156 } | 2156 } |
| 2157 | 2157 |
| 2158 | 2158 |
| 2159 Breakpoint* Debugger::BreakpointAtActivation(const Instance& closure) { | 2159 Breakpoint* Debugger::BreakpointAtActivation(const Instance& closure) { |
| (...skipping 1094 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3254 } | 3254 } |
| 3255 | 3255 |
| 3256 | 3256 |
| 3257 void Debugger::RegisterCodeBreakpoint(CodeBreakpoint* bpt) { | 3257 void Debugger::RegisterCodeBreakpoint(CodeBreakpoint* bpt) { |
| 3258 ASSERT(bpt->next() == NULL); | 3258 ASSERT(bpt->next() == NULL); |
| 3259 bpt->set_next(code_breakpoints_); | 3259 bpt->set_next(code_breakpoints_); |
| 3260 code_breakpoints_ = bpt; | 3260 code_breakpoints_ = bpt; |
| 3261 } | 3261 } |
| 3262 | 3262 |
| 3263 } // namespace dart | 3263 } // namespace dart |
| OLD | NEW |