| 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 2961 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2972 _upgradeCollection(map, isolate); | 2972 _upgradeCollection(map, isolate); |
| 2973 | 2973 |
| 2974 kind = stringToSentinelKind(map['kind']); | 2974 kind = stringToSentinelKind(map['kind']); |
| 2975 valueAsString = map['valueAsString']; | 2975 valueAsString = map['valueAsString']; |
| 2976 _loaded = true; | 2976 _loaded = true; |
| 2977 } | 2977 } |
| 2978 | 2978 |
| 2979 String toString() => 'Sentinel($kind)'; | 2979 String toString() => 'Sentinel($kind)'; |
| 2980 } | 2980 } |
| 2981 | 2981 |
| 2982 class Field extends HeapObject implements M.FieldRef { | 2982 class Field extends HeapObject implements M.Field { |
| 2983 // Library or Class. | 2983 // Library or Class. |
| 2984 @observable HeapObject dartOwner; | 2984 @observable HeapObject dartOwner; |
| 2985 @observable Library library; | 2985 @observable Library library; |
| 2986 @observable Instance declaredType; | 2986 @observable Instance declaredType; |
| 2987 @observable bool isStatic; | 2987 @observable bool isStatic; |
| 2988 @observable bool isFinal; | 2988 @observable bool isFinal; |
| 2989 @observable bool isConst; | 2989 @observable bool isConst; |
| 2990 @observable Instance staticValue; | 2990 @observable Instance staticValue; |
| 2991 @observable String name; | 2991 @observable String name; |
| 2992 @observable String vmName; | 2992 @observable String vmName; |
| 2993 | 2993 |
| 2994 @observable bool guardNullable; | 2994 @observable bool guardNullable; |
| 2995 @observable var /* Class | String */ guardClass; | 2995 M.GuardClassKind guardClassKind; |
| 2996 @observable Class guardClass; |
| 2996 @observable String guardLength; | 2997 @observable String guardLength; |
| 2997 @observable SourceLocation location; | 2998 @observable SourceLocation location; |
| 2998 | 2999 |
| 2999 Field._empty(ServiceObjectOwner owner) : super._empty(owner); | 3000 Field._empty(ServiceObjectOwner owner) : super._empty(owner); |
| 3000 | 3001 |
| 3001 void _update(ObservableMap map, bool mapIsRef) { | 3002 void _update(ObservableMap map, bool mapIsRef) { |
| 3002 // Extract full properties. | 3003 // Extract full properties. |
| 3003 _upgradeCollection(map, isolate); | 3004 _upgradeCollection(map, isolate); |
| 3004 super._update(map, mapIsRef); | 3005 super._update(map, mapIsRef); |
| 3005 | 3006 |
| (...skipping 12 matching lines...) Expand all Loading... |
| 3018 | 3019 |
| 3019 } else { | 3020 } else { |
| 3020 library = dartOwner; | 3021 library = dartOwner; |
| 3021 } | 3022 } |
| 3022 | 3023 |
| 3023 if (mapIsRef) { | 3024 if (mapIsRef) { |
| 3024 return; | 3025 return; |
| 3025 } | 3026 } |
| 3026 | 3027 |
| 3027 guardNullable = map['_guardNullable']; | 3028 guardNullable = map['_guardNullable']; |
| 3028 guardClass = map['_guardClass']; | 3029 if (map['_guardClass'] is Class) { |
| 3030 guardClass = map['_guardClass']; |
| 3031 guardClassKind = M.GuardClassKind.single; |
| 3032 } else { |
| 3033 switch (map['_guardClass']) { |
| 3034 case 'various': |
| 3035 guardClassKind = M.GuardClassKind.dynamic; |
| 3036 break; |
| 3037 case 'unknown': |
| 3038 default: |
| 3039 guardClassKind = M.GuardClassKind.unknown; |
| 3040 break; |
| 3041 } |
| 3042 } |
| 3043 |
| 3029 guardLength = map['_guardLength']; | 3044 guardLength = map['_guardLength']; |
| 3030 location = map['location']; | 3045 location = map['location']; |
| 3031 _loaded = true; | 3046 _loaded = true; |
| 3032 } | 3047 } |
| 3033 | 3048 |
| 3034 String toString() => 'Field(${dartOwner.name}.$name)'; | 3049 String toString() => 'Field(${dartOwner.name}.$name)'; |
| 3035 } | 3050 } |
| 3036 | 3051 |
| 3037 | 3052 |
| 3038 class ScriptLine extends Observable { | 3053 class ScriptLine extends Observable { |
| (...skipping 1291 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4330 var v = list[i]; | 4345 var v = list[i]; |
| 4331 if ((v is ObservableMap) && _isServiceMap(v)) { | 4346 if ((v is ObservableMap) && _isServiceMap(v)) { |
| 4332 list[i] = owner.getFromMap(v); | 4347 list[i] = owner.getFromMap(v); |
| 4333 } else if (v is ObservableList) { | 4348 } else if (v is ObservableList) { |
| 4334 _upgradeObservableList(v, owner); | 4349 _upgradeObservableList(v, owner); |
| 4335 } else if (v is ObservableMap) { | 4350 } else if (v is ObservableMap) { |
| 4336 _upgradeObservableMap(v, owner); | 4351 _upgradeObservableMap(v, owner); |
| 4337 } | 4352 } |
| 4338 } | 4353 } |
| 4339 } | 4354 } |
| OLD | NEW |