| 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 2161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2172 | 2172 |
| 2173 @observable bool get hasNoAllocations => newSpace.empty && oldSpace.empty; | 2173 @observable bool get hasNoAllocations => newSpace.empty && oldSpace.empty; |
| 2174 @observable bool traceAllocations = false; | 2174 @observable bool traceAllocations = false; |
| 2175 @reflectable final fields = new ObservableList<Field>(); | 2175 @reflectable final fields = new ObservableList<Field>(); |
| 2176 @reflectable final functions = new ObservableList<ServiceFunction>(); | 2176 @reflectable final functions = new ObservableList<ServiceFunction>(); |
| 2177 | 2177 |
| 2178 @observable Class superclass; | 2178 @observable Class superclass; |
| 2179 @reflectable final interfaces = new ObservableList<Instance>(); | 2179 @reflectable final interfaces = new ObservableList<Instance>(); |
| 2180 @reflectable final subclasses = new ObservableList<Class>(); | 2180 @reflectable final subclasses = new ObservableList<Class>(); |
| 2181 | 2181 |
| 2182 @observable Instance superType; |
| 2183 @observable Instance mixin; |
| 2184 |
| 2182 bool get canCache => true; | 2185 bool get canCache => true; |
| 2183 bool get immutable => false; | 2186 bool get immutable => false; |
| 2184 | 2187 |
| 2185 Class._empty(ServiceObjectOwner owner) : super._empty(owner); | 2188 Class._empty(ServiceObjectOwner owner) : super._empty(owner); |
| 2186 | 2189 |
| 2187 void _update(ObservableMap map, bool mapIsRef) { | 2190 void _update(ObservableMap map, bool mapIsRef) { |
| 2188 _upgradeCollection(map, isolate); | 2191 _upgradeCollection(map, isolate); |
| 2189 super._update(map, mapIsRef); | 2192 super._update(map, mapIsRef); |
| 2190 | 2193 |
| 2191 name = map['name']; | 2194 name = map['name']; |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2235 | 2238 |
| 2236 functions.clear(); | 2239 functions.clear(); |
| 2237 functions.addAll(map['functions']); | 2240 functions.addAll(map['functions']); |
| 2238 functions.sort(ServiceObject.LexicalSortName); | 2241 functions.sort(ServiceObject.LexicalSortName); |
| 2239 | 2242 |
| 2240 superclass = map['super']; | 2243 superclass = map['super']; |
| 2241 // Work-around Object not tracking its subclasses in the VM. | 2244 // Work-around Object not tracking its subclasses in the VM. |
| 2242 if (superclass != null && superclass.name == "Object") { | 2245 if (superclass != null && superclass.name == "Object") { |
| 2243 superclass._addSubclass(this); | 2246 superclass._addSubclass(this); |
| 2244 } | 2247 } |
| 2248 superType = map['superType']; |
| 2249 mixin = map['mixin']; |
| 2250 |
| 2245 error = map['error']; | 2251 error = map['error']; |
| 2246 | 2252 |
| 2247 traceAllocations = | 2253 traceAllocations = |
| 2248 (map['_traceAllocations'] != null) ? map['_traceAllocations'] : false; | 2254 (map['_traceAllocations'] != null) ? map['_traceAllocations'] : false; |
| 2249 | 2255 |
| 2250 var allocationStats = map['_allocationStats']; | 2256 var allocationStats = map['_allocationStats']; |
| 2251 if (allocationStats != null) { | 2257 if (allocationStats != null) { |
| 2252 newSpace.update(allocationStats['new']); | 2258 newSpace.update(allocationStats['new']); |
| 2253 oldSpace.update(allocationStats['old']); | 2259 oldSpace.update(allocationStats['old']); |
| 2254 notifyPropertyChange(#hasNoAllocations, 0, 1); | 2260 notifyPropertyChange(#hasNoAllocations, 0, 1); |
| (...skipping 29 matching lines...) Expand all Loading... |
| 2284 | 2290 |
| 2285 String toString() => 'Class($vmName)'; | 2291 String toString() => 'Class($vmName)'; |
| 2286 } | 2292 } |
| 2287 | 2293 |
| 2288 class Instance extends HeapObject { | 2294 class Instance extends HeapObject { |
| 2289 @observable String kind; | 2295 @observable String kind; |
| 2290 @observable String valueAsString; // If primitive. | 2296 @observable String valueAsString; // If primitive. |
| 2291 @observable bool valueAsStringIsTruncated; | 2297 @observable bool valueAsStringIsTruncated; |
| 2292 @observable ServiceFunction function; // If a closure. | 2298 @observable ServiceFunction function; // If a closure. |
| 2293 @observable Context context; // If a closure. | 2299 @observable Context context; // If a closure. |
| 2294 @observable String name; // If a Type. | |
| 2295 @observable int length; // If a List, Map or TypedData. | 2300 @observable int length; // If a List, Map or TypedData. |
| 2296 @observable Instance pattern; // If a RegExp. | 2301 @observable Instance pattern; // If a RegExp. |
| 2297 | 2302 |
| 2298 @observable var typeClass; | 2303 @observable String name; |
| 2304 @observable Class typeClass; |
| 2305 @observable Class parameterizedClass; |
| 2306 @observable ServiceObject typeArguments; |
| 2307 @observable int parameterIndex; |
| 2308 @observable Instance targetType; |
| 2309 @observable Instance bound; |
| 2310 |
| 2299 @observable var fields; | 2311 @observable var fields; |
| 2300 @observable var nativeFields; | 2312 @observable var nativeFields; |
| 2301 @observable var elements; // If a List. | 2313 @observable var elements; // If a List. |
| 2302 @observable var associations; // If a Map. | 2314 @observable var associations; // If a Map. |
| 2303 @observable var typedElements; // If a TypedData. | 2315 @observable var typedElements; // If a TypedData. |
| 2304 @observable var referent; // If a MirrorReference. | 2316 @observable var referent; // If a MirrorReference. |
| 2305 @observable Instance key; // If a WeakProperty. | 2317 @observable Instance key; // If a WeakProperty. |
| 2306 @observable Instance value; // If a WeakProperty. | 2318 @observable Instance value; // If a WeakProperty. |
| 2307 @observable Breakpoint activationBreakpoint; // If a Closure. | 2319 @observable Breakpoint activationBreakpoint; // If a Closure. |
| 2308 @observable Function oneByteFunction; // If a RegExp. | 2320 @observable Function oneByteFunction; // If a RegExp. |
| (...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2432 typedElements = bytes.buffer.asFloat64List(); break; | 2444 typedElements = bytes.buffer.asFloat64List(); break; |
| 2433 case "Int32x4List": | 2445 case "Int32x4List": |
| 2434 typedElements = bytes.buffer.asInt32x4List(); break; | 2446 typedElements = bytes.buffer.asInt32x4List(); break; |
| 2435 case "Float32x4List": | 2447 case "Float32x4List": |
| 2436 typedElements = bytes.buffer.asFloat32x4List(); break; | 2448 typedElements = bytes.buffer.asFloat32x4List(); break; |
| 2437 case "Float64x2List": | 2449 case "Float64x2List": |
| 2438 typedElements = bytes.buffer.asFloat64x2List(); break; | 2450 typedElements = bytes.buffer.asFloat64x2List(); break; |
| 2439 } | 2451 } |
| 2440 } | 2452 } |
| 2441 typeClass = map['typeClass']; | 2453 typeClass = map['typeClass']; |
| 2454 parameterizedClass = map['parameterizedClass']; |
| 2455 typeArguments = map['typeArguments']; |
| 2456 parameterIndex = map['parameterIndex']; |
| 2457 targetType = map['targetType']; |
| 2458 bound = map['bound']; |
| 2459 |
| 2442 referent = map['mirrorReferent']; | 2460 referent = map['mirrorReferent']; |
| 2443 key = map['propertyKey']; | 2461 key = map['propertyKey']; |
| 2444 value = map['propertyValue']; | 2462 value = map['propertyValue']; |
| 2445 activationBreakpoint = map['_activationBreakpoint']; | 2463 activationBreakpoint = map['_activationBreakpoint']; |
| 2446 | 2464 |
| 2447 // We are fully loaded. | 2465 // We are fully loaded. |
| 2448 _loaded = true; | 2466 _loaded = true; |
| 2449 } | 2467 } |
| 2450 | 2468 |
| 2451 String get shortName { | 2469 String get shortName { |
| (...skipping 1567 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4019 var v = list[i]; | 4037 var v = list[i]; |
| 4020 if ((v is ObservableMap) && _isServiceMap(v)) { | 4038 if ((v is ObservableMap) && _isServiceMap(v)) { |
| 4021 list[i] = owner.getFromMap(v); | 4039 list[i] = owner.getFromMap(v); |
| 4022 } else if (v is ObservableList) { | 4040 } else if (v is ObservableList) { |
| 4023 _upgradeObservableList(v, owner); | 4041 _upgradeObservableList(v, owner); |
| 4024 } else if (v is ObservableMap) { | 4042 } else if (v is ObservableMap) { |
| 4025 _upgradeObservableMap(v, owner); | 4043 _upgradeObservableMap(v, owner); |
| 4026 } | 4044 } |
| 4027 } | 4045 } |
| 4028 } | 4046 } |
| OLD | NEW |