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

Side by Side Diff: runtime/vm/service/service.md

Issue 1160873002: Sundry service protocol cleanups before version 1.0. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: pre commit Created 5 years, 6 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
« no previous file with comments | « runtime/vm/service.cc ('k') | runtime/vm/service_event.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Dart VM Service Protocol 0.0 1 # Dart VM Service Protocol 0.0
2 2
3 This document describes _version 0.0_ of the Dart VM Service Protocol. 3 This document describes _version 0.0_ of the Dart VM Service Protocol.
4 This protocol is used to communicate with a running Dart Virtual 4 This protocol is used to communicate with a running Dart Virtual
5 Machine. 5 Machine.
6 6
7 To use the Service Protocol, start the VM with the *--observe* flag. 7 To use the Service Protocol, start the VM with the *--observe* flag.
8 The VM will start a webserver which services protocol requests via WebSocket. 8 The VM will start a webserver which services protocol requests via WebSocket.
9 It is possible to make HTTP (non-WebSocket) requests, 9 It is possible to make HTTP (non-WebSocket) requests,
10 but this does not allow access to VM _events_ and is not documented 10 but this does not allow access to VM _events_ and is not documented
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 - [Double](#double) 52 - [Double](#double)
53 - [Error](#error) 53 - [Error](#error)
54 - [Event](#event) 54 - [Event](#event)
55 - [EventType](#eventtype) 55 - [EventType](#eventtype)
56 - [Field](#field) 56 - [Field](#field)
57 - [Flag](#flag) 57 - [Flag](#flag)
58 - [FlagList](#flaglist) 58 - [FlagList](#flaglist)
59 - [FlagType](#flagtype) 59 - [FlagType](#flagtype)
60 - [Frame](#frame) 60 - [Frame](#frame)
61 - [Function](#function) 61 - [Function](#function)
62 - [FunctionKind](#functionkind)
63 - [Instance](#instance) 62 - [Instance](#instance)
64 - [Int](#int) 63 - [Int](#int)
65 - [Isolate](#isolate) 64 - [Isolate](#isolate)
66 - [Library](#library) 65 - [Library](#library)
67 - [List](#list) 66 - [List](#list)
68 - [ListElement](#listelement) 67 - [ListElement](#listelement)
69 - [Message](#message) 68 - [Message](#message)
70 - [Null](#null) 69 - [Null](#null)
71 - [Object](#object) 70 - [Object](#object)
72 - [Sentinel](#sentinel) 71 - [Sentinel](#sentinel)
73 - [SentinelType](#sentineltype) 72 - [SentinelType](#sentineltype)
74 - [Script](#script) 73 - [Script](#script)
75 - [ScriptKind](#scriptkind)
76 - [Stack](#stack) 74 - [Stack](#stack)
77 - [StepOption](#stepoption) 75 - [StepOption](#stepoption)
78 - [String](#string) 76 - [String](#string)
79 - [Success](#success) 77 - [Success](#success)
80 - [Type](#type) 78 - [Type](#type)
81 - [TypeArguments](#typearguments) 79 - [TypeArguments](#typearguments)
82 - [Response](#response) 80 - [Response](#response)
83 - [Version](#version) 81 - [Version](#version)
84 - [VM](#vm) 82 - [VM](#vm)
85 - [Revision History](#revision-history) 83 - [Revision History](#revision-history)
(...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after
413 If an error occurs while evaluating the expression, an [@Error](#error) 411 If an error occurs while evaluating the expression, an [@Error](#error)
414 reference will be returned. 412 reference will be returned.
415 413
416 If the expression is evaluated successfully, an [@Instance](#instance) 414 If the expression is evaluated successfully, an [@Instance](#instance)
417 reference will be returned. 415 reference will be returned.
418 416
419 ### evaluateInFrame 417 ### evaluateInFrame
420 418
421 ``` 419 ```
422 @Instance|@Error evaluateInFrame(string isolateId, 420 @Instance|@Error evaluateInFrame(string isolateId,
423 int frame, 421 int frameIndex,
424 string expression) 422 string expression)
425 ``` 423 ```
426 424
427 The _evaluateInFrame_ RPC is used to evaluate an expression in the context of 425 The _evaluateInFrame_ RPC is used to evaluate an expression in the
428 a particular stack frame. _frame_ is the index of the desired [Frame](#frame), 426 context of a particular stack frame. _frameIndex_ is the index of the
429 with an index of _0_ indicating the top (most recent) frame. 427 desired [Frame](#frame), with an index of _0_ indicating the top (most
428 recent) frame.
430 429
431 If an error occurs while evaluating the expression, an [@Error](#error) 430 If an error occurs while evaluating the expression, an [@Error](#error)
432 reference will be returned. 431 reference will be returned.
433 432
434 If the expression is evaluated successfully, an [@Instance](#instance) 433 If the expression is evaluated successfully, an [@Instance](#instance)
435 reference will be returned. 434 reference will be returned.
436 435
437 ### getFlagList 436 ### getFlagList
438 437
439 ``` 438 ```
(...skipping 584 matching lines...) Expand 10 before | Expand all | Expand 10 after
1024 @Type declaredType; 1023 @Type declaredType;
1025 1024
1026 // Is this field const? 1025 // Is this field const?
1027 bool const; 1026 bool const;
1028 1027
1029 // Is this field final? 1028 // Is this field final?
1030 bool final; 1029 bool final;
1031 1030
1032 // Is this field static? 1031 // Is this field static?
1033 bool static; 1032 bool static;
1034
1035 // The value of this field, if the field is static.
1036 @Instance value [optional];
1037 } 1033 }
1038 ``` 1034 ```
1039 1035
1040 An _@Field_ is a reference to a _Field_. 1036 An _@Field_ is a reference to a _Field_.
1041 1037
1042 ``` 1038 ```
1043 class Field extends Object { 1039 class Field extends Object {
1044 // The name of this field. 1040 // The name of this field.
1045 string name; 1041 string name;
1046 1042
1047 // The owner of this field, which can be either a Library or a 1043 // The owner of this field, which can be either a Library or a
1048 // Class. 1044 // Class.
1049 @Object owner; 1045 @Object owner;
1050 1046
1051 // The declared type of this field. 1047 // The declared type of this field.
1052 @Type declaredType; 1048 @Type declaredType;
1053 1049
1054 // Is this field const? 1050 // Is this field const?
1055 bool const; 1051 bool const;
1056 1052
1057 // Is this field final? 1053 // Is this field final?
1058 bool final; 1054 bool final;
1059 1055
1060 // Is this field static? 1056 // Is this field static?
1061 bool static; 1057 bool static;
1062 1058
1063 // The value of this field, if the field is static. 1059 // The value of this field, if the field is static.
1064 @Instance value [optional]; 1060 @Instance staticValue [optional];
1065 1061
1066 // The script containing this feild. 1062 // The script containing this feild.
1067 @Script script [optional]; 1063 @Script script [optional];
1068 1064
1069 // The token position of this field. 1065 // The token position of this field.
1070 int tokenPos [optional]; 1066 int tokenPos [optional];
1071 } 1067 }
1072 ``` 1068 ```
1073 1069
1074 A _Field_ provides information about a Dart language field or 1070 A _Field_ provides information about a Dart language field or
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
1141 1137
1142 ``` 1138 ```
1143 class @Function extends @Object { 1139 class @Function extends @Object {
1144 // The name of this function. 1140 // The name of this function.
1145 string name; 1141 string name;
1146 1142
1147 // The owner of this field, which can be a Library, Class, or a 1143 // The owner of this field, which can be a Library, Class, or a
1148 // Function. 1144 // Function.
1149 @Library|@Class|@Function owner; 1145 @Library|@Class|@Function owner;
1150 1146
1151 // What kind of function is this? 1147 // Is this function static?
1152 FunctionKind kind; 1148 bool static
1149
1150 // Is this function const?
1151 bool const;
1152
1153 } 1153 }
1154 ``` 1154 ```
1155 1155
1156 An _@Function_ is a reference to a _Function_. 1156 An _@Function_ is a reference to a _Function_.
1157 1157
1158 1158
1159 ``` 1159 ```
1160 // A Dart language function. 1160 // A Dart language function.
1161 class Function extends Object { 1161 class Function extends Object {
1162 // The name of this function. 1162 // The name of this function.
1163 string name; 1163 string name;
1164 1164
1165 // The owner of this field, which can be a Library, Class, or a 1165 // The owner of this field, which can be a Library, Class, or a
1166 // Function. 1166 // Function.
1167 @Library|@Class|@Function owner; 1167 @Library|@Class|@Function owner;
1168 1168
1169 // What kind of function is this?
1170 FunctionKind kind;
1171
1172 // Is this function static?
1173 bool static
1174
1175 // Is this function const?
1176 bool const;
1177
1178 // The script containing this function. 1169 // The script containing this function.
1179 @Script script [optional]; 1170 @Script script [optional];
1180 1171
1181 // The first token position of this function. 1172 // The first token position of this function.
1182 int tokenPos [optional]; 1173 int tokenPos [optional];
1183 1174
1184 // The last token position of this function. 1175 // The last token position of this function.
1185 int endTokenPos [optional]; 1176 int endTokenPos [optional];
1186 1177
1187 // The compiled code associated with this function. 1178 // The compiled code associated with this function.
1188 @Code code [optional]; 1179 @Code code [optional];
1189 } 1180 }
1190 ``` 1181 ```
1191 1182
1192 A _Function_ represents a Dart language function. 1183 A _Function_ represents a Dart language function.
1193 1184
1194 ### FunctionKind
1195
1196 ```
1197 enum FunctionKind {
1198 RegularFunction,
1199 ClosureFunction,
1200 GetterFunction,
1201 SetterFunction,
1202 Constructor,
1203 ImplicitGetter,
1204 ImplicitSetter,
1205 ImplicitStaticFinalGetter,
1206 IrregexpFunction,
1207 StaticInitializer,
1208 MethodExtractor,
1209 NoSuchMethodDispatcher,
1210 InvokeFieldDispatcher,
1211 Collected,
1212 Native,
1213 Stub,
1214 Tag
1215 }
1216 ```
1217
1218 TODO: Do we need to expose all of this?
1219
1220 ### Instance 1185 ### Instance
1221 1186
1222 ``` 1187 ```
1223 class @Instance extends @Object { 1188 class @Instance extends @Object {
1224 // Instance references include their class. 1189 // Instance references include their class.
1225 @Class class; 1190 @Class class;
1226 } 1191 }
1227 ``` 1192 ```
1228 1193
1229 _@Instance_ is a reference to an _Instance_. 1194 _@Instance_ is a reference to an _Instance_.
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
1398 ``` 1363 ```
1399 1364
1400 ### Message 1365 ### Message
1401 1366
1402 ``` 1367 ```
1403 class Message { 1368 class Message {
1404 int index; 1369 int index;
1405 string name; 1370 string name;
1406 string messageObjectId; 1371 string messageObjectId;
1407 int size; 1372 int size;
1408 int priority;
1409 @Function handlerFunction [optional]; 1373 @Function handlerFunction [optional];
1410 @Script handleScript [optional]; 1374 @Script handleScript [optional];
1411 int handlerTokenPos [optional]; 1375 int handlerTokenPos [optional];
1412 } 1376 }
1413 ``` 1377 ```
1414 1378
1415 ### Null 1379 ### Null
1416 1380
1417 ``` 1381 ```
1418 class @Null extends @Instance { 1382 class @Null extends @Instance {
(...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after
1729 // A list of isolates running in the VM. 1693 // A list of isolates running in the VM.
1730 @Isolate[] isolates 1694 @Isolate[] isolates
1731 } 1695 }
1732 ``` 1696 ```
1733 1697
1734 ## Revision History 1698 ## Revision History
1735 1699
1736 version | comments 1700 version | comments
1737 ------- | -------- 1701 ------- | --------
1738 0.0 | draft 1702 0.0 | draft
OLDNEW
« no previous file with comments | « runtime/vm/service.cc ('k') | runtime/vm/service_event.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698