@elaraai/east 1.0.94 → 1.0.96

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.
@@ -0,0 +1,146 @@
1
+ /**
2
+ * Copyright (c) 2025 Elara AI Pty Ltd
3
+ * Dual-licensed under AGPL-3.0 and commercial license. See LICENSE for details.
4
+ */
5
+ /** The content key of each container a decode's function IRs defined, by its definition index. */
6
+ export declare class ContainerKeys {
7
+ /** Four lanes per definition index. */
8
+ private lanes;
9
+ /** Whether a definition index has a key: only the containers an IR defined do. */
10
+ private known;
11
+ /**
12
+ * Keeps the key of the container of definition index `def`.
13
+ *
14
+ * @param def - the container's definition index
15
+ * @param from - the lanes holding its finished key
16
+ * @param at - where in `from` its four lanes start
17
+ */
18
+ keep(def: number, from: Uint32Array, at: number): void;
19
+ /**
20
+ * Folds the key of the container of definition index `def` into four lanes.
21
+ *
22
+ * @param def - the container's definition index
23
+ * @param into - the lanes to fold it into
24
+ * @param at - where in `into` the four lanes start
25
+ * @returns whether the container has a key: one no function IR defined has none
26
+ */
27
+ fold(def: number, into: Uint32Array, at: number): boolean;
28
+ /** Grows the table to hold definition index `def`. */
29
+ private grow;
30
+ }
31
+ /**
32
+ * One function IR's key, folded as the decoder reads the IR: the decoder tells
33
+ * it where each container is defined, back-referenced and closed, and the
34
+ * bytes between are folded at those points.
35
+ *
36
+ * @remarks
37
+ * One per decode, used again for each IR: an IR holds no function value, so
38
+ * no other IR is read while one is.
39
+ */
40
+ export declare class IrKey {
41
+ private readonly containers;
42
+ /** Four lanes per depth: the IR's own at depth 0, then each container open in it. */
43
+ private lanes;
44
+ /** The definition index of the container open at each depth from 1. */
45
+ private readonly defs;
46
+ private depth;
47
+ /** The bytes the IR is read from. */
48
+ private bytes;
49
+ /** The offset of `bytes` folded so far. */
50
+ private folded;
51
+ /** Whether the IR back-references a container no function IR defined: such an IR has no key. */
52
+ private keyless;
53
+ /** @param containers - the keys of the containers the decode's IRs defined */
54
+ constructor(containers: ContainerKeys);
55
+ /**
56
+ * Starts the key of an IR read from `bytes` at `start`.
57
+ *
58
+ * @param bytes - the logical bytes the IR is read from
59
+ * @param start - the IR's first byte
60
+ */
61
+ begin(bytes: Uint8Array, start: number): void;
62
+ /**
63
+ * A container defined at `at`: its tag is that one byte, its content follows.
64
+ *
65
+ * @param at - the offset of its tag
66
+ * @param def - its definition index
67
+ */
68
+ open(at: number, def: number): void;
69
+ /**
70
+ * A back-reference, read from `at` to `end`, to an earlier container.
71
+ *
72
+ * @param at - the offset of its tag
73
+ * @param end - the offset after its delta
74
+ * @param def - the definition index it resolves to
75
+ */
76
+ ref(at: number, end: number, def: number): void;
77
+ /**
78
+ * The innermost open container's content ends at `end`: its key is kept by
79
+ * its definition index and folded into the container around it.
80
+ *
81
+ * @param end - the offset after its content
82
+ */
83
+ close(end: number): void;
84
+ /**
85
+ * The IR's key, once it is read to `end`.
86
+ *
87
+ * @param end - the offset after the IR
88
+ * @returns its 32 hex digits, or `undefined` when it back-references a container no function IR defined
89
+ */
90
+ end(end: number): string | undefined;
91
+ /** Folds the bytes read since the last point up to `to`. */
92
+ private foldTo;
93
+ }
94
+ /**
95
+ * What one decode keys its functions by (#1353): the keys of the containers
96
+ * its function IRs defined, the key of the IR being read, and the stream's
97
+ * source map as read so far.
98
+ *
99
+ * @remarks
100
+ * The map is folded as its stacks' own bytes — those after the header
101
+ * section's length and count, and after each inline delta's count — so a map
102
+ * keys alike however a writer split it between the header and the stream.
103
+ *
104
+ * Every whole-value decode has one, and most decode no function: what it
105
+ * keeps is made when it meets its first, so a decode of data pays nothing.
106
+ */
107
+ export declare class BodyKeys {
108
+ private readonly bytes;
109
+ private readonly section;
110
+ private readonly end;
111
+ /** The keys of the containers the decode's IRs defined, once it meets a function. */
112
+ private containers;
113
+ /** The function IR being read, begun again for each; made with `containers`. */
114
+ private irKey;
115
+ /** The source map's lanes as read so far, once it meets a function. */
116
+ private map;
117
+ /** The source map's key as read so far, as 32 hex digits; `undefined` until asked for, and after it grows. */
118
+ private mapKey;
119
+ /**
120
+ * @param bytes - the blob, holding the header's source map section
121
+ * @param section - the offset of the section, at its length
122
+ * @param end - the offset after the section
123
+ */
124
+ constructor(bytes: Uint8Array, section: number, end: number);
125
+ /** The key of the function IR being read; begun again for each. */
126
+ get ir(): IrKey;
127
+ /**
128
+ * Folds the stacks the stream's source map gained mid-stream (a function's
129
+ * inline delta).
130
+ *
131
+ * @param bytes - the logical bytes the delta was read from
132
+ * @param from - the offset of its first stack
133
+ * @param to - the offset after its last
134
+ */
135
+ addStacks(bytes: Uint8Array, from: number, to: number): void;
136
+ /**
137
+ * A function's key: its IR's, read to `end`, and the source map's so far.
138
+ *
139
+ * @param end - the offset after the function's IR
140
+ * @returns the key, or `undefined` when its IR back-references a container no function IR defined
141
+ */
142
+ keyOf(end: number): string | undefined;
143
+ /** The source map's lanes, the header's stacks folded in the first time they are asked for. */
144
+ private mapLanes;
145
+ }
146
+ //# sourceMappingURL=body-key.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"body-key.d.ts","sourceRoot":"","sources":["../../../../../src/serialization/beast2/v5/body-key.ts"],"names":[],"mappings":"AAAA;;;GAGG;AA2GH,kGAAkG;AAClG,qBAAa,aAAa;IACxB,uCAAuC;IACvC,OAAO,CAAC,KAAK,CAAyB;IACtC,kFAAkF;IAClF,OAAO,CAAC,KAAK,CAAuB;IAEpC;;;;;;OAMG;IACH,IAAI,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,WAAW,EAAE,EAAE,EAAE,MAAM,GAAG,IAAI;IAUtD;;;;;;;OAOG;IACH,IAAI,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,WAAW,EAAE,EAAE,EAAE,MAAM,GAAG,OAAO;IAWzD,sDAAsD;IACtD,OAAO,CAAC,IAAI;CAUb;AAED;;;;;;;;GAQG;AACH,qBAAa,KAAK;IAcJ,OAAO,CAAC,QAAQ,CAAC,UAAU;IAbvC,qFAAqF;IACrF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AAI,EAAE,IAAI,KAAK,CAMd;IAED;;;;;;;OAOG;IACH,SAAS,CAAC,KAAK,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,GAAG,IAAI;IAK5D;;;;;OAKG;IACH,KAAK,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS;IAOtC,+FAA+F;IAC/F,OAAO,CAAC,QAAQ;CAYjB"}
@@ -0,0 +1,345 @@
1
+ /**
2
+ * Copyright (c) 2025 Elara AI Pty Ltd
3
+ * Dual-licensed under AGPL-3.0 and commercial license. See LICENSE for details.
4
+ */
5
+ /**
6
+ * A decoded function's content key (#1353): what its IR is, whatever its place
7
+ * in the stream, so that every function over one body runs one compiled body
8
+ * (`finishDecodedFunction`, `CompiledBodies`).
9
+ *
10
+ * The key is not the IR's bytes. An IR's containers are mutable containers on
11
+ * the wire, so an IR written twice in one stream is written in full the first
12
+ * time and as back-references after (`REF` + a relative delta): the same body
13
+ * has other bytes at each place it sits, and other bytes again once anything
14
+ * before it changes. So the key folds the bytes between an IR's containers,
15
+ * and each container — defined there or back-referenced — as the key of its
16
+ * own content. A container's key is computed as it is read, kept by its
17
+ * definition index, and folded wherever a later IR refers to it. The bytes
18
+ * are folded from the buffer the decoder reads, between the points it
19
+ * reports, so nothing is decoded twice and nothing walks the decoded IR.
20
+ *
21
+ * A function's key also holds the stream's source map as read so far, since a
22
+ * compiled body resolves its location ids against the map it compiled under.
23
+ *
24
+ * The hash is 128 bits in four 32-bit lanes, each a rotate-multiply over the
25
+ * bytes with its own multiplier and rotation, finished by murmur3's mix.
26
+ *
27
+ * @packageDocumentation
28
+ */
29
+ /** Each lane's starting value. */
30
+ const SEED0 = 0x811c9dc5;
31
+ const SEED1 = 0x9e3779b9;
32
+ const SEED2 = 0x7f4a7c15;
33
+ const SEED3 = 0x3c6ef372;
34
+ /** Each lane's multiplier: odd, so every step is a bijection of the lane. */
35
+ const P0 = 0x01000193;
36
+ const P1 = 0x5bd1e995;
37
+ const P2 = 0x85ebca6b;
38
+ const P3 = 0xc2b2ae35;
39
+ /** Folded before a container's key: wider than a byte, so a key never folds as bytes do. */
40
+ const CONTAINER = 0x100;
41
+ /** Folds `x` into the four lanes at `at`. */
42
+ function step(lanes, at, x) {
43
+ let v = lanes[at] ^ x;
44
+ lanes[at] = Math.imul((v << 13) | (v >>> 19), P0);
45
+ v = lanes[at + 1] ^ x;
46
+ lanes[at + 1] = Math.imul((v << 15) | (v >>> 17), P1);
47
+ v = lanes[at + 2] ^ x;
48
+ lanes[at + 2] = Math.imul((v << 17) | (v >>> 15), P2);
49
+ v = lanes[at + 3] ^ x;
50
+ lanes[at + 3] = Math.imul((v << 19) | (v >>> 13), P3);
51
+ }
52
+ /** Folds `bytes[from, to)` into the four lanes at `at`. */
53
+ function foldBytes(lanes, at, bytes, from, to) {
54
+ let a = lanes[at], b = lanes[at + 1], c = lanes[at + 2], d = lanes[at + 3];
55
+ for (let i = from; i < to; i++) {
56
+ const x = bytes[i];
57
+ let v = a ^ x;
58
+ a = Math.imul((v << 13) | (v >>> 19), P0);
59
+ v = b ^ x;
60
+ b = Math.imul((v << 15) | (v >>> 17), P1);
61
+ v = c ^ x;
62
+ c = Math.imul((v << 17) | (v >>> 15), P2);
63
+ v = d ^ x;
64
+ d = Math.imul((v << 19) | (v >>> 13), P3);
65
+ }
66
+ lanes[at] = a;
67
+ lanes[at + 1] = b;
68
+ lanes[at + 2] = c;
69
+ lanes[at + 3] = d;
70
+ }
71
+ /** Sets the four lanes at `at` to their seeds. */
72
+ function seed(lanes, at) {
73
+ lanes[at] = SEED0;
74
+ lanes[at + 1] = SEED1;
75
+ lanes[at + 2] = SEED2;
76
+ lanes[at + 3] = SEED3;
77
+ }
78
+ /** Murmur3's finishing mix of one lane. */
79
+ function mix(h) {
80
+ h ^= h >>> 16;
81
+ h = Math.imul(h, 0x85ebca6b);
82
+ h ^= h >>> 13;
83
+ h = Math.imul(h, 0xc2b2ae35);
84
+ h ^= h >>> 16;
85
+ return h >>> 0;
86
+ }
87
+ /** Finishes the four lanes at `at` in place. */
88
+ function finish(lanes, at) {
89
+ lanes[at] = mix(lanes[at]);
90
+ lanes[at + 1] = mix(lanes[at + 1]);
91
+ lanes[at + 2] = mix(lanes[at + 2]);
92
+ lanes[at + 3] = mix(lanes[at + 3]);
93
+ }
94
+ /** The four lanes at `at`, finished, as 32 hex digits. */
95
+ function text(lanes, at) {
96
+ let out = "";
97
+ for (let i = at; i < at + 4; i++)
98
+ out += mix(lanes[i]).toString(16).padStart(8, "0");
99
+ return out;
100
+ }
101
+ /** The content key of each container a decode's function IRs defined, by its definition index. */
102
+ export class ContainerKeys {
103
+ /** Four lanes per definition index. */
104
+ lanes = new Uint32Array(1024);
105
+ /** Whether a definition index has a key: only the containers an IR defined do. */
106
+ known = new Uint8Array(256);
107
+ /**
108
+ * Keeps the key of the container of definition index `def`.
109
+ *
110
+ * @param def - the container's definition index
111
+ * @param from - the lanes holding its finished key
112
+ * @param at - where in `from` its four lanes start
113
+ */
114
+ keep(def, from, at) {
115
+ if (def >= this.known.length)
116
+ this.grow(def);
117
+ const o = def * 4;
118
+ this.lanes[o] = from[at];
119
+ this.lanes[o + 1] = from[at + 1];
120
+ this.lanes[o + 2] = from[at + 2];
121
+ this.lanes[o + 3] = from[at + 3];
122
+ this.known[def] = 1;
123
+ }
124
+ /**
125
+ * Folds the key of the container of definition index `def` into four lanes.
126
+ *
127
+ * @param def - the container's definition index
128
+ * @param into - the lanes to fold it into
129
+ * @param at - where in `into` the four lanes start
130
+ * @returns whether the container has a key: one no function IR defined has none
131
+ */
132
+ fold(def, into, at) {
133
+ if (def >= this.known.length || this.known[def] === 0)
134
+ return false;
135
+ const o = def * 4;
136
+ step(into, at, CONTAINER);
137
+ step(into, at, this.lanes[o]);
138
+ step(into, at, this.lanes[o + 1]);
139
+ step(into, at, this.lanes[o + 2]);
140
+ step(into, at, this.lanes[o + 3]);
141
+ return true;
142
+ }
143
+ /** Grows the table to hold definition index `def`. */
144
+ grow(def) {
145
+ let n = this.known.length;
146
+ while (n <= def)
147
+ n *= 2;
148
+ const known = new Uint8Array(n);
149
+ known.set(this.known);
150
+ this.known = known;
151
+ const lanes = new Uint32Array(n * 4);
152
+ lanes.set(this.lanes);
153
+ this.lanes = lanes;
154
+ }
155
+ }
156
+ /**
157
+ * One function IR's key, folded as the decoder reads the IR: the decoder tells
158
+ * it where each container is defined, back-referenced and closed, and the
159
+ * bytes between are folded at those points.
160
+ *
161
+ * @remarks
162
+ * One per decode, used again for each IR: an IR holds no function value, so
163
+ * no other IR is read while one is.
164
+ */
165
+ export class IrKey {
166
+ containers;
167
+ /** Four lanes per depth: the IR's own at depth 0, then each container open in it. */
168
+ lanes = new Uint32Array(64);
169
+ /** The definition index of the container open at each depth from 1. */
170
+ defs = [];
171
+ depth = 0;
172
+ /** The bytes the IR is read from. */
173
+ bytes = new Uint8Array(0);
174
+ /** The offset of `bytes` folded so far. */
175
+ folded = 0;
176
+ /** Whether the IR back-references a container no function IR defined: such an IR has no key. */
177
+ keyless = false;
178
+ /** @param containers - the keys of the containers the decode's IRs defined */
179
+ constructor(containers) {
180
+ this.containers = containers;
181
+ }
182
+ /**
183
+ * Starts the key of an IR read from `bytes` at `start`.
184
+ *
185
+ * @param bytes - the logical bytes the IR is read from
186
+ * @param start - the IR's first byte
187
+ */
188
+ begin(bytes, start) {
189
+ this.bytes = bytes;
190
+ this.folded = start;
191
+ this.depth = 0;
192
+ this.defs.length = 0;
193
+ this.keyless = false;
194
+ seed(this.lanes, 0);
195
+ }
196
+ /**
197
+ * A container defined at `at`: its tag is that one byte, its content follows.
198
+ *
199
+ * @param at - the offset of its tag
200
+ * @param def - its definition index
201
+ */
202
+ open(at, def) {
203
+ this.foldTo(at);
204
+ this.folded = at + 1;
205
+ this.depth++;
206
+ const o = this.depth * 4;
207
+ if (o + 4 > this.lanes.length) {
208
+ const lanes = new Uint32Array(this.lanes.length * 2);
209
+ lanes.set(this.lanes);
210
+ this.lanes = lanes;
211
+ }
212
+ seed(this.lanes, o);
213
+ this.defs.push(def);
214
+ }
215
+ /**
216
+ * A back-reference, read from `at` to `end`, to an earlier container.
217
+ *
218
+ * @param at - the offset of its tag
219
+ * @param end - the offset after its delta
220
+ * @param def - the definition index it resolves to
221
+ */
222
+ ref(at, end, def) {
223
+ this.foldTo(at);
224
+ this.folded = end;
225
+ if (!this.containers.fold(def, this.lanes, this.depth * 4))
226
+ this.keyless = true;
227
+ }
228
+ /**
229
+ * The innermost open container's content ends at `end`: its key is kept by
230
+ * its definition index and folded into the container around it.
231
+ *
232
+ * @param end - the offset after its content
233
+ */
234
+ close(end) {
235
+ this.foldTo(end);
236
+ const o = this.depth * 4;
237
+ finish(this.lanes, o);
238
+ this.containers.keep(this.defs.pop(), this.lanes, o);
239
+ this.depth--;
240
+ const p = this.depth * 4;
241
+ step(this.lanes, p, CONTAINER);
242
+ step(this.lanes, p, this.lanes[o]);
243
+ step(this.lanes, p, this.lanes[o + 1]);
244
+ step(this.lanes, p, this.lanes[o + 2]);
245
+ step(this.lanes, p, this.lanes[o + 3]);
246
+ }
247
+ /**
248
+ * The IR's key, once it is read to `end`.
249
+ *
250
+ * @param end - the offset after the IR
251
+ * @returns its 32 hex digits, or `undefined` when it back-references a container no function IR defined
252
+ */
253
+ end(end) {
254
+ this.foldTo(end);
255
+ return this.keyless || this.depth !== 0 ? undefined : text(this.lanes, 0);
256
+ }
257
+ /** Folds the bytes read since the last point up to `to`. */
258
+ foldTo(to) {
259
+ foldBytes(this.lanes, this.depth * 4, this.bytes, this.folded, to);
260
+ this.folded = to;
261
+ }
262
+ }
263
+ /**
264
+ * What one decode keys its functions by (#1353): the keys of the containers
265
+ * its function IRs defined, the key of the IR being read, and the stream's
266
+ * source map as read so far.
267
+ *
268
+ * @remarks
269
+ * The map is folded as its stacks' own bytes — those after the header
270
+ * section's length and count, and after each inline delta's count — so a map
271
+ * keys alike however a writer split it between the header and the stream.
272
+ *
273
+ * Every whole-value decode has one, and most decode no function: what it
274
+ * keeps is made when it meets its first, so a decode of data pays nothing.
275
+ */
276
+ export class BodyKeys {
277
+ bytes;
278
+ section;
279
+ end;
280
+ /** The keys of the containers the decode's IRs defined, once it meets a function. */
281
+ containers;
282
+ /** The function IR being read, begun again for each; made with `containers`. */
283
+ irKey;
284
+ /** The source map's lanes as read so far, once it meets a function. */
285
+ map;
286
+ /** The source map's key as read so far, as 32 hex digits; `undefined` until asked for, and after it grows. */
287
+ mapKey;
288
+ /**
289
+ * @param bytes - the blob, holding the header's source map section
290
+ * @param section - the offset of the section, at its length
291
+ * @param end - the offset after the section
292
+ */
293
+ constructor(bytes, section, end) {
294
+ this.bytes = bytes;
295
+ this.section = section;
296
+ this.end = end;
297
+ }
298
+ /** The key of the function IR being read; begun again for each. */
299
+ get ir() {
300
+ if (this.irKey === undefined) {
301
+ this.containers = new ContainerKeys();
302
+ this.irKey = new IrKey(this.containers);
303
+ }
304
+ return this.irKey;
305
+ }
306
+ /**
307
+ * Folds the stacks the stream's source map gained mid-stream (a function's
308
+ * inline delta).
309
+ *
310
+ * @param bytes - the logical bytes the delta was read from
311
+ * @param from - the offset of its first stack
312
+ * @param to - the offset after its last
313
+ */
314
+ addStacks(bytes, from, to) {
315
+ foldBytes(this.mapLanes(), 0, bytes, from, to);
316
+ this.mapKey = undefined;
317
+ }
318
+ /**
319
+ * A function's key: its IR's, read to `end`, and the source map's so far.
320
+ *
321
+ * @param end - the offset after the function's IR
322
+ * @returns the key, or `undefined` when its IR back-references a container no function IR defined
323
+ */
324
+ keyOf(end) {
325
+ const ir = this.ir.end(end);
326
+ if (ir === undefined)
327
+ return undefined;
328
+ this.mapKey ??= text(this.mapLanes(), 0);
329
+ return ir + this.mapKey;
330
+ }
331
+ /** The source map's lanes, the header's stacks folded in the first time they are asked for. */
332
+ mapLanes() {
333
+ if (this.map === undefined) {
334
+ this.map = new Uint32Array(4);
335
+ seed(this.map, 0);
336
+ // The stacks follow the section's length and its count, two varints.
337
+ let at = this.section;
338
+ while ((this.bytes[at++] & 0x80) !== 0) { /* the length's next byte */ }
339
+ while ((this.bytes[at++] & 0x80) !== 0) { /* the count's next byte */ }
340
+ foldBytes(this.map, 0, this.bytes, at, this.end);
341
+ }
342
+ return this.map;
343
+ }
344
+ }
345
+ //# sourceMappingURL=body-key.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"body-key.js","sourceRoot":"","sources":["../../../../../src/serialization/beast2/v5/body-key.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,kCAAkC;AAClC,MAAM,KAAK,GAAG,UAAU,CAAC;AACzB,MAAM,KAAK,GAAG,UAAU,CAAC;AACzB,MAAM,KAAK,GAAG,UAAU,CAAC;AACzB,MAAM,KAAK,GAAG,UAAU,CAAC;AAEzB,6EAA6E;AAC7E,MAAM,EAAE,GAAG,UAAU,CAAC;AACtB,MAAM,EAAE,GAAG,UAAU,CAAC;AACtB,MAAM,EAAE,GAAG,UAAU,CAAC;AACtB,MAAM,EAAE,GAAG,UAAU,CAAC;AAEtB,4FAA4F;AAC5F,MAAM,SAAS,GAAG,KAAK,CAAC;AAExB,6CAA6C;AAC7C,SAAS,IAAI,CAAC,KAAkB,EAAE,EAAU,EAAE,CAAS;IACrD,IAAI,CAAC,GAAG,KAAK,CAAC,EAAE,CAAE,GAAG,CAAC,CAAC;IACvB,KAAK,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;IAClD,CAAC,GAAG,KAAK,CAAC,EAAE,GAAG,CAAC,CAAE,GAAG,CAAC,CAAC;IACvB,KAAK,CAAC,EAAE,GAAG,CAAC,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,CAAC,EAAE,EAAE,CA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AAC,IAAI,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC,CAAC;QACzC,OAAO,EAAE,GAAG,IAAI,CAAC,MAAM,CAAC;IAC1B,CAAC;IAED,+FAA+F;IACvF,QAAQ;QACd,IAAI,IAAI,CAAC,GAAG,KAAK,SAAS,EAAE,CAAC;YAC3B,IAAI,CAAC,GAAG,GAAG,IAAI,WAAW,CAAC,CAAC,CAAC,CAAC;YAC9B,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC;YAClB,qEAAqE;YACrE,IAAI,EAAE,GAAG,IAAI,CAAC,OAAO,CAAC;YACtB,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,EAAE,CAAE,GAAG,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,4BAA4B,CAAC,CAAC;YACzE,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,EAAE,CAAE,GAAG,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,2BAA2B,CAAC,CAAC;YACxE,SAAS,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,EAAE,IAAI,CAAC,KAAK,EAAE,EAAE,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC;QACnD,CAAC;QACD,OAAO,IAAI,CAAC,GAAG,CAAC;IAClB,CAAC;CACF"}
@@ -44,6 +44,7 @@ import { BufferWriter, BufferReader } from "../../binary-utils.js";
44
44
  import { SourceMap } from "../../../location.js";
45
45
  import { type Beast2DecodeOptions, type PlatformDecodeContext } from "../shared.js";
46
46
  import { type Beast2Codec } from "./frames.js";
47
+ import { BodyKeys, type IrKey } from "./body-key.js";
47
48
  /** The v5 container magic: the beast2 magic with version byte 0x05. */
48
49
  export declare const MAGIC_BYTES_V5: Uint8Array<ArrayBuffer>;
49
50
  /** Container tag: defines a new mutable container at this position. */
@@ -93,6 +94,14 @@ export interface V5DecodeContext extends PlatformDecodeContext {
93
94
  * serve frozen and mutable decodes alike. Cleared around Function capture
94
95
  * decoding — a closure owns its own state. */
95
96
  frozen: boolean;
97
+ /** What the decode keys each function by, its content, so that functions
98
+ * over one body share one compiled body (#1353). A whole-value decode
99
+ * keys them; where it is absent (a segment reader), each function
100
+ * compiles on its own. */
101
+ bodyKeys?: BodyKeys;
102
+ /** The key of the function IR being read, told of each container it
103
+ * defines, back-references and closes; `null` between IRs. */
104
+ irKey?: IrKey | null;
96
105
  }
97
106
  /**
98
107
  * Writes the v5 source_map_section: `varint(payload_len)` + `varint(count)` +
@@ -1 +1 @@
1
- {"version":3,"file":"codec.d.ts","sourceRoot":"","sources":["../../../../../src/serialization/beast2/v5/codec.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AAEH,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAC9D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAOlD,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAKnE,OAAO,EAAE,SAAS,EAAiB,MAAM,sBAAsB,CAAC;AAChE,OAAO,EAAE,KAAK,mBAAmB,EAAE,KAAK,qBAAqB,EAAgG,MAAM,cAAc,CAAC;AAElL,OAAO,EAAE,KAAK,WAAW,EAAgE,MAAM,aAAa,CAAC;AAM7G,uEAAuE;AACvE,eAAO,MAAM,cAAc,yBAAmE,CAAC;AAE/F,uEAAuE;AACvE,eAAO,MAAM,OAAO,IAAO,CAAC;AAC5B,+EAA+E;AAC/E,eAAO,MAAM,OAAO,IAAO,CAAC;AAM5B,uDAAuD;AACvD,MAAM,WAAW,eAAe;IAC9B;iFAC6E;IAC7E,cAAc,EAAE,GAAG,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC;IACjC,sEAAsE;IACtE,cAAc,EAAE,MAAM,CAAC;IACvB;gEAC4D;IAC5D,cAAc,EAAE,MAAM,CAAC;IACvB,uDAAuD;IACv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