| OLD | NEW |
| 1 # Dart VM Service Protocol 1.0 (Draft 1) | 1 # Dart VM Service Protocol 1.0 (Draft 1) |
| 2 | 2 |
| 3 > Please post feedback to the [observatory-discuss group][discuss-list] | 3 > Please post feedback to the [observatory-discuss group][discuss-list] |
| 4 | 4 |
| 5 This document describes _draft 1_ of _version 1.0_ of the Dart VM | 5 This document describes _draft 1_ of _version 1.0_ of the Dart VM |
| 6 Service Protocol. This protocol is used to communicate with a running | 6 Service Protocol. This protocol is used to communicate with a running |
| 7 Dart Virtual Machine. | 7 Dart Virtual Machine. |
| 8 | 8 |
| 9 To use the Service Protocol, start the VM with the *--observe* flag. | 9 To use the Service Protocol, start the VM with the *--observe* flag. |
| 10 The VM will start a webserver which services protocol requests via WebSocket. | 10 The VM will start a webserver which services protocol requests via WebSocket. |
| (...skipping 778 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 789 // The library which contains this class. | 789 // The library which contains this class. |
| 790 @Library library; | 790 @Library library; |
| 791 | 791 |
| 792 // The location of this class in the source code. | 792 // The location of this class in the source code. |
| 793 SourceLocation location [optional]; | 793 SourceLocation location [optional]; |
| 794 | 794 |
| 795 // The superclass of this class, if any. | 795 // The superclass of this class, if any. |
| 796 @Class super [optional]; | 796 @Class super [optional]; |
| 797 | 797 |
| 798 // A list of interface types for this class. | 798 // A list of interface types for this class. |
| 799 @Type[] interfaces; | 799 // |
| 800 // The value will be of the kind: Type. |
| 801 @Instance[] interfaces; |
| 800 | 802 |
| 801 // A list of fields in this class. Does not include fields from | 803 // A list of fields in this class. Does not include fields from |
| 802 // superclasses. | 804 // superclasses. |
| 803 @Field[] fields; | 805 @Field[] fields; |
| 804 | 806 |
| 805 // A list of functions in this class. Does not include functions | 807 // A list of functions in this class. Does not include functions |
| 806 // from superclasses. | 808 // from superclasses. |
| 807 @Function[] functions; | 809 @Function[] functions; |
| 808 | 810 |
| 809 // A list of subclasses of this class. | 811 // A list of subclasses of this class. |
| (...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1054 ``` | 1056 ``` |
| 1055 class @Field extends @Object { | 1057 class @Field extends @Object { |
| 1056 // The name of this field. | 1058 // The name of this field. |
| 1057 string name; | 1059 string name; |
| 1058 | 1060 |
| 1059 // The owner of this field, which can be either a Library or a | 1061 // The owner of this field, which can be either a Library or a |
| 1060 // Class. | 1062 // Class. |
| 1061 @Object owner; | 1063 @Object owner; |
| 1062 | 1064 |
| 1063 // The declared type of this field. | 1065 // The declared type of this field. |
| 1064 @Type declaredType; | 1066 // |
| 1067 // The value will always be of one of the kinds: |
| 1068 // Type, TypeRef, TypeParameter, BoundedType. |
| 1069 @Instance declaredType; |
| 1065 | 1070 |
| 1066 // Is this field const? | 1071 // Is this field const? |
| 1067 bool const; | 1072 bool const; |
| 1068 | 1073 |
| 1069 // Is this field final? | 1074 // Is this field final? |
| 1070 bool final; | 1075 bool final; |
| 1071 | 1076 |
| 1072 // Is this field static? | 1077 // Is this field static? |
| 1073 bool static; | 1078 bool static; |
| 1074 } | 1079 } |
| 1075 ``` | 1080 ``` |
| 1076 | 1081 |
| 1077 An _@Field_ is a reference to a _Field_. | 1082 An _@Field_ is a reference to a _Field_. |
| 1078 | 1083 |
| 1079 ``` | 1084 ``` |
| 1080 class Field extends Object { | 1085 class Field extends Object { |
| 1081 // The name of this field. | 1086 // The name of this field. |
| 1082 string name; | 1087 string name; |
| 1083 | 1088 |
| 1084 // The owner of this field, which can be either a Library or a | 1089 // The owner of this field, which can be either a Library or a |
| 1085 // Class. | 1090 // Class. |
| 1086 @Object owner; | 1091 @Object owner; |
| 1087 | 1092 |
| 1088 // The declared type of this field. | 1093 // The declared type of this field. |
| 1089 @Type declaredType; | 1094 // |
| 1095 // The value will always be of one of the kinds: |
| 1096 // Type, TypeRef, TypeParameter, BoundedType. |
| 1097 @Instance declaredType; |
| 1090 | 1098 |
| 1091 // Is this field const? | 1099 // Is this field const? |
| 1092 bool const; | 1100 bool const; |
| 1093 | 1101 |
| 1094 // Is this field final? | 1102 // Is this field final? |
| 1095 bool final; | 1103 bool final; |
| 1096 | 1104 |
| 1097 // Is this field static? | 1105 // Is this field static? |
| 1098 bool static; | 1106 bool static; |
| 1099 | 1107 |
| (...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1414 // The index of a TypeParameter instance. | 1422 // The index of a TypeParameter instance. |
| 1415 // | 1423 // |
| 1416 // Provided for instance kinds: | 1424 // Provided for instance kinds: |
| 1417 // TypeParameter | 1425 // TypeParameter |
| 1418 int parameterIndex [optional]; | 1426 int parameterIndex [optional]; |
| 1419 | 1427 |
| 1420 // The type bounded by a BoundedType instance | 1428 // The type bounded by a BoundedType instance |
| 1421 // - or - | 1429 // - or - |
| 1422 // the referent of a TypeRef instance. | 1430 // the referent of a TypeRef instance. |
| 1423 // | 1431 // |
| 1424 // The value will always be one of: | 1432 // The value will always be of one of the kinds: |
| 1425 // Type, TypeRef, TypeParameter, BoundedType. | 1433 // Type, TypeRef, TypeParameter, BoundedType. |
| 1426 // | 1434 // |
| 1427 // Provided for instance kinds: | 1435 // Provided for instance kinds: |
| 1428 // BoundedType | 1436 // BoundedType |
| 1429 // TypeRef | 1437 // TypeRef |
| 1430 @Instance targetType [optional]; | 1438 @Instance targetType [optional]; |
| 1431 | 1439 |
| 1432 // The bound of a TypeParameter or BoundedType. | 1440 // The bound of a TypeParameter or BoundedType. |
| 1433 // | 1441 // |
| 1434 // The value will always be one of: | 1442 // The value will always be of one of the kinds: |
| 1435 // Type, TypeRef, TypeParameter, BoundedType. | 1443 // Type, TypeRef, TypeParameter, BoundedType. |
| 1436 // | 1444 // |
| 1437 // Provided for instance kinds: | 1445 // Provided for instance kinds: |
| 1438 // BoundedType | 1446 // BoundedType |
| 1439 // TypeParameter | 1447 // TypeParameter |
| 1440 @Instance bound [optional]; | 1448 @Instance bound [optional]; |
| 1441 } | 1449 } |
| 1442 ``` | 1450 ``` |
| 1443 | 1451 |
| 1444 An _Instance_ represents an instance of the Dart language class _Object_. | 1452 An _Instance_ represents an instance of the Dart language class _Object_. |
| (...skipping 441 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1886 ``` | 1894 ``` |
| 1887 | 1895 |
| 1888 _@TypeArguments_ is a reference to a _TypeArguments_ object. | 1896 _@TypeArguments_ is a reference to a _TypeArguments_ object. |
| 1889 | 1897 |
| 1890 ``` | 1898 ``` |
| 1891 class TypeArguments extends Object { | 1899 class TypeArguments extends Object { |
| 1892 // A name for this type argument list. | 1900 // A name for this type argument list. |
| 1893 string name; | 1901 string name; |
| 1894 | 1902 |
| 1895 // A list of types. | 1903 // A list of types. |
| 1896 @Type[] types; | 1904 // |
| 1905 // The value will always be one of the kinds: |
| 1906 // Type, TypeRef, TypeParameter, BoundedType. |
| 1907 @Instance[] types; |
| 1897 } | 1908 } |
| 1898 ``` | 1909 ``` |
| 1899 | 1910 |
| 1900 A _TypeArguments_ object represents the type argument vector for some | 1911 A _TypeArguments_ object represents the type argument vector for some |
| 1901 instantiated generic type. | 1912 instantiated generic type. |
| 1902 | 1913 |
| 1903 ### Response | 1914 ### Response |
| 1904 | 1915 |
| 1905 ``` | 1916 ``` |
| 1906 class Response { | 1917 class Response { |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1961 ``` | 1972 ``` |
| 1962 | 1973 |
| 1963 ## Revision History | 1974 ## Revision History |
| 1964 | 1975 |
| 1965 version | comments | 1976 version | comments |
| 1966 ------- | -------- | 1977 ------- | -------- |
| 1967 1.0 draft 1 | initial revision | 1978 1.0 draft 1 | initial revision |
| 1968 | 1979 |
| 1969 | 1980 |
| 1970 [discuss-list]: https://groups.google.com/a/dartlang.org/forum/#!forum/observato
ry-discuss | 1981 [discuss-list]: https://groups.google.com/a/dartlang.org/forum/#!forum/observato
ry-discuss |
| OLD | NEW |