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 2234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2245 void update(List stats) { | 2245 void update(List stats) { |
2246 accumulated.instances = stats[ACCUMULATED]; | 2246 accumulated.instances = stats[ACCUMULATED]; |
2247 accumulated.bytes = stats[ACCUMULATED_SIZE]; | 2247 accumulated.bytes = stats[ACCUMULATED_SIZE]; |
2248 current.instances = stats[LIVE_AFTER_GC] + stats[ALLOCATED_SINCE_GC]; | 2248 current.instances = stats[LIVE_AFTER_GC] + stats[ALLOCATED_SINCE_GC]; |
2249 current.bytes = stats[LIVE_AFTER_GC_SIZE] + stats[ALLOCATED_SINCE_GC_SIZE]; | 2249 current.bytes = stats[LIVE_AFTER_GC_SIZE] + stats[ALLOCATED_SINCE_GC_SIZE]; |
2250 } | 2250 } |
2251 | 2251 |
2252 bool get empty => accumulated.empty && current.empty; | 2252 bool get empty => accumulated.empty && current.empty; |
2253 } | 2253 } |
2254 | 2254 |
2255 class Class extends HeapObject implements M.ClassRef { | 2255 class Class extends HeapObject implements M.Class { |
2256 @observable Library library; | 2256 @observable Library library; |
2257 | 2257 |
2258 @observable bool isAbstract; | 2258 @observable bool isAbstract; |
2259 @observable bool isConst; | 2259 @observable bool isConst; |
2260 @observable bool isFinalized; | 2260 @observable bool isFinalized; |
2261 @observable bool isPatch; | 2261 @observable bool isPatch; |
2262 @observable bool isImplemented; | 2262 @observable bool isImplemented; |
2263 | 2263 |
2264 @observable SourceLocation location; | 2264 @observable SourceLocation location; |
2265 | 2265 |
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2383 | 2383 |
2384 Future<ServiceObject> getAllocationSamples([String tags = 'None']) { | 2384 Future<ServiceObject> getAllocationSamples([String tags = 'None']) { |
2385 var params = { 'tags': tags, | 2385 var params = { 'tags': tags, |
2386 'classId': id }; | 2386 'classId': id }; |
2387 return isolate.invokeRpc('_getAllocationSamples', params); | 2387 return isolate.invokeRpc('_getAllocationSamples', params); |
2388 } | 2388 } |
2389 | 2389 |
2390 String toString() => 'Class($vmName)'; | 2390 String toString() => 'Class($vmName)'; |
2391 } | 2391 } |
2392 | 2392 |
2393 class Instance extends HeapObject implements M.InstanceRef { | 2393 class Instance extends HeapObject implements M.Instance { |
2394 @observable String kind; | 2394 @observable String kind; |
2395 @observable String valueAsString; // If primitive. | 2395 @observable String valueAsString; // If primitive. |
2396 @observable bool valueAsStringIsTruncated; | 2396 @observable bool valueAsStringIsTruncated; |
2397 @observable ServiceFunction function; // If a closure. | 2397 @observable ServiceFunction function; // If a closure. |
2398 @observable Context context; // If a closure. | 2398 @observable Context context; // If a closure. |
2399 @observable int length; // If a List, Map or TypedData. | 2399 @observable int length; // If a List, Map or TypedData. |
2400 @observable Instance pattern; // If a RegExp. | 2400 @observable Instance pattern; // If a RegExp. |
2401 | 2401 |
2402 @observable String name; | 2402 @observable String name; |
2403 @observable Class typeClass; | 2403 @observable Class typeClass; |
(...skipping 1690 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4094 var v = list[i]; | 4094 var v = list[i]; |
4095 if ((v is ObservableMap) && _isServiceMap(v)) { | 4095 if ((v is ObservableMap) && _isServiceMap(v)) { |
4096 list[i] = owner.getFromMap(v); | 4096 list[i] = owner.getFromMap(v); |
4097 } else if (v is ObservableList) { | 4097 } else if (v is ObservableList) { |
4098 _upgradeObservableList(v, owner); | 4098 _upgradeObservableList(v, owner); |
4099 } else if (v is ObservableMap) { | 4099 } else if (v is ObservableMap) { |
4100 _upgradeObservableMap(v, owner); | 4100 _upgradeObservableMap(v, owner); |
4101 } | 4101 } |
4102 } | 4102 } |
4103 } | 4103 } |
OLD | NEW |