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 1099 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1110 print("${obj.runtimeType} should be a HeapObject"); | 1110 print("${obj.runtimeType} should be a HeapObject"); |
1111 } | 1111 } |
1112 return obj; | 1112 return obj; |
1113 })); | 1113 })); |
1114 } | 1114 } |
1115 return result; | 1115 return result; |
1116 } | 1116 } |
1117 } | 1117 } |
1118 | 1118 |
1119 /// State for a running isolate. | 1119 /// State for a running isolate. |
1120 class Isolate extends ServiceObjectOwner { | 1120 class Isolate extends ServiceObjectOwner implements M.IsolateRef { |
1121 static const kLoggingStream = '_Logging'; | 1121 static const kLoggingStream = '_Logging'; |
1122 static const kExtensionStream = 'Extension'; | 1122 static const kExtensionStream = 'Extension'; |
1123 | 1123 |
1124 @reflectable VM get vm => owner; | 1124 @reflectable VM get vm => owner; |
1125 @reflectable Isolate get isolate => this; | 1125 @reflectable Isolate get isolate => this; |
1126 @observable int number; | 1126 @observable int number; |
1127 @observable int originNumber; | 1127 @observable int originNumber; |
1128 @observable DateTime startTime; | 1128 @observable DateTime startTime; |
1129 @observable Duration get upTime { | 1129 @observable Duration get upTime { |
1130 if (startTime == null) { | 1130 if (startTime == null) { |
(...skipping 1094 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2225 void update(List stats) { | 2225 void update(List stats) { |
2226 accumulated.instances = stats[ACCUMULATED]; | 2226 accumulated.instances = stats[ACCUMULATED]; |
2227 accumulated.bytes = stats[ACCUMULATED_SIZE]; | 2227 accumulated.bytes = stats[ACCUMULATED_SIZE]; |
2228 current.instances = stats[LIVE_AFTER_GC] + stats[ALLOCATED_SINCE_GC]; | 2228 current.instances = stats[LIVE_AFTER_GC] + stats[ALLOCATED_SINCE_GC]; |
2229 current.bytes = stats[LIVE_AFTER_GC_SIZE] + stats[ALLOCATED_SINCE_GC_SIZE]; | 2229 current.bytes = stats[LIVE_AFTER_GC_SIZE] + stats[ALLOCATED_SINCE_GC_SIZE]; |
2230 } | 2230 } |
2231 | 2231 |
2232 bool get empty => accumulated.empty && current.empty; | 2232 bool get empty => accumulated.empty && current.empty; |
2233 } | 2233 } |
2234 | 2234 |
2235 class Class extends HeapObject { | 2235 class Class extends HeapObject implements M.ClassRef { |
2236 @observable Library library; | 2236 @observable Library library; |
2237 | 2237 |
2238 @observable bool isAbstract; | 2238 @observable bool isAbstract; |
2239 @observable bool isConst; | 2239 @observable bool isConst; |
2240 @observable bool isFinalized; | 2240 @observable bool isFinalized; |
2241 @observable bool isPatch; | 2241 @observable bool isPatch; |
2242 @observable bool isImplemented; | 2242 @observable bool isImplemented; |
2243 | 2243 |
2244 @observable SourceLocation location; | 2244 @observable SourceLocation location; |
2245 | 2245 |
(...skipping 1878 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4124 var v = list[i]; | 4124 var v = list[i]; |
4125 if ((v is ObservableMap) && _isServiceMap(v)) { | 4125 if ((v is ObservableMap) && _isServiceMap(v)) { |
4126 list[i] = owner.getFromMap(v); | 4126 list[i] = owner.getFromMap(v); |
4127 } else if (v is ObservableList) { | 4127 } else if (v is ObservableList) { |
4128 _upgradeObservableList(v, owner); | 4128 _upgradeObservableList(v, owner); |
4129 } else if (v is ObservableMap) { | 4129 } else if (v is ObservableMap) { |
4130 _upgradeObservableMap(v, owner); | 4130 _upgradeObservableMap(v, owner); |
4131 } | 4131 } |
4132 } | 4132 } |
4133 } | 4133 } |
OLD | NEW |