Chromium Code Reviews| 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 3131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3142 | 3142 |
| 3143 void _resolveJumpTarget(List<CodeInstruction> instructionsByAddressOffset, | 3143 void _resolveJumpTarget(List<CodeInstruction> instructionsByAddressOffset, |
| 3144 int startAddress) { | 3144 int startAddress) { |
| 3145 if (!_isJumpInstruction()) { | 3145 if (!_isJumpInstruction()) { |
| 3146 return; | 3146 return; |
| 3147 } | 3147 } |
| 3148 int address = _getJumpAddress(); | 3148 int address = _getJumpAddress(); |
| 3149 if (address == 0) { | 3149 if (address == 0) { |
| 3150 return; | 3150 return; |
| 3151 } | 3151 } |
| 3152 | 3152 var relativeAddress = address - startAddress; |
| 3153 jumpTarget = instructionsByAddressOffset[address - startAddress]; | 3153 if (relativeAddress < 0) { |
| 3154 return; | |
| 3155 } | |
| 3156 if (relativeAddress >= instructionsByAddressOffset.length) { | |
| 3157 return; | |
| 3158 } | |
|
srdjan
2015/08/11 06:17:45
You may want to report it to console that there is
Cutch
2015/08/11 13:17:04
Done.
| |
| 3159 jumpTarget = instructionsByAddressOffset[relativeAddress]; | |
| 3154 } | 3160 } |
| 3155 } | 3161 } |
| 3156 | 3162 |
| 3157 class CodeKind { | 3163 class CodeKind { |
| 3158 final _value; | 3164 final _value; |
| 3159 const CodeKind._internal(this._value); | 3165 const CodeKind._internal(this._value); |
| 3160 String toString() => '$_value'; | 3166 String toString() => '$_value'; |
| 3161 bool isSynthetic() => [Collected, Native, Tag].contains(this); | 3167 bool isSynthetic() => [Collected, Native, Tag].contains(this); |
| 3162 bool isDart() => !isSynthetic(); | 3168 bool isDart() => !isSynthetic(); |
| 3163 static CodeKind fromString(String s) { | 3169 static CodeKind fromString(String s) { |
| (...skipping 521 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3685 var v = list[i]; | 3691 var v = list[i]; |
| 3686 if ((v is ObservableMap) && _isServiceMap(v)) { | 3692 if ((v is ObservableMap) && _isServiceMap(v)) { |
| 3687 list[i] = owner.getFromMap(v); | 3693 list[i] = owner.getFromMap(v); |
| 3688 } else if (v is ObservableList) { | 3694 } else if (v is ObservableList) { |
| 3689 _upgradeObservableList(v, owner); | 3695 _upgradeObservableList(v, owner); |
| 3690 } else if (v is ObservableMap) { | 3696 } else if (v is ObservableMap) { |
| 3691 _upgradeObservableMap(v, owner); | 3697 _upgradeObservableMap(v, owner); |
| 3692 } | 3698 } |
| 3693 } | 3699 } |
| 3694 } | 3700 } |
| OLD | NEW |