Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(422)

Side by Side Diff: runtime/bin/vmservice/observatory/lib/src/service/object.dart

Issue 544753002: Address static warnings in the service library and tests. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | runtime/bin/vmservice/observatory/test/contexts_test.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 /// A [ServiceObject] is an object known to the VM service and is tied 7 /// A [ServiceObject] is an object known to the VM service and is tied
8 /// to an owning [Isolate]. 8 /// to an owning [Isolate].
9 abstract class ServiceObject extends Observable { 9 abstract class ServiceObject extends Observable {
10 static int LexicalSortName(ServiceObject o1, ServiceObject o2) { 10 static int LexicalSortName(ServiceObject o1, ServiceObject o2) {
(...skipping 1510 matching lines...) Expand 10 before | Expand all | Expand 10 after
1521 String get shortName => valueAsString != null ? valueAsString : 'a ${clazz.nam e}'; 1521 String get shortName => valueAsString != null ? valueAsString : 'a ${clazz.nam e}';
1522 1522
1523 String toString() => 'Instance($shortName)'; 1523 String toString() => 'Instance($shortName)';
1524 } 1524 }
1525 1525
1526 1526
1527 class Context extends ServiceObject { 1527 class Context extends ServiceObject {
1528 @observable Class clazz; 1528 @observable Class clazz;
1529 @observable int size; 1529 @observable int size;
1530 1530
1531 @observable ServiceObject parentContext; 1531 @observable var parentContext;
1532 @observable var length; 1532 @observable int length;
1533 @observable var variables; 1533 @observable var variables;
1534 1534
1535 bool get isClosure => closureFunc != null;
1536
1537 Context._empty(ServiceObjectOwner owner) : super._empty(owner); 1535 Context._empty(ServiceObjectOwner owner) : super._empty(owner);
1538 1536
1539 void _update(ObservableMap map, bool mapIsRef) { 1537 void _update(ObservableMap map, bool mapIsRef) {
1540 // Extract full properties. 1538 // Extract full properties.
1541 _upgradeCollection(map, isolate); 1539 _upgradeCollection(map, isolate);
1542 1540
1543 size = map['size']; 1541 size = map['size'];
1544 length = map['length']; 1542 length = map['length'];
1545 parentContext = map['parent']; 1543 parentContext = map['parent'];
1546 1544
1547 if (mapIsRef) { 1545 if (mapIsRef) {
1548 return; 1546 return;
1549 } 1547 }
1550 1548
1551 clazz = map['class']; 1549 clazz = map['class'];
1552 variables = map['variables']; 1550 variables = map['variables'];
1553 1551
1554 // We are fully loaded. 1552 // We are fully loaded.
1555 _loaded = true; 1553 _loaded = true;
1556 } 1554 }
1557 1555
1558 String get shortName => valueAsString != null ? valueAsString : 'a ${clazz.nam e}';
1559
1560 String toString() => 'Context($length)'; 1556 String toString() => 'Context($length)';
1561 } 1557 }
1562 1558
1563 1559
1564 // TODO(koda): Sync this with VM. 1560 // TODO(koda): Sync this with VM.
1565 class FunctionKind { 1561 class FunctionKind {
1566 final String _strValue; 1562 final String _strValue;
1567 FunctionKind._internal(this._strValue); 1563 FunctionKind._internal(this._strValue);
1568 toString() => _strValue; 1564 toString() => _strValue;
1569 bool isFake() => [kCollected, kNative, kTag, kReused].contains(this); 1565 bool isFake() => [kCollected, kNative, kTag, kReused].contains(this);
(...skipping 954 matching lines...) Expand 10 before | Expand all | Expand 10 after
2524 var v = list[i]; 2520 var v = list[i];
2525 if ((v is ObservableMap) && _isServiceMap(v)) { 2521 if ((v is ObservableMap) && _isServiceMap(v)) {
2526 list[i] = owner.getFromMap(v); 2522 list[i] = owner.getFromMap(v);
2527 } else if (v is ObservableList) { 2523 } else if (v is ObservableList) {
2528 _upgradeObservableList(v, owner); 2524 _upgradeObservableList(v, owner);
2529 } else if (v is ObservableMap) { 2525 } else if (v is ObservableMap) {
2530 _upgradeObservableMap(v, owner); 2526 _upgradeObservableMap(v, owner);
2531 } 2527 }
2532 } 2528 }
2533 } 2529 }
OLDNEW
« no previous file with comments | « no previous file | runtime/bin/vmservice/observatory/test/contexts_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698