| OLD | NEW |
| 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, 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 part of debugger; | 5 part of debugger; |
| 6 | 6 |
| 7 class SourceLocation { | 7 class SourceLocation { |
| 8 SourceLocation.file(this.script, this.line, this.col); | 8 SourceLocation.file(this.script, this.line, this.col); |
| 9 SourceLocation.func(this.function); | 9 SourceLocation.func(this.function); |
| 10 SourceLocation.error(this.errorMessage); | 10 SourceLocation.error(this.errorMessage); |
| (...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 180 matches.add(cls); | 180 matches.add(cls); |
| 181 } | 181 } |
| 182 } | 182 } |
| 183 } | 183 } |
| 184 } | 184 } |
| 185 return matches; | 185 return matches; |
| 186 }); | 186 }); |
| 187 } | 187 } |
| 188 | 188 |
| 189 static ServiceFunction _getConstructor(Class cls, String name) { | 189 static ServiceFunction _getConstructor(Class cls, String name) { |
| 190 var matches = []; | |
| 191 for (var function in cls.functions) { | 190 for (var function in cls.functions) { |
| 192 assert(cls.loaded); | 191 assert(cls.loaded); |
| 193 if (name == function.name) { | 192 if (name == function.name) { |
| 194 return function; | 193 return function; |
| 195 } | 194 } |
| 196 } | 195 } |
| 197 return null; | 196 return null; |
| 198 } | 197 } |
| 199 | 198 |
| 200 // TODO(turnidge): This does not handle named functions which are | 199 // TODO(turnidge): This does not handle named functions which are |
| (...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 358 return 'invalid source location (${errorMessage})'; | 357 return 'invalid source location (${errorMessage})'; |
| 359 } | 358 } |
| 360 | 359 |
| 361 Script script; | 360 Script script; |
| 362 int line; | 361 int line; |
| 363 int col; | 362 int col; |
| 364 ServiceFunction function; | 363 ServiceFunction function; |
| 365 String errorMessage; | 364 String errorMessage; |
| 366 bool get valid => (errorMessage == null); | 365 bool get valid => (errorMessage == null); |
| 367 } | 366 } |
| OLD | NEW |