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 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
107 | 107 |
108 /// The user-level type of this object. | 108 /// The user-level type of this object. |
109 @reflectable String get type => _type; | 109 @reflectable String get type => _type; |
110 String _type; | 110 String _type; |
111 | 111 |
112 /// The vm type of this object. | 112 /// The vm type of this object. |
113 @reflectable String get vmType => _vmType; | 113 @reflectable String get vmType => _vmType; |
114 String _vmType; | 114 String _vmType; |
115 | 115 |
116 bool get isICData => vmType == 'ICData'; | 116 bool get isICData => vmType == 'ICData'; |
| 117 bool get isMegamorphicCache => vmType == 'MegamorphicCache'; |
117 bool get isInstructions => vmType == 'Instructions'; | 118 bool get isInstructions => vmType == 'Instructions'; |
118 bool get isObjectPool => vmType == 'ObjectPool'; | 119 bool get isObjectPool => vmType == 'ObjectPool'; |
119 bool get isContext => type == 'Context'; | 120 bool get isContext => type == 'Context'; |
120 bool get isError => type == 'Error'; | 121 bool get isError => type == 'Error'; |
121 bool get isInstance => type == 'Instance'; | 122 bool get isInstance => type == 'Instance'; |
122 bool get isSentinel => type == 'Sentinel'; | 123 bool get isSentinel => type == 'Sentinel'; |
123 bool get isMessage => type == 'Message'; | 124 bool get isMessage => type == 'Message'; |
124 | 125 |
125 // Kinds of Instance. | 126 // Kinds of Instance. |
126 bool get isAbstractType => false; | 127 bool get isAbstractType => false; |
(...skipping 3204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3331 return; | 3332 return; |
3332 } | 3333 } |
3333 argumentsDescriptor = map['_argumentsDescriptor']; | 3334 argumentsDescriptor = map['_argumentsDescriptor']; |
3334 entries = map['_entries']; | 3335 entries = map['_entries']; |
3335 } | 3336 } |
3336 } | 3337 } |
3337 | 3338 |
3338 class MegamorphicCache extends HeapObject { | 3339 class MegamorphicCache extends HeapObject { |
3339 @observable int mask; | 3340 @observable int mask; |
3340 @observable Instance buckets; | 3341 @observable Instance buckets; |
| 3342 @observable String selector; |
| 3343 @observable Instance argumentsDescriptor; |
3341 | 3344 |
3342 bool get canCache => false; | 3345 bool get canCache => false; |
3343 bool get immutable => false; | 3346 bool get immutable => false; |
3344 | 3347 |
3345 MegamorphicCache._empty(ServiceObjectOwner owner) : super._empty(owner); | 3348 MegamorphicCache._empty(ServiceObjectOwner owner) : super._empty(owner); |
3346 | 3349 |
3347 void _update(ObservableMap map, bool mapIsRef) { | 3350 void _update(ObservableMap map, bool mapIsRef) { |
3348 _upgradeCollection(map, isolate); | 3351 _upgradeCollection(map, isolate); |
3349 super._update(map, mapIsRef); | 3352 super._update(map, mapIsRef); |
3350 | 3353 |
| 3354 selector = map['_selector']; |
3351 if (mapIsRef) { | 3355 if (mapIsRef) { |
3352 return; | 3356 return; |
3353 } | 3357 } |
3354 | 3358 |
3355 mask = map['_mask']; | 3359 mask = map['_mask']; |
3356 buckets = map['_buckets']; | 3360 buckets = map['_buckets']; |
| 3361 argumentsDescriptor = map['_argumentsDescriptor']; |
3357 } | 3362 } |
3358 } | 3363 } |
3359 | 3364 |
3360 class Instructions extends HeapObject { | 3365 class Instructions extends HeapObject { |
3361 bool get canCache => false; | 3366 bool get canCache => false; |
3362 bool get immutable => true; | 3367 bool get immutable => true; |
3363 | 3368 |
3364 @observable Code code; | 3369 @observable Code code; |
3365 @observable ObjectPool objectPool; | 3370 @observable ObjectPool objectPool; |
3366 | 3371 |
(...skipping 622 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3989 var v = list[i]; | 3994 var v = list[i]; |
3990 if ((v is ObservableMap) && _isServiceMap(v)) { | 3995 if ((v is ObservableMap) && _isServiceMap(v)) { |
3991 list[i] = owner.getFromMap(v); | 3996 list[i] = owner.getFromMap(v); |
3992 } else if (v is ObservableList) { | 3997 } else if (v is ObservableList) { |
3993 _upgradeObservableList(v, owner); | 3998 _upgradeObservableList(v, owner); |
3994 } else if (v is ObservableMap) { | 3999 } else if (v is ObservableMap) { |
3995 _upgradeObservableMap(v, owner); | 4000 _upgradeObservableMap(v, owner); |
3996 } | 4001 } |
3997 } | 4002 } |
3998 } | 4003 } |
OLD | NEW |