OLD | NEW |
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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 service; | 5 part of service; |
6 | 6 |
7 // Some value smaller than the object ring, so requesting a large array | 7 // Some value smaller than the object ring, so requesting a large array |
8 // doesn't result in an expired ref because the elements lapped it in the | 8 // doesn't result in an expired ref because the elements lapped it in the |
9 // object ring. | 9 // object ring. |
10 const int kDefaultFieldLimit = 100; | 10 const int kDefaultFieldLimit = 100; |
(...skipping 408 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
419 ServiceObject getFromMap(ObservableMap map); | 419 ServiceObject getFromMap(ObservableMap map); |
420 } | 420 } |
421 | 421 |
422 abstract class Location { | 422 abstract class Location { |
423 Script get script; | 423 Script get script; |
424 int get tokenPos; | 424 int get tokenPos; |
425 } | 425 } |
426 | 426 |
427 /// A [SourceLocation] represents a location or range in the source code. | 427 /// A [SourceLocation] represents a location or range in the source code. |
428 class SourceLocation extends ServiceObject implements Location, | 428 class SourceLocation extends ServiceObject implements Location, |
429 M.SourceLocation { | 429 M.SourceLocation { |
430 Script script; | 430 Script script; |
431 int tokenPos; | 431 int tokenPos; |
432 int endTokenPos; | 432 int endTokenPos; |
433 | 433 |
434 Future<int> getLine() async { | 434 Future<int> getLine() async { |
435 await script.load(); | 435 await script.load(); |
436 return script.tokenToLine(tokenPos); | 436 return script.tokenToLine(tokenPos); |
437 } | 437 } |
438 | 438 |
439 Future<int> getColumn() async { | 439 Future<int> getColumn() async { |
(...skipping 3695 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4135 var v = list[i]; | 4135 var v = list[i]; |
4136 if ((v is ObservableMap) && _isServiceMap(v)) { | 4136 if ((v is ObservableMap) && _isServiceMap(v)) { |
4137 list[i] = owner.getFromMap(v); | 4137 list[i] = owner.getFromMap(v); |
4138 } else if (v is ObservableList) { | 4138 } else if (v is ObservableList) { |
4139 _upgradeObservableList(v, owner); | 4139 _upgradeObservableList(v, owner); |
4140 } else if (v is ObservableMap) { | 4140 } else if (v is ObservableMap) { |
4141 _upgradeObservableMap(v, owner); | 4141 _upgradeObservableMap(v, owner); |
4142 } | 4142 } |
4143 } | 4143 } |
4144 } | 4144 } |
OLD | NEW |