fastdb4ts 0.0.3 → 0.2.1
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/README.md +65 -14
- package/dist/LICENSE +21 -0
- package/dist/THIRD_PARTY_NOTICES.txt +1958 -0
- package/dist/feature.js +1 -0
- package/dist/index.d.ts +0 -2
- package/dist/index.js +0 -1
- package/dist/orm.d.ts +0 -1
- package/dist/orm.js +2 -9
- package/dist/payload/abi.d.ts +27 -0
- package/dist/payload/abi.js +160 -0
- package/dist/payload/builder.d.ts +98 -0
- package/dist/payload/builder.js +364 -0
- package/dist/payload/codegen.d.ts +43 -0
- package/dist/payload/codegen.js +182 -0
- package/dist/payload/error.d.ts +9 -0
- package/dist/payload/error.js +53 -0
- package/dist/payload/index.d.ts +9 -0
- package/dist/payload/index.js +9 -0
- package/dist/payload/runtime.d.ts +195 -0
- package/dist/payload/runtime.js +756 -0
- package/dist/payload/spec.d.ts +44 -0
- package/dist/payload/spec.js +220 -0
- package/dist/schema.js +1 -0
- package/dist/serializer.js +1 -0
- package/dist/wasm/fastdb4ts.js +1 -1
- package/dist/wasm/fastdb4ts.wasm +0 -0
- package/dist/wasm-loader.d.ts +134 -1
- package/package.json +6 -2
- package/dist/call-db.d.ts +0 -117
- package/dist/call-db.js +0 -1857
|
@@ -0,0 +1,756 @@
|
|
|
1
|
+
import { POINTER_SIZE, SHA256_SIZE, checkedU32, checkedU64, copyBytes, f32FromBits, f64FromBits, payloadModule, readU32, readU64, withAllocation, withInputBytes, withSha256, writeU32, writeU64, } from './abi.js';
|
|
2
|
+
import { buildPlanHandle } from './builder.js';
|
|
3
|
+
import { bindingError, checkStatus } from './error.js';
|
|
4
|
+
import { Profile, compiledSpecHandle } from './spec.js';
|
|
5
|
+
const OPEN_OPTIONS_SIZE = 112;
|
|
6
|
+
const EXECUTION_REPORT_SIZE = 72;
|
|
7
|
+
const EXECUTION_REPORT_OFFSET = 8;
|
|
8
|
+
const EXECUTION_ERROR_OFFSET = EXECUTION_REPORT_OFFSET + EXECUTION_REPORT_SIZE;
|
|
9
|
+
const EXECUTION_OUTPUT_SIZE = EXECUTION_ERROR_OFFSET + POINTER_SIZE;
|
|
10
|
+
export var BuildPolicy;
|
|
11
|
+
(function (BuildPolicy) {
|
|
12
|
+
BuildPolicy[BuildPolicy["AllowStaging"] = 1] = "AllowStaging";
|
|
13
|
+
BuildPolicy[BuildPolicy["RequireDirect"] = 2] = "RequireDirect";
|
|
14
|
+
})(BuildPolicy || (BuildPolicy = {}));
|
|
15
|
+
export var ExecutionMode;
|
|
16
|
+
(function (ExecutionMode) {
|
|
17
|
+
ExecutionMode[ExecutionMode["Direct"] = 1] = "Direct";
|
|
18
|
+
ExecutionMode[ExecutionMode["Staged"] = 2] = "Staged";
|
|
19
|
+
})(ExecutionMode || (ExecutionMode = {}));
|
|
20
|
+
export var FallbackReason;
|
|
21
|
+
(function (FallbackReason) {
|
|
22
|
+
FallbackReason[FallbackReason["None"] = 0] = "None";
|
|
23
|
+
FallbackReason[FallbackReason["PlanRequiresStaging"] = 1] = "PlanRequiresStaging";
|
|
24
|
+
FallbackReason[FallbackReason["BackingDeclinedDirect"] = 2] = "BackingDeclinedDirect";
|
|
25
|
+
})(FallbackReason || (FallbackReason = {}));
|
|
26
|
+
export var ViewKind;
|
|
27
|
+
(function (ViewKind) {
|
|
28
|
+
ViewKind[ViewKind["Sequence"] = 1] = "Sequence";
|
|
29
|
+
ViewKind[ViewKind["Bool"] = 2] = "Bool";
|
|
30
|
+
ViewKind[ViewKind["U8"] = 3] = "U8";
|
|
31
|
+
ViewKind[ViewKind["U16"] = 4] = "U16";
|
|
32
|
+
ViewKind[ViewKind["U32"] = 5] = "U32";
|
|
33
|
+
ViewKind[ViewKind["I32"] = 6] = "I32";
|
|
34
|
+
ViewKind[ViewKind["U8n"] = 7] = "U8n";
|
|
35
|
+
ViewKind[ViewKind["U16n"] = 8] = "U16n";
|
|
36
|
+
ViewKind[ViewKind["F32"] = 9] = "F32";
|
|
37
|
+
ViewKind[ViewKind["F64"] = 10] = "F64";
|
|
38
|
+
ViewKind[ViewKind["Str"] = 11] = "Str";
|
|
39
|
+
ViewKind[ViewKind["Wstr"] = 12] = "Wstr";
|
|
40
|
+
ViewKind[ViewKind["Bytes"] = 13] = "Bytes";
|
|
41
|
+
ViewKind[ViewKind["Component"] = 14] = "Component";
|
|
42
|
+
ViewKind[ViewKind["List"] = 15] = "List";
|
|
43
|
+
ViewKind[ViewKind["Ref"] = 16] = "Ref";
|
|
44
|
+
})(ViewKind || (ViewKind = {}));
|
|
45
|
+
/** Core identity coordinates meaningful only within one payload owner. */
|
|
46
|
+
export class GraphIdentity {
|
|
47
|
+
componentIndex;
|
|
48
|
+
objectId;
|
|
49
|
+
constructor(componentIndex, objectId) {
|
|
50
|
+
this.componentIndex = componentIndex;
|
|
51
|
+
this.objectId = objectId;
|
|
52
|
+
Object.freeze(this);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
export class ExecutionReport {
|
|
56
|
+
mode;
|
|
57
|
+
fallbackReason;
|
|
58
|
+
requestedBytes;
|
|
59
|
+
usedBytes;
|
|
60
|
+
stagingBytes;
|
|
61
|
+
regionCount;
|
|
62
|
+
backingCapacity;
|
|
63
|
+
constructor(mode, fallbackReason, requestedBytes, usedBytes, stagingBytes, regionCount, backingCapacity) {
|
|
64
|
+
this.mode = mode;
|
|
65
|
+
this.fallbackReason = fallbackReason;
|
|
66
|
+
this.requestedBytes = requestedBytes;
|
|
67
|
+
this.usedBytes = usedBytes;
|
|
68
|
+
this.stagingBytes = stagingBytes;
|
|
69
|
+
this.regionCount = regionCount;
|
|
70
|
+
this.backingCapacity = backingCapacity;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
export class OpenOptions {
|
|
74
|
+
values;
|
|
75
|
+
constructor(values = {}) {
|
|
76
|
+
this.values = Object.freeze({ ...values });
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
const testingBackingToken = Symbol('fastdb.payload.testingBackingToken');
|
|
80
|
+
const createTestingBacking = Symbol('fastdb.payload.createTestingBacking');
|
|
81
|
+
const backingHandleValue = Symbol('fastdb.payload.backingHandleValue');
|
|
82
|
+
const backingFinalizer = new FinalizationRegistry((handle) => {
|
|
83
|
+
try {
|
|
84
|
+
handle.delete();
|
|
85
|
+
}
|
|
86
|
+
catch {
|
|
87
|
+
// Explicit disposal is authoritative; finalization is only a fallback.
|
|
88
|
+
}
|
|
89
|
+
});
|
|
90
|
+
export class WasmMemoryBacking {
|
|
91
|
+
#native;
|
|
92
|
+
#finalizerToken = {};
|
|
93
|
+
constructor(options = {}) {
|
|
94
|
+
if (options.allowDirect !== undefined &&
|
|
95
|
+
typeof options.allowDirect !== 'boolean') {
|
|
96
|
+
throw new TypeError('allowDirect must be boolean');
|
|
97
|
+
}
|
|
98
|
+
this.#native = new (payloadModule().WxPayloadBacking)(options.allowDirect ?? true, false, false);
|
|
99
|
+
backingFinalizer.register(this, this.#native, this.#finalizerToken);
|
|
100
|
+
}
|
|
101
|
+
static [createTestingBacking](options, token) {
|
|
102
|
+
if (token !== testingBackingToken) {
|
|
103
|
+
throw new TypeError('testing backings are created only by FastDB tests');
|
|
104
|
+
}
|
|
105
|
+
const backing = new WasmMemoryBacking({
|
|
106
|
+
allowDirect: options.allowDirect,
|
|
107
|
+
});
|
|
108
|
+
backing.replaceNative(options.allowDirect ?? true, options.failWrite === true, options.failCommit === true);
|
|
109
|
+
return backing;
|
|
110
|
+
}
|
|
111
|
+
stats() {
|
|
112
|
+
const raw = this.requireNative().stats();
|
|
113
|
+
return {
|
|
114
|
+
reservations: raw.reservations,
|
|
115
|
+
writes: raw.writes,
|
|
116
|
+
commits: raw.commits,
|
|
117
|
+
rollbacks: raw.rollbacks,
|
|
118
|
+
retains: raw.retains,
|
|
119
|
+
releases: raw.releases,
|
|
120
|
+
};
|
|
121
|
+
}
|
|
122
|
+
dispose() {
|
|
123
|
+
if (this.#native !== null) {
|
|
124
|
+
const native = this.#native;
|
|
125
|
+
this.#native = null;
|
|
126
|
+
backingFinalizer.unregister(this.#finalizerToken);
|
|
127
|
+
native.delete();
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
/** @internal */
|
|
131
|
+
[backingHandleValue]() {
|
|
132
|
+
return this.requireNative();
|
|
133
|
+
}
|
|
134
|
+
requireNative() {
|
|
135
|
+
if (this.#native === null) {
|
|
136
|
+
throw bindingError('WasmMemoryBacking is disposed', 'disposed_handle');
|
|
137
|
+
}
|
|
138
|
+
return this.#native;
|
|
139
|
+
}
|
|
140
|
+
replaceNative(allowDirect, failWrite, failCommit) {
|
|
141
|
+
const previous = this.requireNative();
|
|
142
|
+
const replacement = new (payloadModule().WxPayloadBacking)(allowDirect, failWrite, failCommit);
|
|
143
|
+
backingFinalizer.unregister(this.#finalizerToken);
|
|
144
|
+
previous.delete();
|
|
145
|
+
this.#native = replacement;
|
|
146
|
+
backingFinalizer.register(this, this.#native, this.#finalizerToken);
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
export function __testingWasmMemoryBacking(options) {
|
|
150
|
+
return WasmMemoryBacking[createTestingBacking](options, testingBackingToken);
|
|
151
|
+
}
|
|
152
|
+
const ownedBytesHandleValue = Symbol('fastdb.payload.ownedBytesHandleValue');
|
|
153
|
+
const ownedBytesConstructionToken = Symbol('fastdb.payload.ownedBytesConstructionToken');
|
|
154
|
+
const ownedBytesFinalizer = new FinalizationRegistry((handle) => {
|
|
155
|
+
try {
|
|
156
|
+
handle.delete();
|
|
157
|
+
}
|
|
158
|
+
catch {
|
|
159
|
+
// Explicit disposal is authoritative; finalization is only a fallback.
|
|
160
|
+
}
|
|
161
|
+
});
|
|
162
|
+
export class WasmOwnedBytes {
|
|
163
|
+
#native;
|
|
164
|
+
#finalizerToken = {};
|
|
165
|
+
constructor(native, token) {
|
|
166
|
+
if (token !== ownedBytesConstructionToken) {
|
|
167
|
+
throw new TypeError('WasmOwnedBytes values are created only by FastDB');
|
|
168
|
+
}
|
|
169
|
+
this.#native = native;
|
|
170
|
+
ownedBytesFinalizer.register(this, native, this.#finalizerToken);
|
|
171
|
+
}
|
|
172
|
+
static copyFrom(source) {
|
|
173
|
+
if (!(source instanceof Uint8Array)) {
|
|
174
|
+
throw new TypeError('source must be Uint8Array');
|
|
175
|
+
}
|
|
176
|
+
const module = payloadModule();
|
|
177
|
+
return withInputBytes(module, source, (pointer) => new WasmOwnedBytes(new module.WxPayloadOwnedBytes(pointer, source.byteLength), ownedBytesConstructionToken));
|
|
178
|
+
}
|
|
179
|
+
dispose() {
|
|
180
|
+
if (this.#native !== null) {
|
|
181
|
+
const native = this.#native;
|
|
182
|
+
this.#native = null;
|
|
183
|
+
ownedBytesFinalizer.unregister(this.#finalizerToken);
|
|
184
|
+
native.delete();
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
/** @internal */
|
|
188
|
+
[ownedBytesHandleValue]() {
|
|
189
|
+
if (this.#native === null) {
|
|
190
|
+
throw bindingError('WasmOwnedBytes is disposed', 'disposed_handle');
|
|
191
|
+
}
|
|
192
|
+
return this.#native;
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
const payloadConstructionToken = Symbol('fastdb.payload.payloadConstructionToken');
|
|
196
|
+
const createPayload = Symbol('fastdb.payload.createPayload');
|
|
197
|
+
const SPAN_SIZE_OFFSET = 8;
|
|
198
|
+
const SPAN_ERROR_OFFSET = 16;
|
|
199
|
+
const SPAN_OUTPUT_SIZE = SPAN_ERROR_OFFSET + POINTER_SIZE;
|
|
200
|
+
// `ignoreBOM: true` makes a leading U+FEFF ordinary user content instead of
|
|
201
|
+
// silently stripping it; FastDB Core already owns encoding validation.
|
|
202
|
+
const utf8Decoder = new TextDecoder('utf-8', {
|
|
203
|
+
fatal: true,
|
|
204
|
+
ignoreBOM: true,
|
|
205
|
+
});
|
|
206
|
+
const utf16Decoder = new TextDecoder('utf-16le', {
|
|
207
|
+
fatal: true,
|
|
208
|
+
ignoreBOM: true,
|
|
209
|
+
});
|
|
210
|
+
const accessConstructionToken = Symbol('fastdb.payload.accessConstructionToken');
|
|
211
|
+
const createAccess = Symbol('fastdb.payload.createAccess');
|
|
212
|
+
const accessFinalizer = new FinalizationRegistry((handle) => {
|
|
213
|
+
try {
|
|
214
|
+
payloadModule()._fdb_payload_v1_access_release(handle);
|
|
215
|
+
}
|
|
216
|
+
catch {
|
|
217
|
+
// Explicit disposal is authoritative; finalization is only a fallback.
|
|
218
|
+
}
|
|
219
|
+
});
|
|
220
|
+
/** A unique Core access pin. Safe methods always return JavaScript-owned copies. */
|
|
221
|
+
export class Access {
|
|
222
|
+
#handle;
|
|
223
|
+
#finalizerToken = {};
|
|
224
|
+
constructor(handle, token) {
|
|
225
|
+
if (token !== accessConstructionToken) {
|
|
226
|
+
throw new TypeError('Access handles are created only by FastDB');
|
|
227
|
+
}
|
|
228
|
+
if (handle === 0) {
|
|
229
|
+
throw bindingError('FastDB Core returned success without an access pin', 'missing_access_handle');
|
|
230
|
+
}
|
|
231
|
+
this.#handle = handle;
|
|
232
|
+
accessFinalizer.register(this, handle, this.#finalizerToken);
|
|
233
|
+
}
|
|
234
|
+
static [createAccess](handle, token) {
|
|
235
|
+
if (token !== accessConstructionToken) {
|
|
236
|
+
throw new TypeError('Access handles are created only by FastDB');
|
|
237
|
+
}
|
|
238
|
+
try {
|
|
239
|
+
return new Access(handle, accessConstructionToken);
|
|
240
|
+
}
|
|
241
|
+
catch (error) {
|
|
242
|
+
if (handle !== 0) {
|
|
243
|
+
payloadModule()._fdb_payload_v1_access_release(handle);
|
|
244
|
+
}
|
|
245
|
+
throw error;
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
dispose() {
|
|
249
|
+
if (this.#handle !== 0) {
|
|
250
|
+
const handle = this.#handle;
|
|
251
|
+
this.#handle = 0;
|
|
252
|
+
accessFinalizer.unregister(this.#finalizerToken);
|
|
253
|
+
payloadModule()._fdb_payload_v1_access_release(handle);
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
payloadBytes() {
|
|
257
|
+
const module = payloadModule();
|
|
258
|
+
return this.copyByteSpan((access, data, size, error) => module._fdb_payload_v1_access_payload_bytes(access, data, size, error));
|
|
259
|
+
}
|
|
260
|
+
str() {
|
|
261
|
+
const module = payloadModule();
|
|
262
|
+
const bytes = this.copyByteSpan((access, data, size, error) => module._fdb_payload_v1_access_str(access, data, size, error));
|
|
263
|
+
try {
|
|
264
|
+
return utf8Decoder.decode(bytes);
|
|
265
|
+
}
|
|
266
|
+
catch (error) {
|
|
267
|
+
throw bindingError('FastDB Core returned invalid UTF-8 from a validated str view', 'invalid_core_utf8');
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
wstr() {
|
|
271
|
+
const module = payloadModule();
|
|
272
|
+
const bytes = withAllocation(module, SPAN_OUTPUT_SIZE, (outputs) => {
|
|
273
|
+
const status = module._fdb_payload_v1_access_wstr(this.requireHandle(), outputs, outputs + SPAN_SIZE_OFFSET, outputs + SPAN_ERROR_OFFSET);
|
|
274
|
+
checkStatus(status, outputs + SPAN_ERROR_OFFSET);
|
|
275
|
+
const units = readU64(module, outputs + SPAN_SIZE_OFFSET);
|
|
276
|
+
if (units > BigInt(Number.MAX_SAFE_INTEGER) / 2n) {
|
|
277
|
+
throw bindingError('FastDB Core wstr span exceeds the JavaScript address space', 'host_size_overflow');
|
|
278
|
+
}
|
|
279
|
+
const data = readU32(module, outputs);
|
|
280
|
+
if (units !== 0n && data % 2 !== 0) {
|
|
281
|
+
throw bindingError('FastDB Core returned unaligned wstr storage', 'invalid_core_wstr_span');
|
|
282
|
+
}
|
|
283
|
+
return copyBytes(module, data, units * 2n);
|
|
284
|
+
});
|
|
285
|
+
try {
|
|
286
|
+
// wasm32 is little-endian; Core already projected aligned host uint16s.
|
|
287
|
+
return utf16Decoder.decode(bytes);
|
|
288
|
+
}
|
|
289
|
+
catch (error) {
|
|
290
|
+
throw bindingError('FastDB Core returned invalid UTF-16 from a validated wstr view', 'invalid_core_utf16');
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
bytes() {
|
|
294
|
+
const module = payloadModule();
|
|
295
|
+
return this.copyByteSpan((access, data, size, error) => module._fdb_payload_v1_access_bytes(access, data, size, error));
|
|
296
|
+
}
|
|
297
|
+
copyByteSpan(call) {
|
|
298
|
+
const module = payloadModule();
|
|
299
|
+
return withAllocation(module, SPAN_OUTPUT_SIZE, (outputs) => {
|
|
300
|
+
const status = call(this.requireHandle(), outputs, outputs + SPAN_SIZE_OFFSET, outputs + SPAN_ERROR_OFFSET);
|
|
301
|
+
checkStatus(status, outputs + SPAN_ERROR_OFFSET);
|
|
302
|
+
return copyBytes(module, readU32(module, outputs), readU64(module, outputs + SPAN_SIZE_OFFSET));
|
|
303
|
+
});
|
|
304
|
+
}
|
|
305
|
+
requireHandle() {
|
|
306
|
+
if (this.#handle === 0) {
|
|
307
|
+
throw bindingError('Access is disposed', 'disposed_handle');
|
|
308
|
+
}
|
|
309
|
+
return this.#handle;
|
|
310
|
+
}
|
|
311
|
+
}
|
|
312
|
+
const viewConstructionToken = Symbol('fastdb.payload.viewConstructionToken');
|
|
313
|
+
const createView = Symbol('fastdb.payload.createView');
|
|
314
|
+
const viewFinalizer = new FinalizationRegistry((handle) => {
|
|
315
|
+
try {
|
|
316
|
+
payloadModule()._fdb_payload_v1_view_release(handle);
|
|
317
|
+
}
|
|
318
|
+
catch {
|
|
319
|
+
// Explicit disposal is authoritative; finalization is only a fallback.
|
|
320
|
+
}
|
|
321
|
+
});
|
|
322
|
+
/** A retainable immutable Core view with generation-checked operations. */
|
|
323
|
+
export class View {
|
|
324
|
+
#handle;
|
|
325
|
+
#finalizerToken = {};
|
|
326
|
+
constructor(handle, token) {
|
|
327
|
+
if (token !== viewConstructionToken) {
|
|
328
|
+
throw new TypeError('View handles are created only by FastDB');
|
|
329
|
+
}
|
|
330
|
+
if (handle === 0) {
|
|
331
|
+
throw bindingError('FastDB Core returned success without a view', 'missing_view_handle');
|
|
332
|
+
}
|
|
333
|
+
this.#handle = handle;
|
|
334
|
+
viewFinalizer.register(this, handle, this.#finalizerToken);
|
|
335
|
+
}
|
|
336
|
+
static [createView](handle, token) {
|
|
337
|
+
if (token !== viewConstructionToken) {
|
|
338
|
+
throw new TypeError('View handles are created only by FastDB');
|
|
339
|
+
}
|
|
340
|
+
try {
|
|
341
|
+
return new View(handle, viewConstructionToken);
|
|
342
|
+
}
|
|
343
|
+
catch (error) {
|
|
344
|
+
if (handle !== 0) {
|
|
345
|
+
payloadModule()._fdb_payload_v1_view_release(handle);
|
|
346
|
+
}
|
|
347
|
+
throw error;
|
|
348
|
+
}
|
|
349
|
+
}
|
|
350
|
+
clone() {
|
|
351
|
+
const handle = this.requireHandle();
|
|
352
|
+
payloadModule()._fdb_payload_v1_view_retain(handle);
|
|
353
|
+
return View[createView](handle, viewConstructionToken);
|
|
354
|
+
}
|
|
355
|
+
dispose() {
|
|
356
|
+
if (this.#handle !== 0) {
|
|
357
|
+
const handle = this.#handle;
|
|
358
|
+
this.#handle = 0;
|
|
359
|
+
viewFinalizer.unregister(this.#finalizerToken);
|
|
360
|
+
payloadModule()._fdb_payload_v1_view_release(handle);
|
|
361
|
+
}
|
|
362
|
+
}
|
|
363
|
+
requireSpecSha256(expectedSha256) {
|
|
364
|
+
const module = payloadModule();
|
|
365
|
+
withSha256(module, expectedSha256, (digest) => withAllocation(module, POINTER_SIZE, (error) => {
|
|
366
|
+
const status = module._fdb_payload_v1_view_require_spec_sha256(this.requireHandle(), digest, error);
|
|
367
|
+
checkStatus(status, error);
|
|
368
|
+
}));
|
|
369
|
+
}
|
|
370
|
+
kind() {
|
|
371
|
+
const value = this.readU32((view, output, error) => payloadModule()._fdb_payload_v1_view_kind(view, output, error));
|
|
372
|
+
if (value < ViewKind.Sequence || value > ViewKind.Ref) {
|
|
373
|
+
throw bindingError('FastDB Core returned an unknown payload view kind', 'unknown_view_kind');
|
|
374
|
+
}
|
|
375
|
+
return value;
|
|
376
|
+
}
|
|
377
|
+
isNull() {
|
|
378
|
+
return (this.readU8((view, output, error) => payloadModule()._fdb_payload_v1_view_is_null(view, output, error)) !== 0);
|
|
379
|
+
}
|
|
380
|
+
length() {
|
|
381
|
+
return this.readU64((view, output, error) => payloadModule()._fdb_payload_v1_view_length(view, output, error));
|
|
382
|
+
}
|
|
383
|
+
at(index) {
|
|
384
|
+
const module = payloadModule();
|
|
385
|
+
return withAllocation(module, POINTER_SIZE * 2, (outputs) => {
|
|
386
|
+
const status = module._fdb_payload_v1_view_at(this.requireHandle(), checkedU64(index, 'index'), outputs, outputs + POINTER_SIZE);
|
|
387
|
+
checkStatus(status, outputs + POINTER_SIZE);
|
|
388
|
+
return View[createView](readU32(module, outputs), viewConstructionToken);
|
|
389
|
+
});
|
|
390
|
+
}
|
|
391
|
+
componentIndex() {
|
|
392
|
+
return this.readU32((view, output, error) => payloadModule()._fdb_payload_v1_view_component_index(view, output, error));
|
|
393
|
+
}
|
|
394
|
+
fieldCount() {
|
|
395
|
+
return this.readU32((view, output, error) => payloadModule()._fdb_payload_v1_view_field_count(view, output, error));
|
|
396
|
+
}
|
|
397
|
+
field(index) {
|
|
398
|
+
const module = payloadModule();
|
|
399
|
+
return withAllocation(module, POINTER_SIZE * 2, (outputs) => {
|
|
400
|
+
const status = module._fdb_payload_v1_view_field(this.requireHandle(), checkedU32(index, 'index'), outputs, outputs + POINTER_SIZE);
|
|
401
|
+
checkStatus(status, outputs + POINTER_SIZE);
|
|
402
|
+
return View[createView](readU32(module, outputs), viewConstructionToken);
|
|
403
|
+
});
|
|
404
|
+
}
|
|
405
|
+
/** Follow exactly one explicit Core ref edge. */
|
|
406
|
+
refTarget() {
|
|
407
|
+
const module = payloadModule();
|
|
408
|
+
return withAllocation(module, POINTER_SIZE * 2, (outputs) => {
|
|
409
|
+
const status = module._fdb_payload_v1_view_ref_target(this.requireHandle(), outputs, outputs + POINTER_SIZE);
|
|
410
|
+
checkStatus(status, outputs + POINTER_SIZE);
|
|
411
|
+
return View[createView](readU32(module, outputs), viewConstructionToken);
|
|
412
|
+
});
|
|
413
|
+
}
|
|
414
|
+
/** Return Core coordinates meaningful only within this payload owner. */
|
|
415
|
+
graphIdentity() {
|
|
416
|
+
const module = payloadModule();
|
|
417
|
+
return withAllocation(module, 16 + POINTER_SIZE, (outputs) => {
|
|
418
|
+
const status = module._fdb_payload_v1_view_graph_identity(this.requireHandle(), outputs, outputs + 8, outputs + 16);
|
|
419
|
+
checkStatus(status, outputs + 16);
|
|
420
|
+
return new GraphIdentity(readU32(module, outputs), readU64(module, outputs + 8));
|
|
421
|
+
});
|
|
422
|
+
}
|
|
423
|
+
getBool() {
|
|
424
|
+
return (this.readU8((view, output, error) => payloadModule()._fdb_payload_v1_view_get_bool(view, output, error)) !== 0);
|
|
425
|
+
}
|
|
426
|
+
getU8() {
|
|
427
|
+
return this.readU8((view, output, error) => payloadModule()._fdb_payload_v1_view_get_u8(view, output, error));
|
|
428
|
+
}
|
|
429
|
+
getU16() {
|
|
430
|
+
return this.readU16((view, output, error) => payloadModule()._fdb_payload_v1_view_get_u16(view, output, error));
|
|
431
|
+
}
|
|
432
|
+
getU32() {
|
|
433
|
+
return this.readU32((view, output, error) => payloadModule()._fdb_payload_v1_view_get_u32(view, output, error));
|
|
434
|
+
}
|
|
435
|
+
getI32() {
|
|
436
|
+
const module = payloadModule();
|
|
437
|
+
return withAllocation(module, POINTER_SIZE * 2, (outputs) => {
|
|
438
|
+
const status = module._fdb_payload_v1_view_get_i32(this.requireHandle(), outputs, outputs + POINTER_SIZE);
|
|
439
|
+
checkStatus(status, outputs + POINTER_SIZE);
|
|
440
|
+
return new DataView(module.HEAPU8.buffer).getInt32(outputs, true);
|
|
441
|
+
});
|
|
442
|
+
}
|
|
443
|
+
getU8nF64Bits() {
|
|
444
|
+
return this.readU64((view, output, error) => payloadModule()._fdb_payload_v1_view_get_u8n_f64_bits(view, output, error));
|
|
445
|
+
}
|
|
446
|
+
getU8n() {
|
|
447
|
+
return f64FromBits(this.getU8nF64Bits());
|
|
448
|
+
}
|
|
449
|
+
getU16nF64Bits() {
|
|
450
|
+
return this.readU64((view, output, error) => payloadModule()._fdb_payload_v1_view_get_u16n_f64_bits(view, output, error));
|
|
451
|
+
}
|
|
452
|
+
getU16n() {
|
|
453
|
+
return f64FromBits(this.getU16nF64Bits());
|
|
454
|
+
}
|
|
455
|
+
getF32Bits() {
|
|
456
|
+
return this.readU32((view, output, error) => payloadModule()._fdb_payload_v1_view_get_f32_bits(view, output, error));
|
|
457
|
+
}
|
|
458
|
+
getF32() {
|
|
459
|
+
return f32FromBits(this.getF32Bits());
|
|
460
|
+
}
|
|
461
|
+
getF64Bits() {
|
|
462
|
+
return this.readU64((view, output, error) => payloadModule()._fdb_payload_v1_view_get_f64_bits(view, output, error));
|
|
463
|
+
}
|
|
464
|
+
getF64() {
|
|
465
|
+
return f64FromBits(this.getF64Bits());
|
|
466
|
+
}
|
|
467
|
+
acquire() {
|
|
468
|
+
const module = payloadModule();
|
|
469
|
+
return withAllocation(module, POINTER_SIZE * 2, (outputs) => {
|
|
470
|
+
const status = module._fdb_payload_v1_view_acquire(this.requireHandle(), outputs, outputs + POINTER_SIZE);
|
|
471
|
+
checkStatus(status, outputs + POINTER_SIZE);
|
|
472
|
+
return Access[createAccess](readU32(module, outputs), accessConstructionToken);
|
|
473
|
+
});
|
|
474
|
+
}
|
|
475
|
+
/** Performs exactly one Core materialization call. */
|
|
476
|
+
materialize() {
|
|
477
|
+
const module = payloadModule();
|
|
478
|
+
return withAllocation(module, POINTER_SIZE * 2, (outputs) => {
|
|
479
|
+
const status = module._fdb_payload_v1_view_materialize(this.requireHandle(), outputs, outputs + POINTER_SIZE);
|
|
480
|
+
checkStatus(status, outputs + POINTER_SIZE);
|
|
481
|
+
return View[createView](readU32(module, outputs), viewConstructionToken);
|
|
482
|
+
});
|
|
483
|
+
}
|
|
484
|
+
readU8(call) {
|
|
485
|
+
const module = payloadModule();
|
|
486
|
+
return withAllocation(module, POINTER_SIZE * 2, (outputs) => {
|
|
487
|
+
const status = call(this.requireHandle(), outputs, outputs + POINTER_SIZE);
|
|
488
|
+
checkStatus(status, outputs + POINTER_SIZE);
|
|
489
|
+
return module.HEAPU8[outputs];
|
|
490
|
+
});
|
|
491
|
+
}
|
|
492
|
+
readU16(call) {
|
|
493
|
+
const module = payloadModule();
|
|
494
|
+
return withAllocation(module, POINTER_SIZE * 2, (outputs) => {
|
|
495
|
+
const status = call(this.requireHandle(), outputs, outputs + POINTER_SIZE);
|
|
496
|
+
checkStatus(status, outputs + POINTER_SIZE);
|
|
497
|
+
return new DataView(module.HEAPU8.buffer).getUint16(outputs, true);
|
|
498
|
+
});
|
|
499
|
+
}
|
|
500
|
+
readU32(call) {
|
|
501
|
+
const module = payloadModule();
|
|
502
|
+
return withAllocation(module, POINTER_SIZE * 2, (outputs) => {
|
|
503
|
+
const status = call(this.requireHandle(), outputs, outputs + POINTER_SIZE);
|
|
504
|
+
checkStatus(status, outputs + POINTER_SIZE);
|
|
505
|
+
return readU32(module, outputs);
|
|
506
|
+
});
|
|
507
|
+
}
|
|
508
|
+
readU64(call) {
|
|
509
|
+
const module = payloadModule();
|
|
510
|
+
return withAllocation(module, 8 + POINTER_SIZE, (outputs) => {
|
|
511
|
+
const status = call(this.requireHandle(), outputs, outputs + 8);
|
|
512
|
+
checkStatus(status, outputs + 8);
|
|
513
|
+
return readU64(module, outputs);
|
|
514
|
+
});
|
|
515
|
+
}
|
|
516
|
+
requireHandle() {
|
|
517
|
+
if (this.#handle === 0) {
|
|
518
|
+
throw bindingError('View is disposed', 'disposed_handle');
|
|
519
|
+
}
|
|
520
|
+
return this.#handle;
|
|
521
|
+
}
|
|
522
|
+
}
|
|
523
|
+
const payloadFinalizer = new FinalizationRegistry((handle) => {
|
|
524
|
+
try {
|
|
525
|
+
payloadModule()._fdb_payload_v1_payload_release(handle);
|
|
526
|
+
}
|
|
527
|
+
catch {
|
|
528
|
+
// Explicit disposal is authoritative; finalization is only a fallback.
|
|
529
|
+
}
|
|
530
|
+
});
|
|
531
|
+
export class Payload {
|
|
532
|
+
#handle;
|
|
533
|
+
#keeper;
|
|
534
|
+
#finalizerToken = {};
|
|
535
|
+
constructor(handle, token, keeper) {
|
|
536
|
+
if (token !== payloadConstructionToken) {
|
|
537
|
+
throw new TypeError('Payload handles are created only by FastDB');
|
|
538
|
+
}
|
|
539
|
+
if (handle === 0) {
|
|
540
|
+
throw bindingError('FastDB Core returned success without a payload', 'missing_payload_handle');
|
|
541
|
+
}
|
|
542
|
+
this.#handle = handle;
|
|
543
|
+
this.#keeper = keeper;
|
|
544
|
+
payloadFinalizer.register(this, handle, this.#finalizerToken);
|
|
545
|
+
}
|
|
546
|
+
static [createPayload](handle, token, keeper) {
|
|
547
|
+
if (token !== payloadConstructionToken) {
|
|
548
|
+
throw new TypeError('Payload handles are created only by FastDB');
|
|
549
|
+
}
|
|
550
|
+
return new Payload(handle, payloadConstructionToken, keeper);
|
|
551
|
+
}
|
|
552
|
+
static openCopy(spec, source, options = new OpenOptions()) {
|
|
553
|
+
if (!(source instanceof Uint8Array)) {
|
|
554
|
+
throw new TypeError('source must be Uint8Array');
|
|
555
|
+
}
|
|
556
|
+
const module = payloadModule();
|
|
557
|
+
return withOpenOptions(module, options, (optionsPointer) => withInputBytes(module, source, (bytes, byteCount) => withAllocation(module, POINTER_SIZE * 2, (outputs) => {
|
|
558
|
+
const status = module._fdb_payload_v1_payload_open_copy(compiledSpecHandle(spec), bytes, byteCount, optionsPointer, outputs, outputs + POINTER_SIZE);
|
|
559
|
+
checkStatus(status, outputs + POINTER_SIZE);
|
|
560
|
+
return new Payload(readU32(module, outputs), payloadConstructionToken);
|
|
561
|
+
})));
|
|
562
|
+
}
|
|
563
|
+
static openWasmOwned(spec, source, options = new OpenOptions()) {
|
|
564
|
+
const module = payloadModule();
|
|
565
|
+
const native = ownedBytesNative(source);
|
|
566
|
+
return withOpenOptions(module, options, (optionsPointer) => withAllocation(module, POINTER_SIZE * 2, (outputs) => {
|
|
567
|
+
const status = module._fdb_payload_v1_payload_open_external(compiledSpecHandle(spec), native.dataAddress(), BigInt(native.size()), native.backingAddress(), native.ownerToken(), optionsPointer, outputs, outputs + POINTER_SIZE);
|
|
568
|
+
checkStatus(status, outputs + POINTER_SIZE);
|
|
569
|
+
return new Payload(readU32(module, outputs), payloadConstructionToken, source);
|
|
570
|
+
}));
|
|
571
|
+
}
|
|
572
|
+
clone() {
|
|
573
|
+
const handle = this.requireHandle();
|
|
574
|
+
payloadModule()._fdb_payload_v1_payload_retain(handle);
|
|
575
|
+
return new Payload(handle, payloadConstructionToken, this.#keeper);
|
|
576
|
+
}
|
|
577
|
+
dispose() {
|
|
578
|
+
if (this.#handle !== 0) {
|
|
579
|
+
const handle = this.#handle;
|
|
580
|
+
this.#handle = 0;
|
|
581
|
+
payloadFinalizer.unregister(this.#finalizerToken);
|
|
582
|
+
payloadModule()._fdb_payload_v1_payload_release(handle);
|
|
583
|
+
this.#keeper = undefined;
|
|
584
|
+
}
|
|
585
|
+
}
|
|
586
|
+
requireSpecSha256(expectedSha256) {
|
|
587
|
+
const module = payloadModule();
|
|
588
|
+
withSha256(module, expectedSha256, (digest) => withAllocation(module, POINTER_SIZE, (error) => {
|
|
589
|
+
const status = module._fdb_payload_v1_payload_require_spec_sha256(this.requireHandle(), digest, error);
|
|
590
|
+
checkStatus(status, error);
|
|
591
|
+
}));
|
|
592
|
+
}
|
|
593
|
+
sha256() {
|
|
594
|
+
const module = payloadModule();
|
|
595
|
+
return withAllocation(module, SHA256_SIZE + POINTER_SIZE, (outputs) => {
|
|
596
|
+
const status = module._fdb_payload_v1_payload_sha256(this.requireHandle(), outputs, outputs + SHA256_SIZE);
|
|
597
|
+
checkStatus(status, outputs + SHA256_SIZE);
|
|
598
|
+
return module.HEAPU8.slice(outputs, outputs + SHA256_SIZE);
|
|
599
|
+
});
|
|
600
|
+
}
|
|
601
|
+
profile() {
|
|
602
|
+
const module = payloadModule();
|
|
603
|
+
return withAllocation(module, POINTER_SIZE * 2, (outputs) => {
|
|
604
|
+
const status = module._fdb_payload_v1_payload_profile(this.requireHandle(), outputs, outputs + POINTER_SIZE);
|
|
605
|
+
checkStatus(status, outputs + POINTER_SIZE);
|
|
606
|
+
const value = readU32(module, outputs);
|
|
607
|
+
if (value !== Profile.RecordV1 && value !== Profile.ObjectGraphV1) {
|
|
608
|
+
throw bindingError('FastDB Core returned an unknown payload profile', 'unknown_profile');
|
|
609
|
+
}
|
|
610
|
+
return value;
|
|
611
|
+
});
|
|
612
|
+
}
|
|
613
|
+
executionReport() {
|
|
614
|
+
const module = payloadModule();
|
|
615
|
+
return withAllocation(module, EXECUTION_REPORT_SIZE + POINTER_SIZE, (outputs) => {
|
|
616
|
+
module._fdb_payload_v1_execution_report_init(outputs);
|
|
617
|
+
const status = module._fdb_payload_v1_payload_execution_report(this.requireHandle(), outputs, outputs + EXECUTION_REPORT_SIZE);
|
|
618
|
+
checkStatus(status, outputs + EXECUTION_REPORT_SIZE);
|
|
619
|
+
return readExecutionReport(module, outputs);
|
|
620
|
+
});
|
|
621
|
+
}
|
|
622
|
+
binaryBytes() {
|
|
623
|
+
const module = payloadModule();
|
|
624
|
+
return withAllocation(module, POINTER_SIZE * 2, (outputs) => {
|
|
625
|
+
const status = module._fdb_payload_v1_payload_binary_blob(this.requireHandle(), outputs, outputs + POINTER_SIZE);
|
|
626
|
+
checkStatus(status, outputs + POINTER_SIZE);
|
|
627
|
+
const blob = readU32(module, outputs);
|
|
628
|
+
if (blob === 0) {
|
|
629
|
+
throw bindingError('FastDB Core returned success without a blob', 'missing_blob_handle');
|
|
630
|
+
}
|
|
631
|
+
try {
|
|
632
|
+
return copyBytes(module, module._fdb_payload_v1_blob_data(blob), module._fdb_payload_v1_blob_size(blob));
|
|
633
|
+
}
|
|
634
|
+
finally {
|
|
635
|
+
module._fdb_payload_v1_blob_release(blob);
|
|
636
|
+
}
|
|
637
|
+
});
|
|
638
|
+
}
|
|
639
|
+
acquire() {
|
|
640
|
+
const module = payloadModule();
|
|
641
|
+
return withAllocation(module, POINTER_SIZE * 2, (outputs) => {
|
|
642
|
+
const status = module._fdb_payload_v1_payload_acquire(this.requireHandle(), outputs, outputs + POINTER_SIZE);
|
|
643
|
+
checkStatus(status, outputs + POINTER_SIZE);
|
|
644
|
+
return Access[createAccess](readU32(module, outputs), accessConstructionToken);
|
|
645
|
+
});
|
|
646
|
+
}
|
|
647
|
+
entryView(entryIndex) {
|
|
648
|
+
const module = payloadModule();
|
|
649
|
+
return withAllocation(module, POINTER_SIZE * 2, (outputs) => {
|
|
650
|
+
const status = module._fdb_payload_v1_payload_entry_view(this.requireHandle(), checkedU32(entryIndex, 'entryIndex'), outputs, outputs + POINTER_SIZE);
|
|
651
|
+
checkStatus(status, outputs + POINTER_SIZE);
|
|
652
|
+
return View[createView](readU32(module, outputs), viewConstructionToken);
|
|
653
|
+
});
|
|
654
|
+
}
|
|
655
|
+
/**
|
|
656
|
+
* Invalidates synchronously after all access pins have been disposed.
|
|
657
|
+
* The official Wasm host is single-threaded, so retaining an Access here
|
|
658
|
+
* would prevent Core's drain from completing.
|
|
659
|
+
*/
|
|
660
|
+
invalidate() {
|
|
661
|
+
const module = payloadModule();
|
|
662
|
+
withAllocation(module, POINTER_SIZE, (error) => {
|
|
663
|
+
const status = module._fdb_payload_v1_payload_invalidate(this.requireHandle(), error);
|
|
664
|
+
checkStatus(status, error);
|
|
665
|
+
});
|
|
666
|
+
}
|
|
667
|
+
requireHandle() {
|
|
668
|
+
if (this.#handle === 0) {
|
|
669
|
+
throw bindingError('Payload is disposed', 'disposed_handle');
|
|
670
|
+
}
|
|
671
|
+
return this.#handle;
|
|
672
|
+
}
|
|
673
|
+
}
|
|
674
|
+
export class BuildResult {
|
|
675
|
+
payload;
|
|
676
|
+
report;
|
|
677
|
+
constructor(payload, report) {
|
|
678
|
+
this.payload = payload;
|
|
679
|
+
this.report = report;
|
|
680
|
+
}
|
|
681
|
+
}
|
|
682
|
+
export function executePlan(plan, policy, backing) {
|
|
683
|
+
if (policy !== BuildPolicy.AllowStaging &&
|
|
684
|
+
policy !== BuildPolicy.RequireDirect) {
|
|
685
|
+
throw new TypeError('policy must be BuildPolicy');
|
|
686
|
+
}
|
|
687
|
+
const module = payloadModule();
|
|
688
|
+
const nativeBacking = backing === undefined ? undefined : backingNative(backing);
|
|
689
|
+
return withAllocation(module, EXECUTION_OUTPUT_SIZE, (outputs) => {
|
|
690
|
+
module._fdb_payload_v1_execution_report_init(outputs + EXECUTION_REPORT_OFFSET);
|
|
691
|
+
const status = module._fdb_payload_v1_plan_execute(buildPlanHandle(plan), policy, nativeBacking?.backingAddress() ?? 0, outputs, outputs + EXECUTION_REPORT_OFFSET, outputs + EXECUTION_ERROR_OFFSET);
|
|
692
|
+
checkStatus(status, outputs + EXECUTION_ERROR_OFFSET);
|
|
693
|
+
const payload = Payload[createPayload](readU32(module, outputs), payloadConstructionToken, backing);
|
|
694
|
+
try {
|
|
695
|
+
return new BuildResult(payload, readExecutionReport(module, outputs + EXECUTION_REPORT_OFFSET));
|
|
696
|
+
}
|
|
697
|
+
catch (error) {
|
|
698
|
+
payload.dispose();
|
|
699
|
+
throw error;
|
|
700
|
+
}
|
|
701
|
+
});
|
|
702
|
+
}
|
|
703
|
+
function backingNative(backing) {
|
|
704
|
+
if (!(backing instanceof WasmMemoryBacking)) {
|
|
705
|
+
throw new TypeError('backing must be WasmMemoryBacking');
|
|
706
|
+
}
|
|
707
|
+
return WasmMemoryBacking.prototype[backingHandleValue].call(backing);
|
|
708
|
+
}
|
|
709
|
+
function ownedBytesNative(source) {
|
|
710
|
+
if (!(source instanceof WasmOwnedBytes)) {
|
|
711
|
+
throw new TypeError('source must be WasmOwnedBytes');
|
|
712
|
+
}
|
|
713
|
+
return WasmOwnedBytes.prototype[ownedBytesHandleValue].call(source);
|
|
714
|
+
}
|
|
715
|
+
function withOpenOptions(module, options, operation) {
|
|
716
|
+
if (!(options instanceof OpenOptions)) {
|
|
717
|
+
throw new TypeError('options must be OpenOptions');
|
|
718
|
+
}
|
|
719
|
+
return withAllocation(module, OPEN_OPTIONS_SIZE, (pointer) => {
|
|
720
|
+
module._fdb_payload_v1_open_options_init(pointer);
|
|
721
|
+
const values = options.values;
|
|
722
|
+
if (values.flags !== undefined) {
|
|
723
|
+
writeU32(module, pointer + 4, checkedU32(values.flags, 'flags'));
|
|
724
|
+
}
|
|
725
|
+
const fields = [
|
|
726
|
+
[values.maxTotalBytes, 8, 'maxTotalBytes'],
|
|
727
|
+
[values.maxRegions, 16, 'maxRegions'],
|
|
728
|
+
[values.maxEntries, 24, 'maxEntries'],
|
|
729
|
+
[values.maxComponents, 32, 'maxComponents'],
|
|
730
|
+
[values.maxNestingDepth, 40, 'maxNestingDepth'],
|
|
731
|
+
[values.maxListElements, 48, 'maxListElements'],
|
|
732
|
+
[values.maxGraphObjects, 56, 'maxGraphObjects'],
|
|
733
|
+
[values.maxStringBytes, 64, 'maxStringBytes'],
|
|
734
|
+
[values.maxValidationWork, 72, 'maxValidationWork'],
|
|
735
|
+
];
|
|
736
|
+
for (const [value, offset, name] of fields) {
|
|
737
|
+
if (value !== undefined) {
|
|
738
|
+
writeU64(module, pointer + offset, checkedU64(value, name));
|
|
739
|
+
}
|
|
740
|
+
}
|
|
741
|
+
return operation(pointer);
|
|
742
|
+
});
|
|
743
|
+
}
|
|
744
|
+
function readExecutionReport(module, pointer) {
|
|
745
|
+
const mode = readU32(module, pointer + 4);
|
|
746
|
+
const fallback = readU32(module, pointer + 8);
|
|
747
|
+
if (mode !== ExecutionMode.Direct && mode !== ExecutionMode.Staged) {
|
|
748
|
+
throw bindingError('FastDB Core returned an unknown execution mode', 'unknown_execution_mode');
|
|
749
|
+
}
|
|
750
|
+
if (fallback !== FallbackReason.None &&
|
|
751
|
+
fallback !== FallbackReason.PlanRequiresStaging &&
|
|
752
|
+
fallback !== FallbackReason.BackingDeclinedDirect) {
|
|
753
|
+
throw bindingError('FastDB Core returned an unknown fallback reason', 'unknown_fallback_reason');
|
|
754
|
+
}
|
|
755
|
+
return new ExecutionReport(mode, fallback, readU64(module, pointer + 16), readU64(module, pointer + 24), readU64(module, pointer + 32), readU64(module, pointer + 40), readU64(module, pointer + 48));
|
|
756
|
+
}
|