char/avril

(wip) why'd you have to go and make things so complicaaaaated?

git clone https://git.t4t.associates/char/avril

Charlotte Somsnapshot: capture and restore extension layouts in one artifactd71572b

main
839 B27 linesraw
1import { state } from "./state.js";
2import { ops, primordials } from "ext:core";
3import { ArrayPrototypePush } from "ext:core/primordials";
4import { nativeSeed } from "ext:core/ops";
5import { enqueueTask } from "ext:core/tasks";
6import { clone } from "ext:core/structured_clone";
7export { byteLength as sharedSize } from "ext:core/shared_array_buffer";
8
9if (
10  state !== snapshotState || nativeSeed !== ops.nativeSeed ||
11  primordials.ArrayPrototypePush !== ArrayPrototypePush
12) {
13  throw Error("Restored exports lost identity");
14}
15events.push("lazy");
16export const meta = import.meta;
17export function schedule() {
18  enqueueTask(() => {
19    events.push("task");
20  }, () => {
21    events.push("finish");
22  });
23}
24export function copy(value) {
25  return clone(value, [], () => 0, () => {}, (message) => new Error(message));
26}
27export { state };