| 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 /// Helper function for canceling a Future<StreamSubscription>. | 7 /// Helper function for canceling a Future<StreamSubscription>. |
| 8 Future cancelFutureSubscription( | 8 Future cancelFutureSubscription( |
| 9 Future<StreamSubscription> subscriptionFuture) async { | 9 Future<StreamSubscription> subscriptionFuture) async { |
| 10 if (subscriptionFuture != null) { | 10 if (subscriptionFuture != null) { |
| (...skipping 3138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3149 | 3149 |
| 3150 void _resolveJumpTarget(List<CodeInstruction> instructionsByAddressOffset, | 3150 void _resolveJumpTarget(List<CodeInstruction> instructionsByAddressOffset, |
| 3151 int startAddress) { | 3151 int startAddress) { |
| 3152 if (!_isJumpInstruction()) { | 3152 if (!_isJumpInstruction()) { |
| 3153 return; | 3153 return; |
| 3154 } | 3154 } |
| 3155 int address = _getJumpAddress(); | 3155 int address = _getJumpAddress(); |
| 3156 if (address == 0) { | 3156 if (address == 0) { |
| 3157 return; | 3157 return; |
| 3158 } | 3158 } |
| 3159 | 3159 var relativeAddress = address - startAddress; |
| 3160 jumpTarget = instructionsByAddressOffset[address - startAddress]; | 3160 if (relativeAddress < 0) { |
| 3161 Logger.root.warning('Bad address resolving jump target $relativeAddress'); |
| 3162 return; |
| 3163 } |
| 3164 if (relativeAddress >= instructionsByAddressOffset.length) { |
| 3165 Logger.root.warning('Bad address resolving jump target $relativeAddress'); |
| 3166 return; |
| 3167 } |
| 3168 jumpTarget = instructionsByAddressOffset[relativeAddress]; |
| 3161 } | 3169 } |
| 3162 } | 3170 } |
| 3163 | 3171 |
| 3164 class CodeKind { | 3172 class CodeKind { |
| 3165 final _value; | 3173 final _value; |
| 3166 const CodeKind._internal(this._value); | 3174 const CodeKind._internal(this._value); |
| 3167 String toString() => '$_value'; | 3175 String toString() => '$_value'; |
| 3168 bool isSynthetic() => [Collected, Native, Tag].contains(this); | 3176 bool isSynthetic() => [Collected, Native, Tag].contains(this); |
| 3169 bool isDart() => !isSynthetic(); | 3177 bool isDart() => !isSynthetic(); |
| 3170 static CodeKind fromString(String s) { | 3178 static CodeKind fromString(String s) { |
| (...skipping 521 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3692 var v = list[i]; | 3700 var v = list[i]; |
| 3693 if ((v is ObservableMap) && _isServiceMap(v)) { | 3701 if ((v is ObservableMap) && _isServiceMap(v)) { |
| 3694 list[i] = owner.getFromMap(v); | 3702 list[i] = owner.getFromMap(v); |
| 3695 } else if (v is ObservableList) { | 3703 } else if (v is ObservableList) { |
| 3696 _upgradeObservableList(v, owner); | 3704 _upgradeObservableList(v, owner); |
| 3697 } else if (v is ObservableMap) { | 3705 } else if (v is ObservableMap) { |
| 3698 _upgradeObservableMap(v, owner); | 3706 _upgradeObservableMap(v, owner); |
| 3699 } | 3707 } |
| 3700 } | 3708 } |
| 3701 } | 3709 } |
| OLD | NEW |