This repository was archived by the owner on Aug 11, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathinfo.proto
267 lines (197 loc) · 7.5 KB
/
info.proto
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
syntax = "proto3";
option go_package = "dart2js_info";
package dart2js_info.proto;
message DependencyInfoPB {
/** The dependency element's serialized_id, references as FunctionInfo or FieldInfo. */
string target_id = 1;
/** Either a selector mask indicating how this is used, or 'inlined'. */
string mask = 2;
}
/** The entire information produced when compiling a program. */
message AllInfoPB {
/** Summary information about the program. */
ProgramInfoPB program = 1;
/** All the recorded information about elements processed by the compiler. */
map<string, InfoPB> all_infos = 2;
/** Details about all deferred imports and what files would be loaded when the import is resolved. */
repeated LibraryDeferredImportsPB deferred_imports = 3;
}
/*
* Common interface to many pieces of information generated by the dart2js
* compiler that are directly associated with an element (compilation unit,
* library, class, function, or field).
*/
message InfoPB {
/** Name of the element associated with this info. */
string name = 1;
/** An id to uniquely identify this info among infos of the same kind. */
int32 id = 2;
/** A globally unique id which combines kind and id together. */
string serialized_id = 3;
/** Id used by the compiler when instrumenting code for code coverage. */
string coverage_id = 4;
/** Bytes used in the generated code for the corresponding element. */
int32 size = 5;
/** The serialized_id of the enclosing element. */
string parent_id = 6;
/** How does this function or field depend on others. */
repeated DependencyInfoPB uses = 7;
/** The serialized_id of the output unit the element is generated into. */
string output_unit_id = 8;
/** Reserved tags for future common fields. */
reserved 9 to 99;
/** The concrete info type. */
oneof concrete {
/** Information about a library element. */
LibraryInfoPB library_info = 100;
/** Information about a class element. */
ClassInfoPB class_info = 101;
/** Information about a function element. */
FunctionInfoPB function_info = 102;
/** Information about a field element. */
FieldInfoPB field_info = 103;
/** Information about a constant element. */
ConstantInfoPB constant_info = 104;
/** Information about an output unit element. */
OutputUnitInfoPB output_unit_info = 105;
/** Information about a typedef element. */
TypedefInfoPB typedef_info = 106;
/** Information about a closure element. */
ClosureInfoPB closure_info = 107;
}
}
/** General metadata about the dart2js invocation. */
message ProgramInfoPB {
/** serialized_id for the entrypoint FunctionInfo. */
string entrypoint_id = 1;
/** The overall size of the dart2js binary. */
int32 size = 2;
/** The version of dart2js used to compile the program. */
string dart2js_version = 3;
/** The time at which the compilation was performed in microseconds since epoch. */
int64 compilation_moment = 4;
/** The amount of time spent compiling the program in microseconds. */
int64 compilation_duration = 5;
/** The amount of time spent converting the info to protobuf in microseconds. */
int64 to_proto_duration = 6;
/** The amount of time spent writing out the serialized info in microseconds. */
int64 dump_info_duration = 7;
/** true if noSuchMethod is used. */
bool no_such_method_enabled = 8;
/** True if Object.runtimeType is used. */
bool is_runtime_type_used = 9;
/** True if dart:isolate library is used. */
bool is_isolate_used = 10;
/** True if Function.apply is used. */
bool is_function_apply_used = 11;
/** True if dart:mirrors features are used. */
bool is_mirrors_used = 12;
/** Whether the resulting dart2js binary is minified. */
bool minified = 13;
}
/** Info associated with a library element. */
message LibraryInfoPB {
/** The canonical uri that identifies the library. */
string uri = 1;
/** The serialized_ids of all FunctionInfo, FieldInfo, ClassInfo and TypedefInfo elements that are defined in the library. */
repeated string children_ids = 2;
}
/**
* Information about an output unit. Normally there is just one for the entire
* program unless the application uses deferred imports, in which case there
* would be an additional output unit per deferred chunk.
*/
message OutputUnitInfoPB {
/** The deferred imports that will load this output unit. */
repeated string imports = 1;
}
/** Information about a class element. */
message ClassInfoPB {
/** Whether the class is abstract. */
bool is_abstract = 1;
/** The serialized_ids of all FunctionInfo and FieldInfo elements defined in the class. */
repeated string children_ids = 2;
}
/** Information about a constant value. */
message ConstantInfoPB {
/** The actual generated code for the constant. */
string code = 1;
}
/** Information about a field element. */
message FieldInfoPB {
/** The type of the field. */
string type = 1;
/** The type inferred by dart2js's whole program analysis. */
string inferred_type = 2;
/** The serialized_ids of all ClosureInfo elements nested in the field initializer. */
repeated string children_ids = 3;
/** The actual generated code for the field. */
string code = 4;
/** Whether the field is a const declaration. */
bool is_const = 5;
/** When isConst is true, the serialized_id of the ConstantInfo initializer expression. */
string initializer_id = 6;
}
/** Information about a typedef declaration. */
message TypedefInfoPB {
/** The declared type. */
string type = 1;
}
/** Available function modifiers. */
message FunctionModifiersPB {
/** Whether the function is declared as static. */
bool is_static = 1;
/** Whether the function is declared as const. */
bool is_const = 2;
/** Whether the function is a factory constructor. */
bool is_factory = 3;
/** Whether the function is declared as extern. */
bool is_external = 4;
}
/** Information about a function parameter. */
message ParameterInfoPB {
string name = 1;
string type = 2;
string declared_type = 3;
}
/** Information about a function or method. */
message FunctionInfoPB {
/** Modifiers applied to the function. */
FunctionModifiersPB function_modifiers = 1;
/** serialized_ids of any ClosureInfo elements declared in the function. */
repeated string children_ids = 2;
/** The declared return type. */
string return_type = 3;
/** The inferred return type. */
string inferred_return_type = 4;
/** Name and type information for each parameter. */
repeated ParameterInfoPB parameters = 5;
/** Side-effects of the function. */
string side_effects = 6;
/** How many function calls were inlined into the function. */
int32 inlined_count = 7;
/** The actual generated code. */
string code = 8;
/** Measurements collected for this function. */
reserved 9;
}
/** Information about a closure, also known as a local function. */
message ClosureInfoPB {
/** serialized_id of the FunctionInfo wrapped by this closure. */
string function_id = 1;
}
message DeferredImportPB {
/** The prefix assigned to the deferred import. */
string prefix = 1;
/** The list of filenames loaded by the import. */
repeated string files = 2;
}
/** Information about deferred imports within a dart library. */
message LibraryDeferredImportsPB {
/** The uri of the library which makes the deferred import. */
string library_uri = 1;
/** The name of the library, or "<unnamed>" if it is unnamed. */
string library_name = 2;
/** The individual deferred imports within the library. */
repeated DeferredImportPB imports = 3;
}