objdiff-wasm 2.0.0-beta.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/main.d.ts +993 -0
- package/dist/main.js +1955 -0
- package/dist/main.js.map +1 -0
- package/dist/objdiff_core_bg.wasm +0 -0
- package/dist/worker.d.ts +34 -0
- package/dist/worker.js +401 -0
- package/dist/worker.js.map +1 -0
- package/package.json +39 -0
package/dist/main.js
ADDED
|
@@ -0,0 +1,1955 @@
|
|
|
1
|
+
// gen/diff_pb.ts
|
|
2
|
+
import { WireType } from "@protobuf-ts/runtime";
|
|
3
|
+
import { UnknownFieldHandler } from "@protobuf-ts/runtime";
|
|
4
|
+
import { reflectionMergePartial } from "@protobuf-ts/runtime";
|
|
5
|
+
import { MessageType } from "@protobuf-ts/runtime";
|
|
6
|
+
var SymbolFlag = /* @__PURE__ */ ((SymbolFlag2) => {
|
|
7
|
+
SymbolFlag2[SymbolFlag2["SYMBOL_NONE"] = 0] = "SYMBOL_NONE";
|
|
8
|
+
SymbolFlag2[SymbolFlag2["SYMBOL_GLOBAL"] = 1] = "SYMBOL_GLOBAL";
|
|
9
|
+
SymbolFlag2[SymbolFlag2["SYMBOL_LOCAL"] = 2] = "SYMBOL_LOCAL";
|
|
10
|
+
SymbolFlag2[SymbolFlag2["SYMBOL_WEAK"] = 3] = "SYMBOL_WEAK";
|
|
11
|
+
SymbolFlag2[SymbolFlag2["SYMBOL_COMMON"] = 4] = "SYMBOL_COMMON";
|
|
12
|
+
SymbolFlag2[SymbolFlag2["SYMBOL_HIDDEN"] = 5] = "SYMBOL_HIDDEN";
|
|
13
|
+
return SymbolFlag2;
|
|
14
|
+
})(SymbolFlag || {});
|
|
15
|
+
var DiffKind = /* @__PURE__ */ ((DiffKind2) => {
|
|
16
|
+
DiffKind2[DiffKind2["DIFF_NONE"] = 0] = "DIFF_NONE";
|
|
17
|
+
DiffKind2[DiffKind2["DIFF_REPLACE"] = 1] = "DIFF_REPLACE";
|
|
18
|
+
DiffKind2[DiffKind2["DIFF_DELETE"] = 2] = "DIFF_DELETE";
|
|
19
|
+
DiffKind2[DiffKind2["DIFF_INSERT"] = 3] = "DIFF_INSERT";
|
|
20
|
+
DiffKind2[DiffKind2["DIFF_OP_MISMATCH"] = 4] = "DIFF_OP_MISMATCH";
|
|
21
|
+
DiffKind2[DiffKind2["DIFF_ARG_MISMATCH"] = 5] = "DIFF_ARG_MISMATCH";
|
|
22
|
+
return DiffKind2;
|
|
23
|
+
})(DiffKind || {});
|
|
24
|
+
var SectionKind = /* @__PURE__ */ ((SectionKind2) => {
|
|
25
|
+
SectionKind2[SectionKind2["SECTION_UNKNOWN"] = 0] = "SECTION_UNKNOWN";
|
|
26
|
+
SectionKind2[SectionKind2["SECTION_TEXT"] = 1] = "SECTION_TEXT";
|
|
27
|
+
SectionKind2[SectionKind2["SECTION_DATA"] = 2] = "SECTION_DATA";
|
|
28
|
+
SectionKind2[SectionKind2["SECTION_BSS"] = 3] = "SECTION_BSS";
|
|
29
|
+
SectionKind2[SectionKind2["SECTION_COMMON"] = 4] = "SECTION_COMMON";
|
|
30
|
+
return SectionKind2;
|
|
31
|
+
})(SectionKind || {});
|
|
32
|
+
var Symbol$Type = class extends MessageType {
|
|
33
|
+
constructor() {
|
|
34
|
+
super("objdiff.diff.Symbol", [
|
|
35
|
+
{
|
|
36
|
+
no: 1,
|
|
37
|
+
name: "name",
|
|
38
|
+
kind: "scalar",
|
|
39
|
+
T: 9
|
|
40
|
+
/*ScalarType.STRING*/
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
no: 2,
|
|
44
|
+
name: "demangled_name",
|
|
45
|
+
kind: "scalar",
|
|
46
|
+
localName: "demangled_name",
|
|
47
|
+
opt: true,
|
|
48
|
+
T: 9
|
|
49
|
+
/*ScalarType.STRING*/
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
no: 3,
|
|
53
|
+
name: "address",
|
|
54
|
+
kind: "scalar",
|
|
55
|
+
T: 4,
|
|
56
|
+
L: 0
|
|
57
|
+
/*LongType.BIGINT*/
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
no: 4,
|
|
61
|
+
name: "size",
|
|
62
|
+
kind: "scalar",
|
|
63
|
+
T: 4,
|
|
64
|
+
L: 0
|
|
65
|
+
/*LongType.BIGINT*/
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
no: 5,
|
|
69
|
+
name: "flags",
|
|
70
|
+
kind: "scalar",
|
|
71
|
+
T: 13
|
|
72
|
+
/*ScalarType.UINT32*/
|
|
73
|
+
}
|
|
74
|
+
]);
|
|
75
|
+
}
|
|
76
|
+
create(value) {
|
|
77
|
+
const message = globalThis.Object.create(this.messagePrototype);
|
|
78
|
+
message.name = "";
|
|
79
|
+
message.address = 0n;
|
|
80
|
+
message.size = 0n;
|
|
81
|
+
message.flags = 0;
|
|
82
|
+
if (value !== void 0)
|
|
83
|
+
reflectionMergePartial(this, message, value);
|
|
84
|
+
return message;
|
|
85
|
+
}
|
|
86
|
+
internalBinaryRead(reader, length, options, target) {
|
|
87
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
88
|
+
while (reader.pos < end) {
|
|
89
|
+
let [fieldNo, wireType] = reader.tag();
|
|
90
|
+
switch (fieldNo) {
|
|
91
|
+
case /* string name */
|
|
92
|
+
1:
|
|
93
|
+
message.name = reader.string();
|
|
94
|
+
break;
|
|
95
|
+
case /* optional string demangled_name */
|
|
96
|
+
2:
|
|
97
|
+
message.demangled_name = reader.string();
|
|
98
|
+
break;
|
|
99
|
+
case /* uint64 address */
|
|
100
|
+
3:
|
|
101
|
+
message.address = reader.uint64().toBigInt();
|
|
102
|
+
break;
|
|
103
|
+
case /* uint64 size */
|
|
104
|
+
4:
|
|
105
|
+
message.size = reader.uint64().toBigInt();
|
|
106
|
+
break;
|
|
107
|
+
case /* uint32 flags */
|
|
108
|
+
5:
|
|
109
|
+
message.flags = reader.uint32();
|
|
110
|
+
break;
|
|
111
|
+
default:
|
|
112
|
+
let u = options.readUnknownField;
|
|
113
|
+
if (u === "throw")
|
|
114
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
115
|
+
let d = reader.skip(wireType);
|
|
116
|
+
if (u !== false)
|
|
117
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
return message;
|
|
121
|
+
}
|
|
122
|
+
internalBinaryWrite(message, writer, options) {
|
|
123
|
+
if (message.name !== "")
|
|
124
|
+
writer.tag(1, WireType.LengthDelimited).string(message.name);
|
|
125
|
+
if (message.demangled_name !== void 0)
|
|
126
|
+
writer.tag(2, WireType.LengthDelimited).string(message.demangled_name);
|
|
127
|
+
if (message.address !== 0n)
|
|
128
|
+
writer.tag(3, WireType.Varint).uint64(message.address);
|
|
129
|
+
if (message.size !== 0n)
|
|
130
|
+
writer.tag(4, WireType.Varint).uint64(message.size);
|
|
131
|
+
if (message.flags !== 0)
|
|
132
|
+
writer.tag(5, WireType.Varint).uint32(message.flags);
|
|
133
|
+
let u = options.writeUnknownFields;
|
|
134
|
+
if (u !== false)
|
|
135
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
136
|
+
return writer;
|
|
137
|
+
}
|
|
138
|
+
};
|
|
139
|
+
var Symbol = new Symbol$Type();
|
|
140
|
+
var Instruction$Type = class extends MessageType {
|
|
141
|
+
constructor() {
|
|
142
|
+
super("objdiff.diff.Instruction", [
|
|
143
|
+
{
|
|
144
|
+
no: 1,
|
|
145
|
+
name: "address",
|
|
146
|
+
kind: "scalar",
|
|
147
|
+
T: 4,
|
|
148
|
+
L: 0
|
|
149
|
+
/*LongType.BIGINT*/
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
no: 2,
|
|
153
|
+
name: "size",
|
|
154
|
+
kind: "scalar",
|
|
155
|
+
T: 13
|
|
156
|
+
/*ScalarType.UINT32*/
|
|
157
|
+
},
|
|
158
|
+
{
|
|
159
|
+
no: 3,
|
|
160
|
+
name: "opcode",
|
|
161
|
+
kind: "scalar",
|
|
162
|
+
T: 13
|
|
163
|
+
/*ScalarType.UINT32*/
|
|
164
|
+
},
|
|
165
|
+
{
|
|
166
|
+
no: 4,
|
|
167
|
+
name: "mnemonic",
|
|
168
|
+
kind: "scalar",
|
|
169
|
+
T: 9
|
|
170
|
+
/*ScalarType.STRING*/
|
|
171
|
+
},
|
|
172
|
+
{
|
|
173
|
+
no: 5,
|
|
174
|
+
name: "formatted",
|
|
175
|
+
kind: "scalar",
|
|
176
|
+
T: 9
|
|
177
|
+
/*ScalarType.STRING*/
|
|
178
|
+
},
|
|
179
|
+
{
|
|
180
|
+
no: 6,
|
|
181
|
+
name: "original",
|
|
182
|
+
kind: "scalar",
|
|
183
|
+
opt: true,
|
|
184
|
+
T: 9
|
|
185
|
+
/*ScalarType.STRING*/
|
|
186
|
+
},
|
|
187
|
+
{ no: 7, name: "arguments", kind: "message", repeat: 1, T: () => Argument },
|
|
188
|
+
{ no: 8, name: "relocation", kind: "message", T: () => Relocation },
|
|
189
|
+
{
|
|
190
|
+
no: 9,
|
|
191
|
+
name: "branch_dest",
|
|
192
|
+
kind: "scalar",
|
|
193
|
+
localName: "branch_dest",
|
|
194
|
+
opt: true,
|
|
195
|
+
T: 4,
|
|
196
|
+
L: 0
|
|
197
|
+
/*LongType.BIGINT*/
|
|
198
|
+
},
|
|
199
|
+
{
|
|
200
|
+
no: 10,
|
|
201
|
+
name: "line_number",
|
|
202
|
+
kind: "scalar",
|
|
203
|
+
localName: "line_number",
|
|
204
|
+
opt: true,
|
|
205
|
+
T: 13
|
|
206
|
+
/*ScalarType.UINT32*/
|
|
207
|
+
}
|
|
208
|
+
]);
|
|
209
|
+
}
|
|
210
|
+
create(value) {
|
|
211
|
+
const message = globalThis.Object.create(this.messagePrototype);
|
|
212
|
+
message.address = 0n;
|
|
213
|
+
message.size = 0;
|
|
214
|
+
message.opcode = 0;
|
|
215
|
+
message.mnemonic = "";
|
|
216
|
+
message.formatted = "";
|
|
217
|
+
message.arguments = [];
|
|
218
|
+
if (value !== void 0)
|
|
219
|
+
reflectionMergePartial(this, message, value);
|
|
220
|
+
return message;
|
|
221
|
+
}
|
|
222
|
+
internalBinaryRead(reader, length, options, target) {
|
|
223
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
224
|
+
while (reader.pos < end) {
|
|
225
|
+
let [fieldNo, wireType] = reader.tag();
|
|
226
|
+
switch (fieldNo) {
|
|
227
|
+
case /* uint64 address */
|
|
228
|
+
1:
|
|
229
|
+
message.address = reader.uint64().toBigInt();
|
|
230
|
+
break;
|
|
231
|
+
case /* uint32 size */
|
|
232
|
+
2:
|
|
233
|
+
message.size = reader.uint32();
|
|
234
|
+
break;
|
|
235
|
+
case /* uint32 opcode */
|
|
236
|
+
3:
|
|
237
|
+
message.opcode = reader.uint32();
|
|
238
|
+
break;
|
|
239
|
+
case /* string mnemonic */
|
|
240
|
+
4:
|
|
241
|
+
message.mnemonic = reader.string();
|
|
242
|
+
break;
|
|
243
|
+
case /* string formatted */
|
|
244
|
+
5:
|
|
245
|
+
message.formatted = reader.string();
|
|
246
|
+
break;
|
|
247
|
+
case /* optional string original */
|
|
248
|
+
6:
|
|
249
|
+
message.original = reader.string();
|
|
250
|
+
break;
|
|
251
|
+
case /* repeated objdiff.diff.Argument arguments */
|
|
252
|
+
7:
|
|
253
|
+
message.arguments.push(Argument.internalBinaryRead(reader, reader.uint32(), options));
|
|
254
|
+
break;
|
|
255
|
+
case /* optional objdiff.diff.Relocation relocation */
|
|
256
|
+
8:
|
|
257
|
+
message.relocation = Relocation.internalBinaryRead(reader, reader.uint32(), options, message.relocation);
|
|
258
|
+
break;
|
|
259
|
+
case /* optional uint64 branch_dest */
|
|
260
|
+
9:
|
|
261
|
+
message.branch_dest = reader.uint64().toBigInt();
|
|
262
|
+
break;
|
|
263
|
+
case /* optional uint32 line_number */
|
|
264
|
+
10:
|
|
265
|
+
message.line_number = reader.uint32();
|
|
266
|
+
break;
|
|
267
|
+
default:
|
|
268
|
+
let u = options.readUnknownField;
|
|
269
|
+
if (u === "throw")
|
|
270
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
271
|
+
let d = reader.skip(wireType);
|
|
272
|
+
if (u !== false)
|
|
273
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
return message;
|
|
277
|
+
}
|
|
278
|
+
internalBinaryWrite(message, writer, options) {
|
|
279
|
+
if (message.address !== 0n)
|
|
280
|
+
writer.tag(1, WireType.Varint).uint64(message.address);
|
|
281
|
+
if (message.size !== 0)
|
|
282
|
+
writer.tag(2, WireType.Varint).uint32(message.size);
|
|
283
|
+
if (message.opcode !== 0)
|
|
284
|
+
writer.tag(3, WireType.Varint).uint32(message.opcode);
|
|
285
|
+
if (message.mnemonic !== "")
|
|
286
|
+
writer.tag(4, WireType.LengthDelimited).string(message.mnemonic);
|
|
287
|
+
if (message.formatted !== "")
|
|
288
|
+
writer.tag(5, WireType.LengthDelimited).string(message.formatted);
|
|
289
|
+
if (message.original !== void 0)
|
|
290
|
+
writer.tag(6, WireType.LengthDelimited).string(message.original);
|
|
291
|
+
for (let i = 0; i < message.arguments.length; i++)
|
|
292
|
+
Argument.internalBinaryWrite(message.arguments[i], writer.tag(7, WireType.LengthDelimited).fork(), options).join();
|
|
293
|
+
if (message.relocation)
|
|
294
|
+
Relocation.internalBinaryWrite(message.relocation, writer.tag(8, WireType.LengthDelimited).fork(), options).join();
|
|
295
|
+
if (message.branch_dest !== void 0)
|
|
296
|
+
writer.tag(9, WireType.Varint).uint64(message.branch_dest);
|
|
297
|
+
if (message.line_number !== void 0)
|
|
298
|
+
writer.tag(10, WireType.Varint).uint32(message.line_number);
|
|
299
|
+
let u = options.writeUnknownFields;
|
|
300
|
+
if (u !== false)
|
|
301
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
302
|
+
return writer;
|
|
303
|
+
}
|
|
304
|
+
};
|
|
305
|
+
var Instruction = new Instruction$Type();
|
|
306
|
+
var Argument$Type = class extends MessageType {
|
|
307
|
+
constructor() {
|
|
308
|
+
super("objdiff.diff.Argument", [
|
|
309
|
+
{
|
|
310
|
+
no: 1,
|
|
311
|
+
name: "plain_text",
|
|
312
|
+
kind: "scalar",
|
|
313
|
+
localName: "plain_text",
|
|
314
|
+
oneof: "value",
|
|
315
|
+
T: 9
|
|
316
|
+
/*ScalarType.STRING*/
|
|
317
|
+
},
|
|
318
|
+
{ no: 2, name: "argument", kind: "message", oneof: "value", T: () => ArgumentValue },
|
|
319
|
+
{ no: 3, name: "relocation", kind: "message", oneof: "value", T: () => ArgumentRelocation },
|
|
320
|
+
{
|
|
321
|
+
no: 4,
|
|
322
|
+
name: "branch_dest",
|
|
323
|
+
kind: "scalar",
|
|
324
|
+
localName: "branch_dest",
|
|
325
|
+
oneof: "value",
|
|
326
|
+
T: 4,
|
|
327
|
+
L: 0
|
|
328
|
+
/*LongType.BIGINT*/
|
|
329
|
+
}
|
|
330
|
+
]);
|
|
331
|
+
}
|
|
332
|
+
create(value) {
|
|
333
|
+
const message = globalThis.Object.create(this.messagePrototype);
|
|
334
|
+
message.value = { oneofKind: void 0 };
|
|
335
|
+
if (value !== void 0)
|
|
336
|
+
reflectionMergePartial(this, message, value);
|
|
337
|
+
return message;
|
|
338
|
+
}
|
|
339
|
+
internalBinaryRead(reader, length, options, target) {
|
|
340
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
341
|
+
while (reader.pos < end) {
|
|
342
|
+
let [fieldNo, wireType] = reader.tag();
|
|
343
|
+
switch (fieldNo) {
|
|
344
|
+
case /* string plain_text */
|
|
345
|
+
1:
|
|
346
|
+
message.value = {
|
|
347
|
+
oneofKind: "plain_text",
|
|
348
|
+
plain_text: reader.string()
|
|
349
|
+
};
|
|
350
|
+
break;
|
|
351
|
+
case /* objdiff.diff.ArgumentValue argument */
|
|
352
|
+
2:
|
|
353
|
+
message.value = {
|
|
354
|
+
oneofKind: "argument",
|
|
355
|
+
argument: ArgumentValue.internalBinaryRead(reader, reader.uint32(), options, message.value.argument)
|
|
356
|
+
};
|
|
357
|
+
break;
|
|
358
|
+
case /* objdiff.diff.ArgumentRelocation relocation */
|
|
359
|
+
3:
|
|
360
|
+
message.value = {
|
|
361
|
+
oneofKind: "relocation",
|
|
362
|
+
relocation: ArgumentRelocation.internalBinaryRead(reader, reader.uint32(), options, message.value.relocation)
|
|
363
|
+
};
|
|
364
|
+
break;
|
|
365
|
+
case /* uint64 branch_dest */
|
|
366
|
+
4:
|
|
367
|
+
message.value = {
|
|
368
|
+
oneofKind: "branch_dest",
|
|
369
|
+
branch_dest: reader.uint64().toBigInt()
|
|
370
|
+
};
|
|
371
|
+
break;
|
|
372
|
+
default:
|
|
373
|
+
let u = options.readUnknownField;
|
|
374
|
+
if (u === "throw")
|
|
375
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
376
|
+
let d = reader.skip(wireType);
|
|
377
|
+
if (u !== false)
|
|
378
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
379
|
+
}
|
|
380
|
+
}
|
|
381
|
+
return message;
|
|
382
|
+
}
|
|
383
|
+
internalBinaryWrite(message, writer, options) {
|
|
384
|
+
if (message.value.oneofKind === "plain_text")
|
|
385
|
+
writer.tag(1, WireType.LengthDelimited).string(message.value.plain_text);
|
|
386
|
+
if (message.value.oneofKind === "argument")
|
|
387
|
+
ArgumentValue.internalBinaryWrite(message.value.argument, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
|
|
388
|
+
if (message.value.oneofKind === "relocation")
|
|
389
|
+
ArgumentRelocation.internalBinaryWrite(message.value.relocation, writer.tag(3, WireType.LengthDelimited).fork(), options).join();
|
|
390
|
+
if (message.value.oneofKind === "branch_dest")
|
|
391
|
+
writer.tag(4, WireType.Varint).uint64(message.value.branch_dest);
|
|
392
|
+
let u = options.writeUnknownFields;
|
|
393
|
+
if (u !== false)
|
|
394
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
395
|
+
return writer;
|
|
396
|
+
}
|
|
397
|
+
};
|
|
398
|
+
var Argument = new Argument$Type();
|
|
399
|
+
var ArgumentValue$Type = class extends MessageType {
|
|
400
|
+
constructor() {
|
|
401
|
+
super("objdiff.diff.ArgumentValue", [
|
|
402
|
+
{
|
|
403
|
+
no: 1,
|
|
404
|
+
name: "signed",
|
|
405
|
+
kind: "scalar",
|
|
406
|
+
oneof: "value",
|
|
407
|
+
T: 3,
|
|
408
|
+
L: 0
|
|
409
|
+
/*LongType.BIGINT*/
|
|
410
|
+
},
|
|
411
|
+
{
|
|
412
|
+
no: 2,
|
|
413
|
+
name: "unsigned",
|
|
414
|
+
kind: "scalar",
|
|
415
|
+
oneof: "value",
|
|
416
|
+
T: 4,
|
|
417
|
+
L: 0
|
|
418
|
+
/*LongType.BIGINT*/
|
|
419
|
+
},
|
|
420
|
+
{
|
|
421
|
+
no: 3,
|
|
422
|
+
name: "opaque",
|
|
423
|
+
kind: "scalar",
|
|
424
|
+
oneof: "value",
|
|
425
|
+
T: 9
|
|
426
|
+
/*ScalarType.STRING*/
|
|
427
|
+
}
|
|
428
|
+
]);
|
|
429
|
+
}
|
|
430
|
+
create(value) {
|
|
431
|
+
const message = globalThis.Object.create(this.messagePrototype);
|
|
432
|
+
message.value = { oneofKind: void 0 };
|
|
433
|
+
if (value !== void 0)
|
|
434
|
+
reflectionMergePartial(this, message, value);
|
|
435
|
+
return message;
|
|
436
|
+
}
|
|
437
|
+
internalBinaryRead(reader, length, options, target) {
|
|
438
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
439
|
+
while (reader.pos < end) {
|
|
440
|
+
let [fieldNo, wireType] = reader.tag();
|
|
441
|
+
switch (fieldNo) {
|
|
442
|
+
case /* int64 signed */
|
|
443
|
+
1:
|
|
444
|
+
message.value = {
|
|
445
|
+
oneofKind: "signed",
|
|
446
|
+
signed: reader.int64().toBigInt()
|
|
447
|
+
};
|
|
448
|
+
break;
|
|
449
|
+
case /* uint64 unsigned */
|
|
450
|
+
2:
|
|
451
|
+
message.value = {
|
|
452
|
+
oneofKind: "unsigned",
|
|
453
|
+
unsigned: reader.uint64().toBigInt()
|
|
454
|
+
};
|
|
455
|
+
break;
|
|
456
|
+
case /* string opaque */
|
|
457
|
+
3:
|
|
458
|
+
message.value = {
|
|
459
|
+
oneofKind: "opaque",
|
|
460
|
+
opaque: reader.string()
|
|
461
|
+
};
|
|
462
|
+
break;
|
|
463
|
+
default:
|
|
464
|
+
let u = options.readUnknownField;
|
|
465
|
+
if (u === "throw")
|
|
466
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
467
|
+
let d = reader.skip(wireType);
|
|
468
|
+
if (u !== false)
|
|
469
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
470
|
+
}
|
|
471
|
+
}
|
|
472
|
+
return message;
|
|
473
|
+
}
|
|
474
|
+
internalBinaryWrite(message, writer, options) {
|
|
475
|
+
if (message.value.oneofKind === "signed")
|
|
476
|
+
writer.tag(1, WireType.Varint).int64(message.value.signed);
|
|
477
|
+
if (message.value.oneofKind === "unsigned")
|
|
478
|
+
writer.tag(2, WireType.Varint).uint64(message.value.unsigned);
|
|
479
|
+
if (message.value.oneofKind === "opaque")
|
|
480
|
+
writer.tag(3, WireType.LengthDelimited).string(message.value.opaque);
|
|
481
|
+
let u = options.writeUnknownFields;
|
|
482
|
+
if (u !== false)
|
|
483
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
484
|
+
return writer;
|
|
485
|
+
}
|
|
486
|
+
};
|
|
487
|
+
var ArgumentValue = new ArgumentValue$Type();
|
|
488
|
+
var ArgumentRelocation$Type = class extends MessageType {
|
|
489
|
+
constructor() {
|
|
490
|
+
super("objdiff.diff.ArgumentRelocation", []);
|
|
491
|
+
}
|
|
492
|
+
create(value) {
|
|
493
|
+
const message = globalThis.Object.create(this.messagePrototype);
|
|
494
|
+
if (value !== void 0)
|
|
495
|
+
reflectionMergePartial(this, message, value);
|
|
496
|
+
return message;
|
|
497
|
+
}
|
|
498
|
+
internalBinaryRead(reader, length, options, target) {
|
|
499
|
+
return target ?? this.create();
|
|
500
|
+
}
|
|
501
|
+
internalBinaryWrite(message, writer, options) {
|
|
502
|
+
let u = options.writeUnknownFields;
|
|
503
|
+
if (u !== false)
|
|
504
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
505
|
+
return writer;
|
|
506
|
+
}
|
|
507
|
+
};
|
|
508
|
+
var ArgumentRelocation = new ArgumentRelocation$Type();
|
|
509
|
+
var Relocation$Type = class extends MessageType {
|
|
510
|
+
constructor() {
|
|
511
|
+
super("objdiff.diff.Relocation", [
|
|
512
|
+
{
|
|
513
|
+
no: 1,
|
|
514
|
+
name: "type",
|
|
515
|
+
kind: "scalar",
|
|
516
|
+
T: 13
|
|
517
|
+
/*ScalarType.UINT32*/
|
|
518
|
+
},
|
|
519
|
+
{
|
|
520
|
+
no: 2,
|
|
521
|
+
name: "type_name",
|
|
522
|
+
kind: "scalar",
|
|
523
|
+
localName: "type_name",
|
|
524
|
+
T: 9
|
|
525
|
+
/*ScalarType.STRING*/
|
|
526
|
+
},
|
|
527
|
+
{ no: 3, name: "target", kind: "message", T: () => RelocationTarget }
|
|
528
|
+
]);
|
|
529
|
+
}
|
|
530
|
+
create(value) {
|
|
531
|
+
const message = globalThis.Object.create(this.messagePrototype);
|
|
532
|
+
message.type = 0;
|
|
533
|
+
message.type_name = "";
|
|
534
|
+
if (value !== void 0)
|
|
535
|
+
reflectionMergePartial(this, message, value);
|
|
536
|
+
return message;
|
|
537
|
+
}
|
|
538
|
+
internalBinaryRead(reader, length, options, target) {
|
|
539
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
540
|
+
while (reader.pos < end) {
|
|
541
|
+
let [fieldNo, wireType] = reader.tag();
|
|
542
|
+
switch (fieldNo) {
|
|
543
|
+
case /* uint32 type */
|
|
544
|
+
1:
|
|
545
|
+
message.type = reader.uint32();
|
|
546
|
+
break;
|
|
547
|
+
case /* string type_name */
|
|
548
|
+
2:
|
|
549
|
+
message.type_name = reader.string();
|
|
550
|
+
break;
|
|
551
|
+
case /* objdiff.diff.RelocationTarget target */
|
|
552
|
+
3:
|
|
553
|
+
message.target = RelocationTarget.internalBinaryRead(reader, reader.uint32(), options, message.target);
|
|
554
|
+
break;
|
|
555
|
+
default:
|
|
556
|
+
let u = options.readUnknownField;
|
|
557
|
+
if (u === "throw")
|
|
558
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
559
|
+
let d = reader.skip(wireType);
|
|
560
|
+
if (u !== false)
|
|
561
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
562
|
+
}
|
|
563
|
+
}
|
|
564
|
+
return message;
|
|
565
|
+
}
|
|
566
|
+
internalBinaryWrite(message, writer, options) {
|
|
567
|
+
if (message.type !== 0)
|
|
568
|
+
writer.tag(1, WireType.Varint).uint32(message.type);
|
|
569
|
+
if (message.type_name !== "")
|
|
570
|
+
writer.tag(2, WireType.LengthDelimited).string(message.type_name);
|
|
571
|
+
if (message.target)
|
|
572
|
+
RelocationTarget.internalBinaryWrite(message.target, writer.tag(3, WireType.LengthDelimited).fork(), options).join();
|
|
573
|
+
let u = options.writeUnknownFields;
|
|
574
|
+
if (u !== false)
|
|
575
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
576
|
+
return writer;
|
|
577
|
+
}
|
|
578
|
+
};
|
|
579
|
+
var Relocation = new Relocation$Type();
|
|
580
|
+
var RelocationTarget$Type = class extends MessageType {
|
|
581
|
+
constructor() {
|
|
582
|
+
super("objdiff.diff.RelocationTarget", [
|
|
583
|
+
{ no: 1, name: "symbol", kind: "message", T: () => Symbol },
|
|
584
|
+
{
|
|
585
|
+
no: 2,
|
|
586
|
+
name: "addend",
|
|
587
|
+
kind: "scalar",
|
|
588
|
+
T: 3,
|
|
589
|
+
L: 0
|
|
590
|
+
/*LongType.BIGINT*/
|
|
591
|
+
}
|
|
592
|
+
]);
|
|
593
|
+
}
|
|
594
|
+
create(value) {
|
|
595
|
+
const message = globalThis.Object.create(this.messagePrototype);
|
|
596
|
+
message.addend = 0n;
|
|
597
|
+
if (value !== void 0)
|
|
598
|
+
reflectionMergePartial(this, message, value);
|
|
599
|
+
return message;
|
|
600
|
+
}
|
|
601
|
+
internalBinaryRead(reader, length, options, target) {
|
|
602
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
603
|
+
while (reader.pos < end) {
|
|
604
|
+
let [fieldNo, wireType] = reader.tag();
|
|
605
|
+
switch (fieldNo) {
|
|
606
|
+
case /* objdiff.diff.Symbol symbol */
|
|
607
|
+
1:
|
|
608
|
+
message.symbol = Symbol.internalBinaryRead(reader, reader.uint32(), options, message.symbol);
|
|
609
|
+
break;
|
|
610
|
+
case /* int64 addend */
|
|
611
|
+
2:
|
|
612
|
+
message.addend = reader.int64().toBigInt();
|
|
613
|
+
break;
|
|
614
|
+
default:
|
|
615
|
+
let u = options.readUnknownField;
|
|
616
|
+
if (u === "throw")
|
|
617
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
618
|
+
let d = reader.skip(wireType);
|
|
619
|
+
if (u !== false)
|
|
620
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
621
|
+
}
|
|
622
|
+
}
|
|
623
|
+
return message;
|
|
624
|
+
}
|
|
625
|
+
internalBinaryWrite(message, writer, options) {
|
|
626
|
+
if (message.symbol)
|
|
627
|
+
Symbol.internalBinaryWrite(message.symbol, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
|
|
628
|
+
if (message.addend !== 0n)
|
|
629
|
+
writer.tag(2, WireType.Varint).int64(message.addend);
|
|
630
|
+
let u = options.writeUnknownFields;
|
|
631
|
+
if (u !== false)
|
|
632
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
633
|
+
return writer;
|
|
634
|
+
}
|
|
635
|
+
};
|
|
636
|
+
var RelocationTarget = new RelocationTarget$Type();
|
|
637
|
+
var InstructionDiff$Type = class extends MessageType {
|
|
638
|
+
constructor() {
|
|
639
|
+
super("objdiff.diff.InstructionDiff", [
|
|
640
|
+
{ no: 1, name: "diff_kind", kind: "enum", localName: "diff_kind", T: () => ["objdiff.diff.DiffKind", DiffKind] },
|
|
641
|
+
{ no: 2, name: "instruction", kind: "message", T: () => Instruction },
|
|
642
|
+
{ no: 3, name: "branch_from", kind: "message", localName: "branch_from", T: () => InstructionBranchFrom },
|
|
643
|
+
{ no: 4, name: "branch_to", kind: "message", localName: "branch_to", T: () => InstructionBranchTo },
|
|
644
|
+
{ no: 5, name: "display", kind: "message", repeat: 1, T: () => DiffDisplay }
|
|
645
|
+
]);
|
|
646
|
+
}
|
|
647
|
+
create(value) {
|
|
648
|
+
const message = globalThis.Object.create(this.messagePrototype);
|
|
649
|
+
message.diff_kind = 0;
|
|
650
|
+
message.display = [];
|
|
651
|
+
if (value !== void 0)
|
|
652
|
+
reflectionMergePartial(this, message, value);
|
|
653
|
+
return message;
|
|
654
|
+
}
|
|
655
|
+
internalBinaryRead(reader, length, options, target) {
|
|
656
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
657
|
+
while (reader.pos < end) {
|
|
658
|
+
let [fieldNo, wireType] = reader.tag();
|
|
659
|
+
switch (fieldNo) {
|
|
660
|
+
case /* objdiff.diff.DiffKind diff_kind */
|
|
661
|
+
1:
|
|
662
|
+
message.diff_kind = reader.int32();
|
|
663
|
+
break;
|
|
664
|
+
case /* optional objdiff.diff.Instruction instruction */
|
|
665
|
+
2:
|
|
666
|
+
message.instruction = Instruction.internalBinaryRead(reader, reader.uint32(), options, message.instruction);
|
|
667
|
+
break;
|
|
668
|
+
case /* optional objdiff.diff.InstructionBranchFrom branch_from */
|
|
669
|
+
3:
|
|
670
|
+
message.branch_from = InstructionBranchFrom.internalBinaryRead(reader, reader.uint32(), options, message.branch_from);
|
|
671
|
+
break;
|
|
672
|
+
case /* optional objdiff.diff.InstructionBranchTo branch_to */
|
|
673
|
+
4:
|
|
674
|
+
message.branch_to = InstructionBranchTo.internalBinaryRead(reader, reader.uint32(), options, message.branch_to);
|
|
675
|
+
break;
|
|
676
|
+
case /* repeated objdiff.diff.DiffDisplay display */
|
|
677
|
+
5:
|
|
678
|
+
message.display.push(DiffDisplay.internalBinaryRead(reader, reader.uint32(), options));
|
|
679
|
+
break;
|
|
680
|
+
default:
|
|
681
|
+
let u = options.readUnknownField;
|
|
682
|
+
if (u === "throw")
|
|
683
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
684
|
+
let d = reader.skip(wireType);
|
|
685
|
+
if (u !== false)
|
|
686
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
687
|
+
}
|
|
688
|
+
}
|
|
689
|
+
return message;
|
|
690
|
+
}
|
|
691
|
+
internalBinaryWrite(message, writer, options) {
|
|
692
|
+
if (message.diff_kind !== 0)
|
|
693
|
+
writer.tag(1, WireType.Varint).int32(message.diff_kind);
|
|
694
|
+
if (message.instruction)
|
|
695
|
+
Instruction.internalBinaryWrite(message.instruction, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
|
|
696
|
+
if (message.branch_from)
|
|
697
|
+
InstructionBranchFrom.internalBinaryWrite(message.branch_from, writer.tag(3, WireType.LengthDelimited).fork(), options).join();
|
|
698
|
+
if (message.branch_to)
|
|
699
|
+
InstructionBranchTo.internalBinaryWrite(message.branch_to, writer.tag(4, WireType.LengthDelimited).fork(), options).join();
|
|
700
|
+
for (let i = 0; i < message.display.length; i++)
|
|
701
|
+
DiffDisplay.internalBinaryWrite(message.display[i], writer.tag(5, WireType.LengthDelimited).fork(), options).join();
|
|
702
|
+
let u = options.writeUnknownFields;
|
|
703
|
+
if (u !== false)
|
|
704
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
705
|
+
return writer;
|
|
706
|
+
}
|
|
707
|
+
};
|
|
708
|
+
var InstructionDiff = new InstructionDiff$Type();
|
|
709
|
+
var InstructionBranchFrom$Type = class extends MessageType {
|
|
710
|
+
constructor() {
|
|
711
|
+
super("objdiff.diff.InstructionBranchFrom", [
|
|
712
|
+
{
|
|
713
|
+
no: 1,
|
|
714
|
+
name: "instruction_index",
|
|
715
|
+
kind: "scalar",
|
|
716
|
+
localName: "instruction_index",
|
|
717
|
+
repeat: 1,
|
|
718
|
+
T: 13
|
|
719
|
+
/*ScalarType.UINT32*/
|
|
720
|
+
},
|
|
721
|
+
{
|
|
722
|
+
no: 2,
|
|
723
|
+
name: "branch_index",
|
|
724
|
+
kind: "scalar",
|
|
725
|
+
localName: "branch_index",
|
|
726
|
+
T: 13
|
|
727
|
+
/*ScalarType.UINT32*/
|
|
728
|
+
}
|
|
729
|
+
]);
|
|
730
|
+
}
|
|
731
|
+
create(value) {
|
|
732
|
+
const message = globalThis.Object.create(this.messagePrototype);
|
|
733
|
+
message.instruction_index = [];
|
|
734
|
+
message.branch_index = 0;
|
|
735
|
+
if (value !== void 0)
|
|
736
|
+
reflectionMergePartial(this, message, value);
|
|
737
|
+
return message;
|
|
738
|
+
}
|
|
739
|
+
internalBinaryRead(reader, length, options, target) {
|
|
740
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
741
|
+
while (reader.pos < end) {
|
|
742
|
+
let [fieldNo, wireType] = reader.tag();
|
|
743
|
+
switch (fieldNo) {
|
|
744
|
+
case /* repeated uint32 instruction_index */
|
|
745
|
+
1:
|
|
746
|
+
if (wireType === WireType.LengthDelimited)
|
|
747
|
+
for (let e = reader.int32() + reader.pos; reader.pos < e; )
|
|
748
|
+
message.instruction_index.push(reader.uint32());
|
|
749
|
+
else
|
|
750
|
+
message.instruction_index.push(reader.uint32());
|
|
751
|
+
break;
|
|
752
|
+
case /* uint32 branch_index */
|
|
753
|
+
2:
|
|
754
|
+
message.branch_index = reader.uint32();
|
|
755
|
+
break;
|
|
756
|
+
default:
|
|
757
|
+
let u = options.readUnknownField;
|
|
758
|
+
if (u === "throw")
|
|
759
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
760
|
+
let d = reader.skip(wireType);
|
|
761
|
+
if (u !== false)
|
|
762
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
763
|
+
}
|
|
764
|
+
}
|
|
765
|
+
return message;
|
|
766
|
+
}
|
|
767
|
+
internalBinaryWrite(message, writer, options) {
|
|
768
|
+
if (message.instruction_index.length) {
|
|
769
|
+
writer.tag(1, WireType.LengthDelimited).fork();
|
|
770
|
+
for (let i = 0; i < message.instruction_index.length; i++)
|
|
771
|
+
writer.uint32(message.instruction_index[i]);
|
|
772
|
+
writer.join();
|
|
773
|
+
}
|
|
774
|
+
if (message.branch_index !== 0)
|
|
775
|
+
writer.tag(2, WireType.Varint).uint32(message.branch_index);
|
|
776
|
+
let u = options.writeUnknownFields;
|
|
777
|
+
if (u !== false)
|
|
778
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
779
|
+
return writer;
|
|
780
|
+
}
|
|
781
|
+
};
|
|
782
|
+
var InstructionBranchFrom = new InstructionBranchFrom$Type();
|
|
783
|
+
var InstructionBranchTo$Type = class extends MessageType {
|
|
784
|
+
constructor() {
|
|
785
|
+
super("objdiff.diff.InstructionBranchTo", [
|
|
786
|
+
{
|
|
787
|
+
no: 1,
|
|
788
|
+
name: "instruction_index",
|
|
789
|
+
kind: "scalar",
|
|
790
|
+
localName: "instruction_index",
|
|
791
|
+
T: 13
|
|
792
|
+
/*ScalarType.UINT32*/
|
|
793
|
+
},
|
|
794
|
+
{
|
|
795
|
+
no: 2,
|
|
796
|
+
name: "branch_index",
|
|
797
|
+
kind: "scalar",
|
|
798
|
+
localName: "branch_index",
|
|
799
|
+
T: 13
|
|
800
|
+
/*ScalarType.UINT32*/
|
|
801
|
+
}
|
|
802
|
+
]);
|
|
803
|
+
}
|
|
804
|
+
create(value) {
|
|
805
|
+
const message = globalThis.Object.create(this.messagePrototype);
|
|
806
|
+
message.instruction_index = 0;
|
|
807
|
+
message.branch_index = 0;
|
|
808
|
+
if (value !== void 0)
|
|
809
|
+
reflectionMergePartial(this, message, value);
|
|
810
|
+
return message;
|
|
811
|
+
}
|
|
812
|
+
internalBinaryRead(reader, length, options, target) {
|
|
813
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
814
|
+
while (reader.pos < end) {
|
|
815
|
+
let [fieldNo, wireType] = reader.tag();
|
|
816
|
+
switch (fieldNo) {
|
|
817
|
+
case /* uint32 instruction_index */
|
|
818
|
+
1:
|
|
819
|
+
message.instruction_index = reader.uint32();
|
|
820
|
+
break;
|
|
821
|
+
case /* uint32 branch_index */
|
|
822
|
+
2:
|
|
823
|
+
message.branch_index = reader.uint32();
|
|
824
|
+
break;
|
|
825
|
+
default:
|
|
826
|
+
let u = options.readUnknownField;
|
|
827
|
+
if (u === "throw")
|
|
828
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
829
|
+
let d = reader.skip(wireType);
|
|
830
|
+
if (u !== false)
|
|
831
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
832
|
+
}
|
|
833
|
+
}
|
|
834
|
+
return message;
|
|
835
|
+
}
|
|
836
|
+
internalBinaryWrite(message, writer, options) {
|
|
837
|
+
if (message.instruction_index !== 0)
|
|
838
|
+
writer.tag(1, WireType.Varint).uint32(message.instruction_index);
|
|
839
|
+
if (message.branch_index !== 0)
|
|
840
|
+
writer.tag(2, WireType.Varint).uint32(message.branch_index);
|
|
841
|
+
let u = options.writeUnknownFields;
|
|
842
|
+
if (u !== false)
|
|
843
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
844
|
+
return writer;
|
|
845
|
+
}
|
|
846
|
+
};
|
|
847
|
+
var InstructionBranchTo = new InstructionBranchTo$Type();
|
|
848
|
+
var FunctionDiff$Type = class extends MessageType {
|
|
849
|
+
constructor() {
|
|
850
|
+
super("objdiff.diff.FunctionDiff", [
|
|
851
|
+
{ no: 1, name: "symbol", kind: "message", T: () => Symbol },
|
|
852
|
+
{ no: 2, name: "instructions", kind: "message", repeat: 1, T: () => InstructionDiff },
|
|
853
|
+
{
|
|
854
|
+
no: 3,
|
|
855
|
+
name: "match_percent",
|
|
856
|
+
kind: "scalar",
|
|
857
|
+
localName: "match_percent",
|
|
858
|
+
opt: true,
|
|
859
|
+
T: 2
|
|
860
|
+
/*ScalarType.FLOAT*/
|
|
861
|
+
}
|
|
862
|
+
]);
|
|
863
|
+
}
|
|
864
|
+
create(value) {
|
|
865
|
+
const message = globalThis.Object.create(this.messagePrototype);
|
|
866
|
+
message.instructions = [];
|
|
867
|
+
if (value !== void 0)
|
|
868
|
+
reflectionMergePartial(this, message, value);
|
|
869
|
+
return message;
|
|
870
|
+
}
|
|
871
|
+
internalBinaryRead(reader, length, options, target) {
|
|
872
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
873
|
+
while (reader.pos < end) {
|
|
874
|
+
let [fieldNo, wireType] = reader.tag();
|
|
875
|
+
switch (fieldNo) {
|
|
876
|
+
case /* objdiff.diff.Symbol symbol */
|
|
877
|
+
1:
|
|
878
|
+
message.symbol = Symbol.internalBinaryRead(reader, reader.uint32(), options, message.symbol);
|
|
879
|
+
break;
|
|
880
|
+
case /* repeated objdiff.diff.InstructionDiff instructions */
|
|
881
|
+
2:
|
|
882
|
+
message.instructions.push(InstructionDiff.internalBinaryRead(reader, reader.uint32(), options));
|
|
883
|
+
break;
|
|
884
|
+
case /* optional float match_percent */
|
|
885
|
+
3:
|
|
886
|
+
message.match_percent = reader.float();
|
|
887
|
+
break;
|
|
888
|
+
default:
|
|
889
|
+
let u = options.readUnknownField;
|
|
890
|
+
if (u === "throw")
|
|
891
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
892
|
+
let d = reader.skip(wireType);
|
|
893
|
+
if (u !== false)
|
|
894
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
895
|
+
}
|
|
896
|
+
}
|
|
897
|
+
return message;
|
|
898
|
+
}
|
|
899
|
+
internalBinaryWrite(message, writer, options) {
|
|
900
|
+
if (message.symbol)
|
|
901
|
+
Symbol.internalBinaryWrite(message.symbol, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
|
|
902
|
+
for (let i = 0; i < message.instructions.length; i++)
|
|
903
|
+
InstructionDiff.internalBinaryWrite(message.instructions[i], writer.tag(2, WireType.LengthDelimited).fork(), options).join();
|
|
904
|
+
if (message.match_percent !== void 0)
|
|
905
|
+
writer.tag(3, WireType.Bit32).float(message.match_percent);
|
|
906
|
+
let u = options.writeUnknownFields;
|
|
907
|
+
if (u !== false)
|
|
908
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
909
|
+
return writer;
|
|
910
|
+
}
|
|
911
|
+
};
|
|
912
|
+
var FunctionDiff = new FunctionDiff$Type();
|
|
913
|
+
var DataDiff$Type = class extends MessageType {
|
|
914
|
+
constructor() {
|
|
915
|
+
super("objdiff.diff.DataDiff", [
|
|
916
|
+
{ no: 1, name: "kind", kind: "enum", T: () => ["objdiff.diff.DiffKind", DiffKind] },
|
|
917
|
+
{
|
|
918
|
+
no: 2,
|
|
919
|
+
name: "data",
|
|
920
|
+
kind: "scalar",
|
|
921
|
+
T: 12
|
|
922
|
+
/*ScalarType.BYTES*/
|
|
923
|
+
},
|
|
924
|
+
{
|
|
925
|
+
no: 3,
|
|
926
|
+
name: "size",
|
|
927
|
+
kind: "scalar",
|
|
928
|
+
T: 4,
|
|
929
|
+
L: 0
|
|
930
|
+
/*LongType.BIGINT*/
|
|
931
|
+
}
|
|
932
|
+
]);
|
|
933
|
+
}
|
|
934
|
+
create(value) {
|
|
935
|
+
const message = globalThis.Object.create(this.messagePrototype);
|
|
936
|
+
message.kind = 0;
|
|
937
|
+
message.data = new Uint8Array(0);
|
|
938
|
+
message.size = 0n;
|
|
939
|
+
if (value !== void 0)
|
|
940
|
+
reflectionMergePartial(this, message, value);
|
|
941
|
+
return message;
|
|
942
|
+
}
|
|
943
|
+
internalBinaryRead(reader, length, options, target) {
|
|
944
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
945
|
+
while (reader.pos < end) {
|
|
946
|
+
let [fieldNo, wireType] = reader.tag();
|
|
947
|
+
switch (fieldNo) {
|
|
948
|
+
case /* objdiff.diff.DiffKind kind */
|
|
949
|
+
1:
|
|
950
|
+
message.kind = reader.int32();
|
|
951
|
+
break;
|
|
952
|
+
case /* bytes data */
|
|
953
|
+
2:
|
|
954
|
+
message.data = reader.bytes();
|
|
955
|
+
break;
|
|
956
|
+
case /* uint64 size */
|
|
957
|
+
3:
|
|
958
|
+
message.size = reader.uint64().toBigInt();
|
|
959
|
+
break;
|
|
960
|
+
default:
|
|
961
|
+
let u = options.readUnknownField;
|
|
962
|
+
if (u === "throw")
|
|
963
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
964
|
+
let d = reader.skip(wireType);
|
|
965
|
+
if (u !== false)
|
|
966
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
967
|
+
}
|
|
968
|
+
}
|
|
969
|
+
return message;
|
|
970
|
+
}
|
|
971
|
+
internalBinaryWrite(message, writer, options) {
|
|
972
|
+
if (message.kind !== 0)
|
|
973
|
+
writer.tag(1, WireType.Varint).int32(message.kind);
|
|
974
|
+
if (message.data.length)
|
|
975
|
+
writer.tag(2, WireType.LengthDelimited).bytes(message.data);
|
|
976
|
+
if (message.size !== 0n)
|
|
977
|
+
writer.tag(3, WireType.Varint).uint64(message.size);
|
|
978
|
+
let u = options.writeUnknownFields;
|
|
979
|
+
if (u !== false)
|
|
980
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
981
|
+
return writer;
|
|
982
|
+
}
|
|
983
|
+
};
|
|
984
|
+
var DataDiff = new DataDiff$Type();
|
|
985
|
+
var SectionDiff$Type = class extends MessageType {
|
|
986
|
+
constructor() {
|
|
987
|
+
super("objdiff.diff.SectionDiff", [
|
|
988
|
+
{
|
|
989
|
+
no: 1,
|
|
990
|
+
name: "name",
|
|
991
|
+
kind: "scalar",
|
|
992
|
+
T: 9
|
|
993
|
+
/*ScalarType.STRING*/
|
|
994
|
+
},
|
|
995
|
+
{ no: 2, name: "kind", kind: "enum", T: () => ["objdiff.diff.SectionKind", SectionKind] },
|
|
996
|
+
{
|
|
997
|
+
no: 3,
|
|
998
|
+
name: "size",
|
|
999
|
+
kind: "scalar",
|
|
1000
|
+
T: 4,
|
|
1001
|
+
L: 0
|
|
1002
|
+
/*LongType.BIGINT*/
|
|
1003
|
+
},
|
|
1004
|
+
{
|
|
1005
|
+
no: 4,
|
|
1006
|
+
name: "address",
|
|
1007
|
+
kind: "scalar",
|
|
1008
|
+
T: 4,
|
|
1009
|
+
L: 0
|
|
1010
|
+
/*LongType.BIGINT*/
|
|
1011
|
+
},
|
|
1012
|
+
{ no: 5, name: "functions", kind: "message", repeat: 1, T: () => FunctionDiff },
|
|
1013
|
+
{ no: 6, name: "data", kind: "message", repeat: 1, T: () => DataDiff },
|
|
1014
|
+
{
|
|
1015
|
+
no: 7,
|
|
1016
|
+
name: "match_percent",
|
|
1017
|
+
kind: "scalar",
|
|
1018
|
+
localName: "match_percent",
|
|
1019
|
+
opt: true,
|
|
1020
|
+
T: 2
|
|
1021
|
+
/*ScalarType.FLOAT*/
|
|
1022
|
+
}
|
|
1023
|
+
]);
|
|
1024
|
+
}
|
|
1025
|
+
create(value) {
|
|
1026
|
+
const message = globalThis.Object.create(this.messagePrototype);
|
|
1027
|
+
message.name = "";
|
|
1028
|
+
message.kind = 0;
|
|
1029
|
+
message.size = 0n;
|
|
1030
|
+
message.address = 0n;
|
|
1031
|
+
message.functions = [];
|
|
1032
|
+
message.data = [];
|
|
1033
|
+
if (value !== void 0)
|
|
1034
|
+
reflectionMergePartial(this, message, value);
|
|
1035
|
+
return message;
|
|
1036
|
+
}
|
|
1037
|
+
internalBinaryRead(reader, length, options, target) {
|
|
1038
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
1039
|
+
while (reader.pos < end) {
|
|
1040
|
+
let [fieldNo, wireType] = reader.tag();
|
|
1041
|
+
switch (fieldNo) {
|
|
1042
|
+
case /* string name */
|
|
1043
|
+
1:
|
|
1044
|
+
message.name = reader.string();
|
|
1045
|
+
break;
|
|
1046
|
+
case /* objdiff.diff.SectionKind kind */
|
|
1047
|
+
2:
|
|
1048
|
+
message.kind = reader.int32();
|
|
1049
|
+
break;
|
|
1050
|
+
case /* uint64 size */
|
|
1051
|
+
3:
|
|
1052
|
+
message.size = reader.uint64().toBigInt();
|
|
1053
|
+
break;
|
|
1054
|
+
case /* uint64 address */
|
|
1055
|
+
4:
|
|
1056
|
+
message.address = reader.uint64().toBigInt();
|
|
1057
|
+
break;
|
|
1058
|
+
case /* repeated objdiff.diff.FunctionDiff functions */
|
|
1059
|
+
5:
|
|
1060
|
+
message.functions.push(FunctionDiff.internalBinaryRead(reader, reader.uint32(), options));
|
|
1061
|
+
break;
|
|
1062
|
+
case /* repeated objdiff.diff.DataDiff data */
|
|
1063
|
+
6:
|
|
1064
|
+
message.data.push(DataDiff.internalBinaryRead(reader, reader.uint32(), options));
|
|
1065
|
+
break;
|
|
1066
|
+
case /* optional float match_percent */
|
|
1067
|
+
7:
|
|
1068
|
+
message.match_percent = reader.float();
|
|
1069
|
+
break;
|
|
1070
|
+
default:
|
|
1071
|
+
let u = options.readUnknownField;
|
|
1072
|
+
if (u === "throw")
|
|
1073
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
1074
|
+
let d = reader.skip(wireType);
|
|
1075
|
+
if (u !== false)
|
|
1076
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
1077
|
+
}
|
|
1078
|
+
}
|
|
1079
|
+
return message;
|
|
1080
|
+
}
|
|
1081
|
+
internalBinaryWrite(message, writer, options) {
|
|
1082
|
+
if (message.name !== "")
|
|
1083
|
+
writer.tag(1, WireType.LengthDelimited).string(message.name);
|
|
1084
|
+
if (message.kind !== 0)
|
|
1085
|
+
writer.tag(2, WireType.Varint).int32(message.kind);
|
|
1086
|
+
if (message.size !== 0n)
|
|
1087
|
+
writer.tag(3, WireType.Varint).uint64(message.size);
|
|
1088
|
+
if (message.address !== 0n)
|
|
1089
|
+
writer.tag(4, WireType.Varint).uint64(message.address);
|
|
1090
|
+
for (let i = 0; i < message.functions.length; i++)
|
|
1091
|
+
FunctionDiff.internalBinaryWrite(message.functions[i], writer.tag(5, WireType.LengthDelimited).fork(), options).join();
|
|
1092
|
+
for (let i = 0; i < message.data.length; i++)
|
|
1093
|
+
DataDiff.internalBinaryWrite(message.data[i], writer.tag(6, WireType.LengthDelimited).fork(), options).join();
|
|
1094
|
+
if (message.match_percent !== void 0)
|
|
1095
|
+
writer.tag(7, WireType.Bit32).float(message.match_percent);
|
|
1096
|
+
let u = options.writeUnknownFields;
|
|
1097
|
+
if (u !== false)
|
|
1098
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
1099
|
+
return writer;
|
|
1100
|
+
}
|
|
1101
|
+
};
|
|
1102
|
+
var SectionDiff = new SectionDiff$Type();
|
|
1103
|
+
var ObjectDiff$Type = class extends MessageType {
|
|
1104
|
+
constructor() {
|
|
1105
|
+
super("objdiff.diff.ObjectDiff", [
|
|
1106
|
+
{ no: 1, name: "sections", kind: "message", repeat: 1, T: () => SectionDiff }
|
|
1107
|
+
]);
|
|
1108
|
+
}
|
|
1109
|
+
create(value) {
|
|
1110
|
+
const message = globalThis.Object.create(this.messagePrototype);
|
|
1111
|
+
message.sections = [];
|
|
1112
|
+
if (value !== void 0)
|
|
1113
|
+
reflectionMergePartial(this, message, value);
|
|
1114
|
+
return message;
|
|
1115
|
+
}
|
|
1116
|
+
internalBinaryRead(reader, length, options, target) {
|
|
1117
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
1118
|
+
while (reader.pos < end) {
|
|
1119
|
+
let [fieldNo, wireType] = reader.tag();
|
|
1120
|
+
switch (fieldNo) {
|
|
1121
|
+
case /* repeated objdiff.diff.SectionDiff sections */
|
|
1122
|
+
1:
|
|
1123
|
+
message.sections.push(SectionDiff.internalBinaryRead(reader, reader.uint32(), options));
|
|
1124
|
+
break;
|
|
1125
|
+
default:
|
|
1126
|
+
let u = options.readUnknownField;
|
|
1127
|
+
if (u === "throw")
|
|
1128
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
1129
|
+
let d = reader.skip(wireType);
|
|
1130
|
+
if (u !== false)
|
|
1131
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
1132
|
+
}
|
|
1133
|
+
}
|
|
1134
|
+
return message;
|
|
1135
|
+
}
|
|
1136
|
+
internalBinaryWrite(message, writer, options) {
|
|
1137
|
+
for (let i = 0; i < message.sections.length; i++)
|
|
1138
|
+
SectionDiff.internalBinaryWrite(message.sections[i], writer.tag(1, WireType.LengthDelimited).fork(), options).join();
|
|
1139
|
+
let u = options.writeUnknownFields;
|
|
1140
|
+
if (u !== false)
|
|
1141
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
1142
|
+
return writer;
|
|
1143
|
+
}
|
|
1144
|
+
};
|
|
1145
|
+
var ObjectDiff = new ObjectDiff$Type();
|
|
1146
|
+
var DiffResult$Type = class extends MessageType {
|
|
1147
|
+
constructor() {
|
|
1148
|
+
super("objdiff.diff.DiffResult", [
|
|
1149
|
+
{ no: 1, name: "left", kind: "message", T: () => ObjectDiff },
|
|
1150
|
+
{ no: 2, name: "right", kind: "message", T: () => ObjectDiff }
|
|
1151
|
+
]);
|
|
1152
|
+
}
|
|
1153
|
+
create(value) {
|
|
1154
|
+
const message = globalThis.Object.create(this.messagePrototype);
|
|
1155
|
+
if (value !== void 0)
|
|
1156
|
+
reflectionMergePartial(this, message, value);
|
|
1157
|
+
return message;
|
|
1158
|
+
}
|
|
1159
|
+
internalBinaryRead(reader, length, options, target) {
|
|
1160
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
1161
|
+
while (reader.pos < end) {
|
|
1162
|
+
let [fieldNo, wireType] = reader.tag();
|
|
1163
|
+
switch (fieldNo) {
|
|
1164
|
+
case /* optional objdiff.diff.ObjectDiff left */
|
|
1165
|
+
1:
|
|
1166
|
+
message.left = ObjectDiff.internalBinaryRead(reader, reader.uint32(), options, message.left);
|
|
1167
|
+
break;
|
|
1168
|
+
case /* optional objdiff.diff.ObjectDiff right */
|
|
1169
|
+
2:
|
|
1170
|
+
message.right = ObjectDiff.internalBinaryRead(reader, reader.uint32(), options, message.right);
|
|
1171
|
+
break;
|
|
1172
|
+
default:
|
|
1173
|
+
let u = options.readUnknownField;
|
|
1174
|
+
if (u === "throw")
|
|
1175
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
1176
|
+
let d = reader.skip(wireType);
|
|
1177
|
+
if (u !== false)
|
|
1178
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
1179
|
+
}
|
|
1180
|
+
}
|
|
1181
|
+
return message;
|
|
1182
|
+
}
|
|
1183
|
+
internalBinaryWrite(message, writer, options) {
|
|
1184
|
+
if (message.left)
|
|
1185
|
+
ObjectDiff.internalBinaryWrite(message.left, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
|
|
1186
|
+
if (message.right)
|
|
1187
|
+
ObjectDiff.internalBinaryWrite(message.right, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
|
|
1188
|
+
let u = options.writeUnknownFields;
|
|
1189
|
+
if (u !== false)
|
|
1190
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
1191
|
+
return writer;
|
|
1192
|
+
}
|
|
1193
|
+
};
|
|
1194
|
+
var DiffResult = new DiffResult$Type();
|
|
1195
|
+
var DiffDisplay$Type = class extends MessageType {
|
|
1196
|
+
constructor() {
|
|
1197
|
+
super("objdiff.diff.DiffDisplay", [
|
|
1198
|
+
{ no: 1, name: "text", kind: "message", T: () => DiffText },
|
|
1199
|
+
{
|
|
1200
|
+
no: 2,
|
|
1201
|
+
name: "diff_index",
|
|
1202
|
+
kind: "scalar",
|
|
1203
|
+
localName: "diff_index",
|
|
1204
|
+
opt: true,
|
|
1205
|
+
T: 13
|
|
1206
|
+
/*ScalarType.UINT32*/
|
|
1207
|
+
}
|
|
1208
|
+
]);
|
|
1209
|
+
}
|
|
1210
|
+
create(value) {
|
|
1211
|
+
const message = globalThis.Object.create(this.messagePrototype);
|
|
1212
|
+
if (value !== void 0)
|
|
1213
|
+
reflectionMergePartial(this, message, value);
|
|
1214
|
+
return message;
|
|
1215
|
+
}
|
|
1216
|
+
internalBinaryRead(reader, length, options, target) {
|
|
1217
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
1218
|
+
while (reader.pos < end) {
|
|
1219
|
+
let [fieldNo, wireType] = reader.tag();
|
|
1220
|
+
switch (fieldNo) {
|
|
1221
|
+
case /* objdiff.diff.DiffText text */
|
|
1222
|
+
1:
|
|
1223
|
+
message.text = DiffText.internalBinaryRead(reader, reader.uint32(), options, message.text);
|
|
1224
|
+
break;
|
|
1225
|
+
case /* optional uint32 diff_index */
|
|
1226
|
+
2:
|
|
1227
|
+
message.diff_index = reader.uint32();
|
|
1228
|
+
break;
|
|
1229
|
+
default:
|
|
1230
|
+
let u = options.readUnknownField;
|
|
1231
|
+
if (u === "throw")
|
|
1232
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
1233
|
+
let d = reader.skip(wireType);
|
|
1234
|
+
if (u !== false)
|
|
1235
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
1236
|
+
}
|
|
1237
|
+
}
|
|
1238
|
+
return message;
|
|
1239
|
+
}
|
|
1240
|
+
internalBinaryWrite(message, writer, options) {
|
|
1241
|
+
if (message.text)
|
|
1242
|
+
DiffText.internalBinaryWrite(message.text, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
|
|
1243
|
+
if (message.diff_index !== void 0)
|
|
1244
|
+
writer.tag(2, WireType.Varint).uint32(message.diff_index);
|
|
1245
|
+
let u = options.writeUnknownFields;
|
|
1246
|
+
if (u !== false)
|
|
1247
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
1248
|
+
return writer;
|
|
1249
|
+
}
|
|
1250
|
+
};
|
|
1251
|
+
var DiffDisplay = new DiffDisplay$Type();
|
|
1252
|
+
var DiffText$Type = class extends MessageType {
|
|
1253
|
+
constructor() {
|
|
1254
|
+
super("objdiff.diff.DiffText", [
|
|
1255
|
+
{ no: 1, name: "basic", kind: "message", oneof: "text", T: () => DiffTextBasic },
|
|
1256
|
+
{ no: 2, name: "basic_color", kind: "message", localName: "basic_color", oneof: "text", T: () => DiffTextBasicColor },
|
|
1257
|
+
{ no: 3, name: "line", kind: "message", oneof: "text", T: () => DiffTextLine },
|
|
1258
|
+
{ no: 4, name: "address", kind: "message", oneof: "text", T: () => DiffTextAddress },
|
|
1259
|
+
{ no: 5, name: "opcode", kind: "message", oneof: "text", T: () => DiffTextOpcode },
|
|
1260
|
+
{ no: 6, name: "argument", kind: "message", oneof: "text", T: () => DiffTextArgument },
|
|
1261
|
+
{ no: 7, name: "branch_dest", kind: "message", localName: "branch_dest", oneof: "text", T: () => DiffTextBranchDest },
|
|
1262
|
+
{ no: 8, name: "symbol", kind: "message", oneof: "text", T: () => DiffTextSymbol },
|
|
1263
|
+
{ no: 9, name: "spacing", kind: "message", oneof: "text", T: () => DiffTextSpacing },
|
|
1264
|
+
{ no: 10, name: "eol", kind: "message", oneof: "text", T: () => DiffTextEol }
|
|
1265
|
+
]);
|
|
1266
|
+
}
|
|
1267
|
+
create(value) {
|
|
1268
|
+
const message = globalThis.Object.create(this.messagePrototype);
|
|
1269
|
+
message.text = { oneofKind: void 0 };
|
|
1270
|
+
if (value !== void 0)
|
|
1271
|
+
reflectionMergePartial(this, message, value);
|
|
1272
|
+
return message;
|
|
1273
|
+
}
|
|
1274
|
+
internalBinaryRead(reader, length, options, target) {
|
|
1275
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
1276
|
+
while (reader.pos < end) {
|
|
1277
|
+
let [fieldNo, wireType] = reader.tag();
|
|
1278
|
+
switch (fieldNo) {
|
|
1279
|
+
case /* objdiff.diff.DiffTextBasic basic */
|
|
1280
|
+
1:
|
|
1281
|
+
message.text = {
|
|
1282
|
+
oneofKind: "basic",
|
|
1283
|
+
basic: DiffTextBasic.internalBinaryRead(reader, reader.uint32(), options, message.text.basic)
|
|
1284
|
+
};
|
|
1285
|
+
break;
|
|
1286
|
+
case /* objdiff.diff.DiffTextBasicColor basic_color */
|
|
1287
|
+
2:
|
|
1288
|
+
message.text = {
|
|
1289
|
+
oneofKind: "basic_color",
|
|
1290
|
+
basic_color: DiffTextBasicColor.internalBinaryRead(reader, reader.uint32(), options, message.text.basic_color)
|
|
1291
|
+
};
|
|
1292
|
+
break;
|
|
1293
|
+
case /* objdiff.diff.DiffTextLine line */
|
|
1294
|
+
3:
|
|
1295
|
+
message.text = {
|
|
1296
|
+
oneofKind: "line",
|
|
1297
|
+
line: DiffTextLine.internalBinaryRead(reader, reader.uint32(), options, message.text.line)
|
|
1298
|
+
};
|
|
1299
|
+
break;
|
|
1300
|
+
case /* objdiff.diff.DiffTextAddress address */
|
|
1301
|
+
4:
|
|
1302
|
+
message.text = {
|
|
1303
|
+
oneofKind: "address",
|
|
1304
|
+
address: DiffTextAddress.internalBinaryRead(reader, reader.uint32(), options, message.text.address)
|
|
1305
|
+
};
|
|
1306
|
+
break;
|
|
1307
|
+
case /* objdiff.diff.DiffTextOpcode opcode */
|
|
1308
|
+
5:
|
|
1309
|
+
message.text = {
|
|
1310
|
+
oneofKind: "opcode",
|
|
1311
|
+
opcode: DiffTextOpcode.internalBinaryRead(reader, reader.uint32(), options, message.text.opcode)
|
|
1312
|
+
};
|
|
1313
|
+
break;
|
|
1314
|
+
case /* objdiff.diff.DiffTextArgument argument */
|
|
1315
|
+
6:
|
|
1316
|
+
message.text = {
|
|
1317
|
+
oneofKind: "argument",
|
|
1318
|
+
argument: DiffTextArgument.internalBinaryRead(reader, reader.uint32(), options, message.text.argument)
|
|
1319
|
+
};
|
|
1320
|
+
break;
|
|
1321
|
+
case /* objdiff.diff.DiffTextBranchDest branch_dest */
|
|
1322
|
+
7:
|
|
1323
|
+
message.text = {
|
|
1324
|
+
oneofKind: "branch_dest",
|
|
1325
|
+
branch_dest: DiffTextBranchDest.internalBinaryRead(reader, reader.uint32(), options, message.text.branch_dest)
|
|
1326
|
+
};
|
|
1327
|
+
break;
|
|
1328
|
+
case /* objdiff.diff.DiffTextSymbol symbol */
|
|
1329
|
+
8:
|
|
1330
|
+
message.text = {
|
|
1331
|
+
oneofKind: "symbol",
|
|
1332
|
+
symbol: DiffTextSymbol.internalBinaryRead(reader, reader.uint32(), options, message.text.symbol)
|
|
1333
|
+
};
|
|
1334
|
+
break;
|
|
1335
|
+
case /* objdiff.diff.DiffTextSpacing spacing */
|
|
1336
|
+
9:
|
|
1337
|
+
message.text = {
|
|
1338
|
+
oneofKind: "spacing",
|
|
1339
|
+
spacing: DiffTextSpacing.internalBinaryRead(reader, reader.uint32(), options, message.text.spacing)
|
|
1340
|
+
};
|
|
1341
|
+
break;
|
|
1342
|
+
case /* objdiff.diff.DiffTextEol eol */
|
|
1343
|
+
10:
|
|
1344
|
+
message.text = {
|
|
1345
|
+
oneofKind: "eol",
|
|
1346
|
+
eol: DiffTextEol.internalBinaryRead(reader, reader.uint32(), options, message.text.eol)
|
|
1347
|
+
};
|
|
1348
|
+
break;
|
|
1349
|
+
default:
|
|
1350
|
+
let u = options.readUnknownField;
|
|
1351
|
+
if (u === "throw")
|
|
1352
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
1353
|
+
let d = reader.skip(wireType);
|
|
1354
|
+
if (u !== false)
|
|
1355
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
1356
|
+
}
|
|
1357
|
+
}
|
|
1358
|
+
return message;
|
|
1359
|
+
}
|
|
1360
|
+
internalBinaryWrite(message, writer, options) {
|
|
1361
|
+
if (message.text.oneofKind === "basic")
|
|
1362
|
+
DiffTextBasic.internalBinaryWrite(message.text.basic, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
|
|
1363
|
+
if (message.text.oneofKind === "basic_color")
|
|
1364
|
+
DiffTextBasicColor.internalBinaryWrite(message.text.basic_color, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
|
|
1365
|
+
if (message.text.oneofKind === "line")
|
|
1366
|
+
DiffTextLine.internalBinaryWrite(message.text.line, writer.tag(3, WireType.LengthDelimited).fork(), options).join();
|
|
1367
|
+
if (message.text.oneofKind === "address")
|
|
1368
|
+
DiffTextAddress.internalBinaryWrite(message.text.address, writer.tag(4, WireType.LengthDelimited).fork(), options).join();
|
|
1369
|
+
if (message.text.oneofKind === "opcode")
|
|
1370
|
+
DiffTextOpcode.internalBinaryWrite(message.text.opcode, writer.tag(5, WireType.LengthDelimited).fork(), options).join();
|
|
1371
|
+
if (message.text.oneofKind === "argument")
|
|
1372
|
+
DiffTextArgument.internalBinaryWrite(message.text.argument, writer.tag(6, WireType.LengthDelimited).fork(), options).join();
|
|
1373
|
+
if (message.text.oneofKind === "branch_dest")
|
|
1374
|
+
DiffTextBranchDest.internalBinaryWrite(message.text.branch_dest, writer.tag(7, WireType.LengthDelimited).fork(), options).join();
|
|
1375
|
+
if (message.text.oneofKind === "symbol")
|
|
1376
|
+
DiffTextSymbol.internalBinaryWrite(message.text.symbol, writer.tag(8, WireType.LengthDelimited).fork(), options).join();
|
|
1377
|
+
if (message.text.oneofKind === "spacing")
|
|
1378
|
+
DiffTextSpacing.internalBinaryWrite(message.text.spacing, writer.tag(9, WireType.LengthDelimited).fork(), options).join();
|
|
1379
|
+
if (message.text.oneofKind === "eol")
|
|
1380
|
+
DiffTextEol.internalBinaryWrite(message.text.eol, writer.tag(10, WireType.LengthDelimited).fork(), options).join();
|
|
1381
|
+
let u = options.writeUnknownFields;
|
|
1382
|
+
if (u !== false)
|
|
1383
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
1384
|
+
return writer;
|
|
1385
|
+
}
|
|
1386
|
+
};
|
|
1387
|
+
var DiffText = new DiffText$Type();
|
|
1388
|
+
var DiffTextBasic$Type = class extends MessageType {
|
|
1389
|
+
constructor() {
|
|
1390
|
+
super("objdiff.diff.DiffTextBasic", [
|
|
1391
|
+
{
|
|
1392
|
+
no: 1,
|
|
1393
|
+
name: "text",
|
|
1394
|
+
kind: "scalar",
|
|
1395
|
+
T: 9
|
|
1396
|
+
/*ScalarType.STRING*/
|
|
1397
|
+
}
|
|
1398
|
+
]);
|
|
1399
|
+
}
|
|
1400
|
+
create(value) {
|
|
1401
|
+
const message = globalThis.Object.create(this.messagePrototype);
|
|
1402
|
+
message.text = "";
|
|
1403
|
+
if (value !== void 0)
|
|
1404
|
+
reflectionMergePartial(this, message, value);
|
|
1405
|
+
return message;
|
|
1406
|
+
}
|
|
1407
|
+
internalBinaryRead(reader, length, options, target) {
|
|
1408
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
1409
|
+
while (reader.pos < end) {
|
|
1410
|
+
let [fieldNo, wireType] = reader.tag();
|
|
1411
|
+
switch (fieldNo) {
|
|
1412
|
+
case /* string text */
|
|
1413
|
+
1:
|
|
1414
|
+
message.text = reader.string();
|
|
1415
|
+
break;
|
|
1416
|
+
default:
|
|
1417
|
+
let u = options.readUnknownField;
|
|
1418
|
+
if (u === "throw")
|
|
1419
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
1420
|
+
let d = reader.skip(wireType);
|
|
1421
|
+
if (u !== false)
|
|
1422
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
1423
|
+
}
|
|
1424
|
+
}
|
|
1425
|
+
return message;
|
|
1426
|
+
}
|
|
1427
|
+
internalBinaryWrite(message, writer, options) {
|
|
1428
|
+
if (message.text !== "")
|
|
1429
|
+
writer.tag(1, WireType.LengthDelimited).string(message.text);
|
|
1430
|
+
let u = options.writeUnknownFields;
|
|
1431
|
+
if (u !== false)
|
|
1432
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
1433
|
+
return writer;
|
|
1434
|
+
}
|
|
1435
|
+
};
|
|
1436
|
+
var DiffTextBasic = new DiffTextBasic$Type();
|
|
1437
|
+
var DiffTextBasicColor$Type = class extends MessageType {
|
|
1438
|
+
constructor() {
|
|
1439
|
+
super("objdiff.diff.DiffTextBasicColor", [
|
|
1440
|
+
{
|
|
1441
|
+
no: 1,
|
|
1442
|
+
name: "text",
|
|
1443
|
+
kind: "scalar",
|
|
1444
|
+
T: 9
|
|
1445
|
+
/*ScalarType.STRING*/
|
|
1446
|
+
},
|
|
1447
|
+
{
|
|
1448
|
+
no: 2,
|
|
1449
|
+
name: "index",
|
|
1450
|
+
kind: "scalar",
|
|
1451
|
+
T: 13
|
|
1452
|
+
/*ScalarType.UINT32*/
|
|
1453
|
+
}
|
|
1454
|
+
]);
|
|
1455
|
+
}
|
|
1456
|
+
create(value) {
|
|
1457
|
+
const message = globalThis.Object.create(this.messagePrototype);
|
|
1458
|
+
message.text = "";
|
|
1459
|
+
message.index = 0;
|
|
1460
|
+
if (value !== void 0)
|
|
1461
|
+
reflectionMergePartial(this, message, value);
|
|
1462
|
+
return message;
|
|
1463
|
+
}
|
|
1464
|
+
internalBinaryRead(reader, length, options, target) {
|
|
1465
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
1466
|
+
while (reader.pos < end) {
|
|
1467
|
+
let [fieldNo, wireType] = reader.tag();
|
|
1468
|
+
switch (fieldNo) {
|
|
1469
|
+
case /* string text */
|
|
1470
|
+
1:
|
|
1471
|
+
message.text = reader.string();
|
|
1472
|
+
break;
|
|
1473
|
+
case /* uint32 index */
|
|
1474
|
+
2:
|
|
1475
|
+
message.index = reader.uint32();
|
|
1476
|
+
break;
|
|
1477
|
+
default:
|
|
1478
|
+
let u = options.readUnknownField;
|
|
1479
|
+
if (u === "throw")
|
|
1480
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
1481
|
+
let d = reader.skip(wireType);
|
|
1482
|
+
if (u !== false)
|
|
1483
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
1484
|
+
}
|
|
1485
|
+
}
|
|
1486
|
+
return message;
|
|
1487
|
+
}
|
|
1488
|
+
internalBinaryWrite(message, writer, options) {
|
|
1489
|
+
if (message.text !== "")
|
|
1490
|
+
writer.tag(1, WireType.LengthDelimited).string(message.text);
|
|
1491
|
+
if (message.index !== 0)
|
|
1492
|
+
writer.tag(2, WireType.Varint).uint32(message.index);
|
|
1493
|
+
let u = options.writeUnknownFields;
|
|
1494
|
+
if (u !== false)
|
|
1495
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
1496
|
+
return writer;
|
|
1497
|
+
}
|
|
1498
|
+
};
|
|
1499
|
+
var DiffTextBasicColor = new DiffTextBasicColor$Type();
|
|
1500
|
+
var DiffTextLine$Type = class extends MessageType {
|
|
1501
|
+
constructor() {
|
|
1502
|
+
super("objdiff.diff.DiffTextLine", [
|
|
1503
|
+
{
|
|
1504
|
+
no: 1,
|
|
1505
|
+
name: "line_number",
|
|
1506
|
+
kind: "scalar",
|
|
1507
|
+
localName: "line_number",
|
|
1508
|
+
T: 13
|
|
1509
|
+
/*ScalarType.UINT32*/
|
|
1510
|
+
}
|
|
1511
|
+
]);
|
|
1512
|
+
}
|
|
1513
|
+
create(value) {
|
|
1514
|
+
const message = globalThis.Object.create(this.messagePrototype);
|
|
1515
|
+
message.line_number = 0;
|
|
1516
|
+
if (value !== void 0)
|
|
1517
|
+
reflectionMergePartial(this, message, value);
|
|
1518
|
+
return message;
|
|
1519
|
+
}
|
|
1520
|
+
internalBinaryRead(reader, length, options, target) {
|
|
1521
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
1522
|
+
while (reader.pos < end) {
|
|
1523
|
+
let [fieldNo, wireType] = reader.tag();
|
|
1524
|
+
switch (fieldNo) {
|
|
1525
|
+
case /* uint32 line_number */
|
|
1526
|
+
1:
|
|
1527
|
+
message.line_number = reader.uint32();
|
|
1528
|
+
break;
|
|
1529
|
+
default:
|
|
1530
|
+
let u = options.readUnknownField;
|
|
1531
|
+
if (u === "throw")
|
|
1532
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
1533
|
+
let d = reader.skip(wireType);
|
|
1534
|
+
if (u !== false)
|
|
1535
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
1536
|
+
}
|
|
1537
|
+
}
|
|
1538
|
+
return message;
|
|
1539
|
+
}
|
|
1540
|
+
internalBinaryWrite(message, writer, options) {
|
|
1541
|
+
if (message.line_number !== 0)
|
|
1542
|
+
writer.tag(1, WireType.Varint).uint32(message.line_number);
|
|
1543
|
+
let u = options.writeUnknownFields;
|
|
1544
|
+
if (u !== false)
|
|
1545
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
1546
|
+
return writer;
|
|
1547
|
+
}
|
|
1548
|
+
};
|
|
1549
|
+
var DiffTextLine = new DiffTextLine$Type();
|
|
1550
|
+
var DiffTextAddress$Type = class extends MessageType {
|
|
1551
|
+
constructor() {
|
|
1552
|
+
super("objdiff.diff.DiffTextAddress", [
|
|
1553
|
+
{
|
|
1554
|
+
no: 1,
|
|
1555
|
+
name: "address",
|
|
1556
|
+
kind: "scalar",
|
|
1557
|
+
T: 4,
|
|
1558
|
+
L: 0
|
|
1559
|
+
/*LongType.BIGINT*/
|
|
1560
|
+
}
|
|
1561
|
+
]);
|
|
1562
|
+
}
|
|
1563
|
+
create(value) {
|
|
1564
|
+
const message = globalThis.Object.create(this.messagePrototype);
|
|
1565
|
+
message.address = 0n;
|
|
1566
|
+
if (value !== void 0)
|
|
1567
|
+
reflectionMergePartial(this, message, value);
|
|
1568
|
+
return message;
|
|
1569
|
+
}
|
|
1570
|
+
internalBinaryRead(reader, length, options, target) {
|
|
1571
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
1572
|
+
while (reader.pos < end) {
|
|
1573
|
+
let [fieldNo, wireType] = reader.tag();
|
|
1574
|
+
switch (fieldNo) {
|
|
1575
|
+
case /* uint64 address */
|
|
1576
|
+
1:
|
|
1577
|
+
message.address = reader.uint64().toBigInt();
|
|
1578
|
+
break;
|
|
1579
|
+
default:
|
|
1580
|
+
let u = options.readUnknownField;
|
|
1581
|
+
if (u === "throw")
|
|
1582
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
1583
|
+
let d = reader.skip(wireType);
|
|
1584
|
+
if (u !== false)
|
|
1585
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
1586
|
+
}
|
|
1587
|
+
}
|
|
1588
|
+
return message;
|
|
1589
|
+
}
|
|
1590
|
+
internalBinaryWrite(message, writer, options) {
|
|
1591
|
+
if (message.address !== 0n)
|
|
1592
|
+
writer.tag(1, WireType.Varint).uint64(message.address);
|
|
1593
|
+
let u = options.writeUnknownFields;
|
|
1594
|
+
if (u !== false)
|
|
1595
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
1596
|
+
return writer;
|
|
1597
|
+
}
|
|
1598
|
+
};
|
|
1599
|
+
var DiffTextAddress = new DiffTextAddress$Type();
|
|
1600
|
+
var DiffTextOpcode$Type = class extends MessageType {
|
|
1601
|
+
constructor() {
|
|
1602
|
+
super("objdiff.diff.DiffTextOpcode", [
|
|
1603
|
+
{
|
|
1604
|
+
no: 1,
|
|
1605
|
+
name: "mnemonic",
|
|
1606
|
+
kind: "scalar",
|
|
1607
|
+
T: 9
|
|
1608
|
+
/*ScalarType.STRING*/
|
|
1609
|
+
},
|
|
1610
|
+
{
|
|
1611
|
+
no: 2,
|
|
1612
|
+
name: "opcode",
|
|
1613
|
+
kind: "scalar",
|
|
1614
|
+
T: 13
|
|
1615
|
+
/*ScalarType.UINT32*/
|
|
1616
|
+
}
|
|
1617
|
+
]);
|
|
1618
|
+
}
|
|
1619
|
+
create(value) {
|
|
1620
|
+
const message = globalThis.Object.create(this.messagePrototype);
|
|
1621
|
+
message.mnemonic = "";
|
|
1622
|
+
message.opcode = 0;
|
|
1623
|
+
if (value !== void 0)
|
|
1624
|
+
reflectionMergePartial(this, message, value);
|
|
1625
|
+
return message;
|
|
1626
|
+
}
|
|
1627
|
+
internalBinaryRead(reader, length, options, target) {
|
|
1628
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
1629
|
+
while (reader.pos < end) {
|
|
1630
|
+
let [fieldNo, wireType] = reader.tag();
|
|
1631
|
+
switch (fieldNo) {
|
|
1632
|
+
case /* string mnemonic */
|
|
1633
|
+
1:
|
|
1634
|
+
message.mnemonic = reader.string();
|
|
1635
|
+
break;
|
|
1636
|
+
case /* uint32 opcode */
|
|
1637
|
+
2:
|
|
1638
|
+
message.opcode = reader.uint32();
|
|
1639
|
+
break;
|
|
1640
|
+
default:
|
|
1641
|
+
let u = options.readUnknownField;
|
|
1642
|
+
if (u === "throw")
|
|
1643
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
1644
|
+
let d = reader.skip(wireType);
|
|
1645
|
+
if (u !== false)
|
|
1646
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
1647
|
+
}
|
|
1648
|
+
}
|
|
1649
|
+
return message;
|
|
1650
|
+
}
|
|
1651
|
+
internalBinaryWrite(message, writer, options) {
|
|
1652
|
+
if (message.mnemonic !== "")
|
|
1653
|
+
writer.tag(1, WireType.LengthDelimited).string(message.mnemonic);
|
|
1654
|
+
if (message.opcode !== 0)
|
|
1655
|
+
writer.tag(2, WireType.Varint).uint32(message.opcode);
|
|
1656
|
+
let u = options.writeUnknownFields;
|
|
1657
|
+
if (u !== false)
|
|
1658
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
1659
|
+
return writer;
|
|
1660
|
+
}
|
|
1661
|
+
};
|
|
1662
|
+
var DiffTextOpcode = new DiffTextOpcode$Type();
|
|
1663
|
+
var DiffTextArgument$Type = class extends MessageType {
|
|
1664
|
+
constructor() {
|
|
1665
|
+
super("objdiff.diff.DiffTextArgument", [
|
|
1666
|
+
{ no: 1, name: "value", kind: "message", T: () => ArgumentValue }
|
|
1667
|
+
]);
|
|
1668
|
+
}
|
|
1669
|
+
create(value) {
|
|
1670
|
+
const message = globalThis.Object.create(this.messagePrototype);
|
|
1671
|
+
if (value !== void 0)
|
|
1672
|
+
reflectionMergePartial(this, message, value);
|
|
1673
|
+
return message;
|
|
1674
|
+
}
|
|
1675
|
+
internalBinaryRead(reader, length, options, target) {
|
|
1676
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
1677
|
+
while (reader.pos < end) {
|
|
1678
|
+
let [fieldNo, wireType] = reader.tag();
|
|
1679
|
+
switch (fieldNo) {
|
|
1680
|
+
case /* objdiff.diff.ArgumentValue value */
|
|
1681
|
+
1:
|
|
1682
|
+
message.value = ArgumentValue.internalBinaryRead(reader, reader.uint32(), options, message.value);
|
|
1683
|
+
break;
|
|
1684
|
+
default:
|
|
1685
|
+
let u = options.readUnknownField;
|
|
1686
|
+
if (u === "throw")
|
|
1687
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
1688
|
+
let d = reader.skip(wireType);
|
|
1689
|
+
if (u !== false)
|
|
1690
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
1691
|
+
}
|
|
1692
|
+
}
|
|
1693
|
+
return message;
|
|
1694
|
+
}
|
|
1695
|
+
internalBinaryWrite(message, writer, options) {
|
|
1696
|
+
if (message.value)
|
|
1697
|
+
ArgumentValue.internalBinaryWrite(message.value, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
|
|
1698
|
+
let u = options.writeUnknownFields;
|
|
1699
|
+
if (u !== false)
|
|
1700
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
1701
|
+
return writer;
|
|
1702
|
+
}
|
|
1703
|
+
};
|
|
1704
|
+
var DiffTextArgument = new DiffTextArgument$Type();
|
|
1705
|
+
var DiffTextBranchDest$Type = class extends MessageType {
|
|
1706
|
+
constructor() {
|
|
1707
|
+
super("objdiff.diff.DiffTextBranchDest", [
|
|
1708
|
+
{
|
|
1709
|
+
no: 1,
|
|
1710
|
+
name: "address",
|
|
1711
|
+
kind: "scalar",
|
|
1712
|
+
T: 4,
|
|
1713
|
+
L: 0
|
|
1714
|
+
/*LongType.BIGINT*/
|
|
1715
|
+
}
|
|
1716
|
+
]);
|
|
1717
|
+
}
|
|
1718
|
+
create(value) {
|
|
1719
|
+
const message = globalThis.Object.create(this.messagePrototype);
|
|
1720
|
+
message.address = 0n;
|
|
1721
|
+
if (value !== void 0)
|
|
1722
|
+
reflectionMergePartial(this, message, value);
|
|
1723
|
+
return message;
|
|
1724
|
+
}
|
|
1725
|
+
internalBinaryRead(reader, length, options, target) {
|
|
1726
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
1727
|
+
while (reader.pos < end) {
|
|
1728
|
+
let [fieldNo, wireType] = reader.tag();
|
|
1729
|
+
switch (fieldNo) {
|
|
1730
|
+
case /* uint64 address */
|
|
1731
|
+
1:
|
|
1732
|
+
message.address = reader.uint64().toBigInt();
|
|
1733
|
+
break;
|
|
1734
|
+
default:
|
|
1735
|
+
let u = options.readUnknownField;
|
|
1736
|
+
if (u === "throw")
|
|
1737
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
1738
|
+
let d = reader.skip(wireType);
|
|
1739
|
+
if (u !== false)
|
|
1740
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
1741
|
+
}
|
|
1742
|
+
}
|
|
1743
|
+
return message;
|
|
1744
|
+
}
|
|
1745
|
+
internalBinaryWrite(message, writer, options) {
|
|
1746
|
+
if (message.address !== 0n)
|
|
1747
|
+
writer.tag(1, WireType.Varint).uint64(message.address);
|
|
1748
|
+
let u = options.writeUnknownFields;
|
|
1749
|
+
if (u !== false)
|
|
1750
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
1751
|
+
return writer;
|
|
1752
|
+
}
|
|
1753
|
+
};
|
|
1754
|
+
var DiffTextBranchDest = new DiffTextBranchDest$Type();
|
|
1755
|
+
var DiffTextSymbol$Type = class extends MessageType {
|
|
1756
|
+
constructor() {
|
|
1757
|
+
super("objdiff.diff.DiffTextSymbol", [
|
|
1758
|
+
{ no: 1, name: "target", kind: "message", T: () => RelocationTarget }
|
|
1759
|
+
]);
|
|
1760
|
+
}
|
|
1761
|
+
create(value) {
|
|
1762
|
+
const message = globalThis.Object.create(this.messagePrototype);
|
|
1763
|
+
if (value !== void 0)
|
|
1764
|
+
reflectionMergePartial(this, message, value);
|
|
1765
|
+
return message;
|
|
1766
|
+
}
|
|
1767
|
+
internalBinaryRead(reader, length, options, target) {
|
|
1768
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
1769
|
+
while (reader.pos < end) {
|
|
1770
|
+
let [fieldNo, wireType] = reader.tag();
|
|
1771
|
+
switch (fieldNo) {
|
|
1772
|
+
case /* objdiff.diff.RelocationTarget target */
|
|
1773
|
+
1:
|
|
1774
|
+
message.target = RelocationTarget.internalBinaryRead(reader, reader.uint32(), options, message.target);
|
|
1775
|
+
break;
|
|
1776
|
+
default:
|
|
1777
|
+
let u = options.readUnknownField;
|
|
1778
|
+
if (u === "throw")
|
|
1779
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
1780
|
+
let d = reader.skip(wireType);
|
|
1781
|
+
if (u !== false)
|
|
1782
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
1783
|
+
}
|
|
1784
|
+
}
|
|
1785
|
+
return message;
|
|
1786
|
+
}
|
|
1787
|
+
internalBinaryWrite(message, writer, options) {
|
|
1788
|
+
if (message.target)
|
|
1789
|
+
RelocationTarget.internalBinaryWrite(message.target, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
|
|
1790
|
+
let u = options.writeUnknownFields;
|
|
1791
|
+
if (u !== false)
|
|
1792
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
1793
|
+
return writer;
|
|
1794
|
+
}
|
|
1795
|
+
};
|
|
1796
|
+
var DiffTextSymbol = new DiffTextSymbol$Type();
|
|
1797
|
+
var DiffTextSpacing$Type = class extends MessageType {
|
|
1798
|
+
constructor() {
|
|
1799
|
+
super("objdiff.diff.DiffTextSpacing", [
|
|
1800
|
+
{
|
|
1801
|
+
no: 1,
|
|
1802
|
+
name: "count",
|
|
1803
|
+
kind: "scalar",
|
|
1804
|
+
T: 13
|
|
1805
|
+
/*ScalarType.UINT32*/
|
|
1806
|
+
}
|
|
1807
|
+
]);
|
|
1808
|
+
}
|
|
1809
|
+
create(value) {
|
|
1810
|
+
const message = globalThis.Object.create(this.messagePrototype);
|
|
1811
|
+
message.count = 0;
|
|
1812
|
+
if (value !== void 0)
|
|
1813
|
+
reflectionMergePartial(this, message, value);
|
|
1814
|
+
return message;
|
|
1815
|
+
}
|
|
1816
|
+
internalBinaryRead(reader, length, options, target) {
|
|
1817
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
1818
|
+
while (reader.pos < end) {
|
|
1819
|
+
let [fieldNo, wireType] = reader.tag();
|
|
1820
|
+
switch (fieldNo) {
|
|
1821
|
+
case /* uint32 count */
|
|
1822
|
+
1:
|
|
1823
|
+
message.count = reader.uint32();
|
|
1824
|
+
break;
|
|
1825
|
+
default:
|
|
1826
|
+
let u = options.readUnknownField;
|
|
1827
|
+
if (u === "throw")
|
|
1828
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
1829
|
+
let d = reader.skip(wireType);
|
|
1830
|
+
if (u !== false)
|
|
1831
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
1832
|
+
}
|
|
1833
|
+
}
|
|
1834
|
+
return message;
|
|
1835
|
+
}
|
|
1836
|
+
internalBinaryWrite(message, writer, options) {
|
|
1837
|
+
if (message.count !== 0)
|
|
1838
|
+
writer.tag(1, WireType.Varint).uint32(message.count);
|
|
1839
|
+
let u = options.writeUnknownFields;
|
|
1840
|
+
if (u !== false)
|
|
1841
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
1842
|
+
return writer;
|
|
1843
|
+
}
|
|
1844
|
+
};
|
|
1845
|
+
var DiffTextSpacing = new DiffTextSpacing$Type();
|
|
1846
|
+
var DiffTextEol$Type = class extends MessageType {
|
|
1847
|
+
constructor() {
|
|
1848
|
+
super("objdiff.diff.DiffTextEol", []);
|
|
1849
|
+
}
|
|
1850
|
+
create(value) {
|
|
1851
|
+
const message = globalThis.Object.create(this.messagePrototype);
|
|
1852
|
+
if (value !== void 0)
|
|
1853
|
+
reflectionMergePartial(this, message, value);
|
|
1854
|
+
return message;
|
|
1855
|
+
}
|
|
1856
|
+
internalBinaryRead(reader, length, options, target) {
|
|
1857
|
+
return target ?? this.create();
|
|
1858
|
+
}
|
|
1859
|
+
internalBinaryWrite(message, writer, options) {
|
|
1860
|
+
let u = options.writeUnknownFields;
|
|
1861
|
+
if (u !== false)
|
|
1862
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
1863
|
+
return writer;
|
|
1864
|
+
}
|
|
1865
|
+
};
|
|
1866
|
+
var DiffTextEol = new DiffTextEol$Type();
|
|
1867
|
+
|
|
1868
|
+
// src/main.ts
|
|
1869
|
+
var workerInit = false;
|
|
1870
|
+
var workerCallbacks = null;
|
|
1871
|
+
var workerReady = new Promise((resolve, reject) => {
|
|
1872
|
+
workerCallbacks = { start: performance.now(), resolve, reject };
|
|
1873
|
+
});
|
|
1874
|
+
function initialize(workerUrl) {
|
|
1875
|
+
if (workerInit) {
|
|
1876
|
+
return;
|
|
1877
|
+
}
|
|
1878
|
+
workerInit = true;
|
|
1879
|
+
const worker = new Worker(workerUrl || "worker.js", { type: "module" });
|
|
1880
|
+
worker.onmessage = onMessage.bind(null, worker);
|
|
1881
|
+
worker.onerror = (error) => {
|
|
1882
|
+
console.error("Worker error", error);
|
|
1883
|
+
workerCallbacks.reject(error);
|
|
1884
|
+
};
|
|
1885
|
+
}
|
|
1886
|
+
var globalMessageId = 0;
|
|
1887
|
+
var messageCallbacks = /* @__PURE__ */ new Map();
|
|
1888
|
+
function onMessage(worker, event) {
|
|
1889
|
+
switch (event.data.type) {
|
|
1890
|
+
case "ready":
|
|
1891
|
+
workerCallbacks.resolve(worker);
|
|
1892
|
+
break;
|
|
1893
|
+
case "result": {
|
|
1894
|
+
const { messageId, result } = event.data;
|
|
1895
|
+
const callbacks = messageCallbacks.get(messageId);
|
|
1896
|
+
if (callbacks) {
|
|
1897
|
+
const end = performance.now();
|
|
1898
|
+
console.debug(`Message ${messageId} took ${end - callbacks.start}ms`);
|
|
1899
|
+
messageCallbacks.delete(messageId);
|
|
1900
|
+
callbacks.resolve(result);
|
|
1901
|
+
}
|
|
1902
|
+
break;
|
|
1903
|
+
}
|
|
1904
|
+
}
|
|
1905
|
+
}
|
|
1906
|
+
async function defer(message) {
|
|
1907
|
+
if (!workerInit) {
|
|
1908
|
+
throw new Error("Worker not initialized");
|
|
1909
|
+
}
|
|
1910
|
+
const worker = await workerReady;
|
|
1911
|
+
const messageId = globalMessageId++;
|
|
1912
|
+
const promise = new Promise((resolve, reject) => {
|
|
1913
|
+
messageCallbacks.set(messageId, { start: performance.now(), resolve, reject });
|
|
1914
|
+
});
|
|
1915
|
+
worker.postMessage({
|
|
1916
|
+
...message,
|
|
1917
|
+
messageId
|
|
1918
|
+
});
|
|
1919
|
+
return promise;
|
|
1920
|
+
}
|
|
1921
|
+
async function runDiff(left, right, config) {
|
|
1922
|
+
const data = await defer({
|
|
1923
|
+
type: "run_diff",
|
|
1924
|
+
left,
|
|
1925
|
+
right,
|
|
1926
|
+
config
|
|
1927
|
+
});
|
|
1928
|
+
const parseStart = performance.now();
|
|
1929
|
+
const result = DiffResult.fromBinary(data, { readUnknownField: false });
|
|
1930
|
+
const end = performance.now();
|
|
1931
|
+
console.debug(`Parsing message took ${end - parseStart}ms`);
|
|
1932
|
+
return result;
|
|
1933
|
+
}
|
|
1934
|
+
export {
|
|
1935
|
+
Argument,
|
|
1936
|
+
ArgumentRelocation,
|
|
1937
|
+
ArgumentValue,
|
|
1938
|
+
DataDiff,
|
|
1939
|
+
DiffKind,
|
|
1940
|
+
DiffResult,
|
|
1941
|
+
Instruction,
|
|
1942
|
+
InstructionBranchFrom,
|
|
1943
|
+
InstructionBranchTo,
|
|
1944
|
+
InstructionDiff,
|
|
1945
|
+
ObjectDiff,
|
|
1946
|
+
Relocation,
|
|
1947
|
+
RelocationTarget,
|
|
1948
|
+
SectionDiff,
|
|
1949
|
+
SectionKind,
|
|
1950
|
+
Symbol,
|
|
1951
|
+
SymbolFlag,
|
|
1952
|
+
initialize,
|
|
1953
|
+
runDiff
|
|
1954
|
+
};
|
|
1955
|
+
//# sourceMappingURL=main.js.map
|