Chromium Code Reviews| Index: runtime/vm/service/protocol.md |
| diff --git a/runtime/vm/service/protocol.md b/runtime/vm/service/protocol.md |
| index b9546490b1a804caa37a5f8798af5e943cc7347b..85b8607a8e5cc2bff6de085012f847f904d38b9b 100644 |
| --- a/runtime/vm/service/protocol.md |
| +++ b/runtime/vm/service/protocol.md |
| @@ -30,7 +30,7 @@ For example, an isolate reference may look like this... |
| topFrame: ... |
| ... |
| } |
| - |
| + |
| ## IDs |
| Most responses returned by the VM Service have an <code>id</code> property. An id is used to request an object from the VM. |
| @@ -104,7 +104,6 @@ TODO |
| | libs | List of [@Library](#atLibrary) | |
| | features | List of String | |
| - |
| ### <a name="atLibrary"></a>@Library |
| | keys | values | comments |
| @@ -129,6 +128,188 @@ TODO |
| | functions | List of [@Function](#atFunction) | |
| | scripts | List of [@Script](#atScript) | |
| +### <a name="atClass"></a>@Class |
| +| keys | values | comments |
| +| --- | --- | --- |
| +| type | "@Class" | |
| +| id | String | |
| +| user_name | String | |
| +| name | String | |
| + |
| +### <a name="Class"></a>Class |
| +| keys | values | comments |
| +| --- | --- | --- |
| +| type | "@Class" | |
| +| id | String | |
| +| user_name | String | |
| +| name | String | |
| +| error | [Error](#Error) | (optional) Error encountered during class finalization |
|
turnidge
2014/08/21 00:33:01
I have been using ? for optional properties. What
Cutch
2014/08/26 20:29:28
Done.
|
| +| implemented | bool | |
| +| abstract | bool | |
| +| patch | bool | |
| +| finalized | bool | |
| +| const | bool | |
| +| super | [@Class](#atClass) | (optional) Super class |
| +| library | [@Library](#atLibrary) | Owning library |
| +| script | [@Script](#atScript) | (optional) Script containing class source |
| +| tokenPos | int | starting token position of class source in script |
| +| endTokenPos | int | end token position of class source in script |
| +| interfaces | List of [@Class](#atClass) | interfaces this class has implemented |
| +| fields | List of [@Field](#atField) | |
| +| functions | List of [@Function](#atFunction) | |
| +| subclasses | List of [@Class](#atClass) | classes which extend this class. |
| +| canonicalTypes | [@TypeList] | kill? |
| +| allocationStats | ClassHeapStats | |
| + |
| +### <a name="atFunction"></a>@Function |
| +| keys | values | comments |
| +| --- | --- | --- |
| +| type | "@Function" | |
| +| id | String | |
| +| user_name | String | |
| +| name | String | |
| +| owningLibrary | [@Library](#atLibrary) | Set for non-top level functions |
|
turnidge
2014/08/21 00:33:01
optional.
Cutch
2014/08/26 20:29:28
Done.
|
| +| owningClass | [@Class](#atClass) | Set for non-top level functions |
|
turnidge
2014/08/21 00:33:01
optional.
Cutch
2014/08/26 20:29:28
Done.
|
| +| parent | [@Function](#atFunction) | (optional) Parent function |
| +| kind | String | |
| + |
| +### <a name="Function"></a>Function |
| +| keys | values | comments |
| +| --- | --- | --- |
| +| type | "@Function" | |
| +| id | String | |
| +| user_name | String | |
| +| name | String | |
| +| owningLibrary | [@Library](#atLibrary) | Set for non-top level functions |
| +| owningClass | [@Class](#atClass) | Set for non-top level functions |
|
turnidge
2014/08/21 00:33:01
ditto these two.
Cutch
2014/08/26 20:29:28
Done.
|
| +| parent | [@Function](#atFunction) | (optional) Parent function |
| +| kind | String | |
| +| is_static | bool | |
| +| is_const | bool | |
| +| is_optimizable | bool | |
| +| is_inlinable | bool | |
| +| usage_counter | int | |
| +| optimized_call_site_count | int | |
| +| deoptimizations | int | |
| +| script | [@Script](#atScript) | (optional) Script containing function source |
| +| tokenPos | int | starting token position of function source in script |
| +| endTokenPos | int | end token position of function source in script |
| +| unoptimized_code | [@Code](#atCode) | |
| +| code | [@Code](#atCode) | Current code |
| + |
| +### <a name="atField"></a>@Field |
| +| keys | values | comments |
| +| --- | --- | --- |
| +| type | "@Field" | |
| +| id | String | |
| +| user_name | String | |
| +| name | String | |
| +| value | Instance | (optional) value associated with static field <-- do we want to include this in a field reference? |
|
turnidge
2014/08/21 00:33:01
Good catch, probably not.
Cutch
2014/08/26 20:29:28
Acknowledged.
|
| +| owner | [@Library](#atLibrary) | Owning library <-- handling of owner is inconsistent with Function |
| +| owner | [@Class](#atClass) | Owning class <-- handling of owner is inconsistent with Function |
|
turnidge
2014/08/21 00:33:01
I have been thinking of using a comma when multipl
Cutch
2014/08/26 20:29:28
Done.
|
| +| declared_type | [@AbstractType](#atAbstractType) | |
| +| static | bool | |
| +| final | bool | |
| +| const | bool | |
| + |
| +### <a name="Field"></a>Field |
| +| keys | values | comments |
| +| --- | --- | --- |
| +| type | "Field" | |
| +| id | String | |
| +| user_name | String | |
| +| name | String | |
| +| value | Instance | (optional) value associated with static field <-- do we want to include this in a field reference? |
| +| owner | [@Library](#atLibrary) | Owning library <-- handling of owner is inconsistent with Function |
| +| owner | [@Class](#atClass) | Owning class <-- handling of owner is inconsistent with Function |
| +| declared_type | [@AbstractType](#atAbstractType) | |
| +| static | bool | |
| +| final | bool | |
| +| const | bool | |
| +| guard_nullable | bool | can this field hold a null? |
| +| guard_class | String OR [@Class](#atClass) | "unknown", "dynamic", or a class |
| +| guard_length | String OR int | "unknown", "variable", or length of array |
| +| script | [@Script](#atScript) | (optional) Script containing field source |
| +| tokenPos | int | starting token position of field source in script |
| + |
| +### <a name="atCode"></a>@Code |
| +| keys | values | comments |
| +| --- | --- | --- |
| +| type | "@Code" | |
| +| id | String | |
| +| user_name | String | |
| +| name | String | |
| +| start | String | starting address of code |
| +| end | String | ending address of code |
| +| isOptimized | bool | |
| +| isAlive | bool | |
| +| kind | String |
| +| function | [@Function](#atFunction) | |
| + |
| +### <a name="Code"></a>Code |
| +| keys | values | comments |
| +| --- | --- | --- |
| +| type | "@Code" | |
| +| id | String | |
| +| user_name | String | |
| +| name | String | |
| +| start | String | starting address of code |
| +| end | String | ending address of code |
| +| isOptimized | bool | |
| +| isAlive | bool | |
| +| kind | String |
| +| function | [@Function](#atFunction) | |
| +| object_pool | List of [@Object](Object) | |
| +| disassembly | List of String | See note below on disassembly list format |
| + |
| +*Disassembly list format* |
| +| index | value | description |
| +| --- | --- | --- | |
| +| 0 | String | Address of instruction |
| +| 1 | String | Hex encoding of instruction |
| +| 2 | String | Human encoding of instruction |
| +| 0 + (3 * K) | String | Address of Kth instruction |
| +| 1 + (3 * K) | String | Hex encoding of instruction of Kth instruction |
| +| 2 + (3 * K) | String | Human encoding of instruction of Kth instruction |
| + |
| +### <a name="Error"></a>Error |
| +| keys | values | comments |
| +| --- | --- | --- |
| +| type | "Error" | |
| +| id | String | always empty |
| +| kind | String | |
| +| message | String | |
| + |
| +### <a name="ClassHeapStats"></a>ClassHeapStats |
| +| keys | values | comments |
| +| --- | --- | --- |
| +| type | "ClassHeapStats" | |
| +| id | String | |
| +| class | [@Class](#atClass) | |
| +| new | List of int | Allocation statistics for new space. See note below on allocation statistics list format. |
| +| old | List of int | Allocation statistics for old space. See note below on allocation statistics list format. |
| +| promotedInstances | int | number of instances promoted at last new-space GC. |
| +| promotedBytes | int | number of bytes promoted at last new-space GC. |
| + |
| +*Allocation statistics list format* |
| +| index | value | description |
| +| --- | --- | --- | |
| +| 0 | int | Instances allocated before last GC | |
| +| 1 | int | Bytes allocated before last GC | |
| +| 2 | int | Instances alive after last GC | |
| +| 3 | int | Bytes alive after last GC | |
| +| 4 | int | Instances allocated since last GC | |
| +| 5 | int | Bytes allocated since last GC | |
| +| 6 | int | Instances allocated since last accumulator reset | |
| +| 7 | int | Bytes allocated since last accumulator reset | |
|
turnidge
2014/08/21 00:33:01
You should do the same thing with TokenLine down b
Cutch
2014/08/26 20:29:28
Done.
|
| + |
| +### <a name="atAbstractType"></a>@AbstractType |
| + |
| +### <a name="AbstractType"></a>AbstractType |
| + |
| +### <a name="PcDescriptor"></a>PcDescriptor |
| + |
| + |
| ### <a name="atScript"></a>@Script |
| | keys | values | comments | example | |
| | --- | --- | --- |