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

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

Issue 466183002: Use function names as service IDs, rather than indices. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 4 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/functions_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 1352 matching lines...) Expand 10 before | Expand all | Expand 10 after
1363 return; 1363 return;
1364 } 1364 }
1365 children.add(cls); 1365 children.add(cls);
1366 } 1366 }
1367 1367
1368 Future<ServiceObject> get(String command) { 1368 Future<ServiceObject> get(String command) {
1369 return isolate.get(id + "/$command"); 1369 return isolate.get(id + "/$command");
1370 } 1370 }
1371 } 1371 }
1372 1372
1373 // TODO(koda): Sync this with VM.
1373 class FunctionKind { 1374 class FunctionKind {
1374 final String _strValue; 1375 final String _strValue;
1375 FunctionKind._internal(this._strValue); 1376 FunctionKind._internal(this._strValue);
1376 toString() => _strValue; 1377 toString() => _strValue;
1377 bool isFake() => [kCollected, kNative, kTag, kReused].contains(this); 1378 bool isFake() => [kCollected, kNative, kTag, kReused].contains(this);
1378 1379
1379 static FunctionKind fromJSON(String value) { 1380 static FunctionKind fromJSON(String value) {
1380 switch(value) { 1381 switch(value) {
1381 case 'kRegularFunction': return kRegularFunction; 1382 case 'kRegularFunction': return kRegularFunction;
1382 case 'kClosureFunction': return kClosureFunction; 1383 case 'kClosureFunction': return kClosureFunction;
1383 case 'kGetterFunction': return kGetterFunction; 1384 case 'kGetterFunction': return kGetterFunction;
1384 case 'kSetterFunction': return kSetterFunction; 1385 case 'kSetterFunction': return kSetterFunction;
1385 case 'kConstructor': return kConstructor; 1386 case 'kConstructor': return kConstructor;
1386 case 'kImplicitGetterFunction': return kImplicitGetterFunction; 1387 case 'kImplicitGetter': return kImplicitGetterFunction;
1387 case 'kImplicitSetterFunction': return kImplicitSetterFunction; 1388 case 'kImplicitSetter': return kImplicitSetterFunction;
1388 case 'kStaticInitializer': return kStaticInitializer; 1389 case 'kStaticInitializer': return kStaticInitializer;
1389 case 'kMethodExtractor': return kMethodExtractor; 1390 case 'kMethodExtractor': return kMethodExtractor;
1390 case 'kNoSuchMethodDispatcher': return kNoSuchMethodDispatcher; 1391 case 'kNoSuchMethodDispatcher': return kNoSuchMethodDispatcher;
1391 case 'kInvokeFieldDispatcher': return kInvokeFieldDispatcher; 1392 case 'kInvokeFieldDispatcher': return kInvokeFieldDispatcher;
1392 case 'Collected': return kCollected; 1393 case 'Collected': return kCollected;
1393 case 'Native': return kNative; 1394 case 'Native': return kNative;
1394 case 'Tag': return kTag; 1395 case 'Tag': return kTag;
1395 case 'Reused': return kReused; 1396 case 'Reused': return kReused;
1396 } 1397 }
1397 return kUNKNOWN; 1398 return kUNKNOWN;
(...skipping 844 matching lines...) Expand 10 before | Expand all | Expand 10 after
2242 var v = list[i]; 2243 var v = list[i];
2243 if ((v is ObservableMap) && _isServiceMap(v)) { 2244 if ((v is ObservableMap) && _isServiceMap(v)) {
2244 list[i] = owner.getFromMap(v); 2245 list[i] = owner.getFromMap(v);
2245 } else if (v is ObservableList) { 2246 } else if (v is ObservableList) {
2246 _upgradeObservableList(v, owner); 2247 _upgradeObservableList(v, owner);
2247 } else if (v is ObservableMap) { 2248 } else if (v is ObservableMap) {
2248 _upgradeObservableMap(v, owner); 2249 _upgradeObservableMap(v, owner);
2249 } 2250 }
2250 } 2251 }
2251 } 2252 }
OLDNEW
« no previous file with comments | « no previous file | runtime/bin/vmservice/observatory/test/functions_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698