@agoric/swingset-liveslots 0.10.3-other-dev-8f8782b.0 → 0.10.3-other-dev-fbe72e7.0.fbe72e7
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 +2 -0
- package/package.json +34 -26
- package/src/boyd-gc.d.ts +12 -0
- package/src/boyd-gc.d.ts.map +1 -0
- package/src/boyd-gc.js +598 -0
- package/src/cache.d.ts +71 -0
- package/src/cache.d.ts.map +1 -0
- package/src/cache.js +3 -2
- package/src/capdata.d.ts +16 -0
- package/src/capdata.d.ts.map +1 -0
- package/src/capdata.js +17 -10
- package/src/collectionManager.d.ts +47 -0
- package/src/collectionManager.d.ts.map +1 -0
- package/src/collectionManager.js +220 -103
- package/src/facetiousness.d.ts +25 -0
- package/src/facetiousness.d.ts.map +1 -0
- package/src/facetiousness.js +1 -1
- package/src/index.d.ts +4 -0
- package/src/index.d.ts.map +1 -0
- package/src/index.js +4 -2
- package/src/kdebug.d.ts +7 -0
- package/src/kdebug.d.ts.map +1 -0
- package/src/liveslots.d.ts +42 -0
- package/src/liveslots.d.ts.map +1 -0
- package/src/liveslots.js +137 -305
- package/src/message.d.ts +49 -0
- package/src/message.d.ts.map +1 -0
- package/src/message.js +9 -5
- package/src/parseVatSlots.d.ts +125 -0
- package/src/parseVatSlots.d.ts.map +1 -0
- package/src/parseVatSlots.js +1 -1
- package/src/types-index.d.ts +4 -0
- package/src/types-index.js +2 -0
- package/src/types.d.ts +81 -0
- package/src/types.d.ts.map +1 -0
- package/src/types.js +14 -7
- package/src/vatDataTypes.d.ts +170 -0
- package/src/vatDataTypes.d.ts.map +1 -0
- package/src/vatDataTypes.ts +272 -0
- package/src/vatstore-iterators.d.ts +4 -0
- package/src/vatstore-iterators.d.ts.map +1 -0
- package/src/vatstore-iterators.js +2 -0
- package/src/vatstore-usage.md +198 -0
- package/src/virtualObjectManager.d.ts +44 -0
- package/src/virtualObjectManager.d.ts.map +1 -0
- package/src/virtualObjectManager.js +254 -84
- package/src/virtualReferences.d.ts +61 -0
- package/src/virtualReferences.d.ts.map +1 -0
- package/src/virtualReferences.js +135 -26
- package/src/vpid-tracking.md +92 -0
- package/src/watchedPromises.d.ts +31 -0
- package/src/watchedPromises.d.ts.map +1 -0
- package/src/watchedPromises.js +81 -24
- package/test/{test-baggage.js → baggage.test.js} +1 -2
- package/test/{test-cache.js → cache.test.js} +0 -1
- package/test/clear-collection.test.js +586 -0
- package/test/{test-collection-schema-refcount.js → collection-schema-refcount.test.js} +1 -2
- package/test/{test-collection-upgrade.js → collection-upgrade.test.js} +1 -3
- package/test/{test-collections.js → collections.test.js} +183 -18
- package/test/{test-dropped-collection-weakrefs.js → dropped-collection-weakrefs.test.js} +1 -2
- package/test/dropped-weakset-9939.test.js +80 -0
- package/test/dummyMeterControl.d.ts +2 -0
- package/test/dummyMeterControl.d.ts.map +1 -0
- package/test/dummyMeterControl.js +1 -1
- package/test/{test-durabilityChecks.js → durabilityChecks.test.js} +4 -4
- package/test/engine-gc.d.ts +3 -0
- package/test/engine-gc.d.ts.map +1 -0
- package/test/exo-utils.js +70 -0
- package/test/{test-facetiousness.js → facetiousness.test.js} +1 -2
- package/test/gc-and-finalize.d.ts +5 -0
- package/test/gc-and-finalize.d.ts.map +1 -0
- package/test/gc-and-finalize.js +30 -1
- package/test/gc-before-finalizer.test.js +230 -0
- package/test/gc-helpers.js +4 -5
- package/test/{test-gc-sensitivity.js → gc-sensitivity.test.js} +2 -2
- package/test/handled-promises.test.js +872 -0
- package/test/{test-initial-vrefs.js → initial-vrefs.test.js} +13 -20
- package/test/liveslots-helpers.d.ts +64 -0
- package/test/liveslots-helpers.d.ts.map +1 -0
- package/test/liveslots-helpers.js +13 -7
- package/test/{test-liveslots-mock-gc.js → liveslots-mock-gc.test.js} +101 -2
- package/test/{test-liveslots-real-gc.js → liveslots-real-gc.test.js} +73 -46
- package/test/{test-liveslots.js → liveslots.test.js} +17 -18
- package/test/mock-gc.js +1 -0
- package/test/storeGC/{test-lifecycle.js → lifecycle.test.js} +15 -14
- package/test/storeGC/{test-refcount-management.js → refcount-management.test.js} +1 -2
- package/test/storeGC/{test-scalar-store-kind.js → scalar-store-kind.test.js} +0 -1
- package/test/storeGC/{test-weak-key.js → weak-key.test.js} +1 -2
- package/test/strict-test-env-upgrade.test.js +94 -0
- package/test/util.d.ts +25 -0
- package/test/util.d.ts.map +1 -0
- package/test/util.js +4 -4
- package/test/vat-environment.test.js +65 -0
- package/test/vat-util.d.ts +9 -0
- package/test/vat-util.d.ts.map +1 -0
- package/test/vat-util.js +2 -2
- package/test/virtual-objects/{test-cease-recognition.js → cease-recognition.test.js} +2 -2
- package/test/virtual-objects/{test-cross-facet.js → cross-facet.test.js} +5 -4
- package/test/virtual-objects/{test-empty-data.js → empty-data.test.js} +1 -2
- package/test/virtual-objects/{test-facets.js → facets.test.js} +1 -2
- package/test/virtual-objects/{test-kind-changes.js → kind-changes.test.js} +2 -2
- package/test/virtual-objects/{test-reachable-vrefs.js → reachable-vrefs.test.js} +2 -2
- package/test/virtual-objects/{test-rep-tostring.js → rep-tostring.test.js} +3 -5
- package/test/virtual-objects/{test-retain-remotable.js → retain-remotable.test.js} +25 -24
- package/test/virtual-objects/set-debug-label-instances.js +1 -1
- package/test/virtual-objects/state-shape.test.js +389 -0
- package/test/virtual-objects/{test-virtualObjectGC.js → virtualObjectGC.test.js} +39 -38
- package/test/virtual-objects/{test-virtualObjectManager.js → virtualObjectManager.test.js} +104 -8
- package/test/virtual-objects/{test-vo-real-gc.js → vo-real-gc.test.js} +8 -8
- package/test/virtual-objects/{test-weakcollections-vref-handling.js → weakcollections-vref-handling.test.js} +1 -2
- package/test/{test-vo-test-harness.js → vo-test-harness.test.js} +13 -10
- package/test/{test-vpid-liveslots.js → vpid-liveslots.test.js} +105 -5
- package/test/waitUntilQuiescent.d.ts +3 -0
- package/test/waitUntilQuiescent.d.ts.map +1 -0
- package/test/waitUntilQuiescent.js +2 -1
- package/test/weakset-dropped-remotable.test.js +50 -0
- package/tools/fakeCollectionManager.d.ts +14 -0
- package/tools/fakeCollectionManager.d.ts.map +1 -0
- package/tools/fakeCollectionManager.js +44 -0
- package/tools/fakeVirtualObjectManager.d.ts +32 -0
- package/tools/fakeVirtualObjectManager.d.ts.map +1 -0
- package/tools/fakeVirtualObjectManager.js +62 -0
- package/tools/fakeVirtualSupport.d.ts +278 -0
- package/tools/fakeVirtualSupport.d.ts.map +1 -0
- package/tools/fakeVirtualSupport.js +389 -0
- package/tools/prepare-strict-test-env.d.ts +37 -0
- package/tools/prepare-strict-test-env.d.ts.map +1 -0
- package/tools/prepare-strict-test-env.js +124 -0
- package/tools/prepare-test-env.d.ts +2 -0
- package/tools/prepare-test-env.d.ts.map +1 -0
- package/tools/prepare-test-env.js +13 -0
- package/tools/setup-vat-data.d.ts +9 -0
- package/tools/setup-vat-data.d.ts.map +1 -0
- package/tools/setup-vat-data.js +95 -0
- package/tools/vo-test-harness.d.ts +33 -0
- package/tools/vo-test-harness.d.ts.map +1 -0
- package/tools/vo-test-harness.js +164 -0
- package/CHANGELOG.md +0 -61
- package/test/kmarshal.js +0 -79
- package/test/test-handled-promises.js +0 -360
- package/test/virtual-objects/test-state-shape.js +0 -298
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Assess the facetiousness of a value. If the value is an object containing
|
|
3
|
+
* only named properties and each such property's value is a function, `obj`
|
|
4
|
+
* represents a single facet and 'one' is returned. If each property's value
|
|
5
|
+
* is instead an object of facetiousness 'one', `obj` represents multiple
|
|
6
|
+
* facets and 'many' is returned. In all other cases `obj` does not represent
|
|
7
|
+
* any kind of facet abstraction and 'not' is returned.
|
|
8
|
+
*
|
|
9
|
+
* @typedef {'one'|'many'|'not'} Facetiousness
|
|
10
|
+
*
|
|
11
|
+
* @param {*} obj The (alleged) object to be assessed
|
|
12
|
+
* @returns {Facetiousness} an assessment of the facetiousness of `obj`
|
|
13
|
+
*/
|
|
14
|
+
export function assessFacetiousness(obj: any): Facetiousness;
|
|
15
|
+
export function checkAndUpdateFacetiousness(tag: any, desc: any, proposedFacetNames: any): any;
|
|
16
|
+
/**
|
|
17
|
+
* Assess the facetiousness of a value. If the value is an object containing
|
|
18
|
+
* only named properties and each such property's value is a function, `obj`
|
|
19
|
+
* represents a single facet and 'one' is returned. If each property's value
|
|
20
|
+
* is instead an object of facetiousness 'one', `obj` represents multiple
|
|
21
|
+
* facets and 'many' is returned. In all other cases `obj` does not represent
|
|
22
|
+
* any kind of facet abstraction and 'not' is returned.
|
|
23
|
+
*/
|
|
24
|
+
export type Facetiousness = "one" | "many" | "not";
|
|
25
|
+
//# sourceMappingURL=facetiousness.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"facetiousness.d.ts","sourceRoot":"","sources":["facetiousness.js"],"names":[],"mappings":"AAEA;;;;;;;;;;;;GAYG;AACH,yCAHW,GAAC,GACC,aAAa,CA+BzB;AAGM,+FAwCN;;;;;;;;;4BA7EY,KAAK,GAAC,MAAM,GAAC,KAAK"}
|
package/src/facetiousness.js
CHANGED
package/src/index.d.ts
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export * from "./types-index.js";
|
|
2
|
+
export { makeLiveSlots, makeMarshaller } from "./liveslots.js";
|
|
3
|
+
export { insistMessage, insistVatDeliveryObject, insistVatDeliveryResult, insistVatSyscallObject, insistVatSyscallResult } from "./message.js";
|
|
4
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.js"],"names":[],"mappings":""}
|
package/src/index.js
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
/// <reference types="@agoric/store/exported.js" />
|
|
2
|
+
|
|
3
|
+
/* eslint-disable import/export -- types files have no named runtime exports */
|
|
1
4
|
export { makeLiveSlots, makeMarshaller } from './liveslots.js';
|
|
2
5
|
|
|
3
6
|
export {
|
|
@@ -8,5 +11,4 @@ export {
|
|
|
8
11
|
insistVatSyscallResult,
|
|
9
12
|
} from './message.js';
|
|
10
13
|
|
|
11
|
-
|
|
12
|
-
export * from './types.js';
|
|
14
|
+
export * from './types-index.js';
|
package/src/kdebug.d.ts
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export function kdebugEnable(flag: any): void;
|
|
2
|
+
export function kdebug(...args: any[]): void;
|
|
3
|
+
export function legibilizeValue(val: any, slots: any, smallcaps: any): any;
|
|
4
|
+
export function legibilizeMethod(method: any, smallcaps: any): string;
|
|
5
|
+
export function extractMethod(methargsCapdata: any): string;
|
|
6
|
+
export function legibilizeMessageArgs(methargsCapdata: any): any[] | "<unintelligible message args>";
|
|
7
|
+
//# sourceMappingURL=kdebug.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"kdebug.d.ts","sourceRoot":"","sources":["kdebug.js"],"names":[],"mappings":"AAEA,8CAEC;AAED,6CAIC;AAED,2EAwEC;AAED,sEAmDC;AAED,4DAaC;AAED,qGAkBC"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Instantiate the liveslots layer for a new vat and then populate the vat with
|
|
3
|
+
* a new root object and its initial associated object graph, if any.
|
|
4
|
+
*
|
|
5
|
+
* @param {*} syscall Kernel syscall interface that the vat will have access to
|
|
6
|
+
* @param {*} forVatID Vat ID label, for use in debug diagostics
|
|
7
|
+
* @param {*} vatPowers
|
|
8
|
+
* @param {import('./types.js').LiveSlotsOptions} liveSlotsOptions
|
|
9
|
+
* @param {*} gcTools { WeakRef, FinalizationRegistry, waitUntilQuiescent }
|
|
10
|
+
* @param {LimitedConsole} [liveSlotsConsole]
|
|
11
|
+
* @param {*} [buildVatNamespace]
|
|
12
|
+
*
|
|
13
|
+
* @returns {*} { dispatch }
|
|
14
|
+
*
|
|
15
|
+
* setBuildRootObject should be called, once, with a function that will
|
|
16
|
+
* create a root object for the new vat The caller provided buildRootObject
|
|
17
|
+
* function produces and returns the new vat's root object:
|
|
18
|
+
*
|
|
19
|
+
* buildRootObject(vatPowers, vatParameters)
|
|
20
|
+
*
|
|
21
|
+
* Within the vat, `import { E } from '@endo/eventual-send'` will
|
|
22
|
+
* provide the E wrapper. For any object x, E(x) returns a proxy object
|
|
23
|
+
* that converts any method invocation into a corresponding eventual send
|
|
24
|
+
* to x. That is, E(x).foo(arg1, arg2) is equivalent to x~.foo(arg1,
|
|
25
|
+
* arg2)
|
|
26
|
+
*
|
|
27
|
+
* If x is the presence in this vat of a remote object (that is, an object
|
|
28
|
+
* outside the vat), this will result in a message send out of the vat via
|
|
29
|
+
* the kernel syscall interface.
|
|
30
|
+
*
|
|
31
|
+
* In the same vein, if x is the presence in this vat of a kernel device,
|
|
32
|
+
* vatPowers.D(x) returns a proxy such that a method invocation on it is
|
|
33
|
+
* translated into the corresponding immediate invocation of the device
|
|
34
|
+
* (using, once again, the kernel syscall interface). D(x).foo(args) will
|
|
35
|
+
* perform an immediate syscall.callNow on the device node.
|
|
36
|
+
*/
|
|
37
|
+
export function makeLiveSlots(syscall: any, forVatID: any | undefined, vatPowers: any | undefined, liveSlotsOptions: import("./types.js").LiveSlotsOptions, gcTools: any, liveSlotsConsole?: LimitedConsole, buildVatNamespace?: any): any;
|
|
38
|
+
export function makeMarshaller(syscall: any, gcTools: any, vatID?: string): {
|
|
39
|
+
m: any;
|
|
40
|
+
};
|
|
41
|
+
import type { LimitedConsole } from '@agoric/internal/src/js-utils.js';
|
|
42
|
+
//# sourceMappingURL=liveslots.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"liveslots.d.ts","sourceRoot":"","sources":["liveslots.js"],"names":[],"mappings":"AAm9CA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH,uCAhCW,GAAC,YACD,GAAC,yBACD,GAAC,gCACD,OAAO,YAAY,EAAE,gBAAgB,WACrC,GAAC,qBACD,cAAc,sBACd,GAAC,GAEC,GAAC,CAgDb;AAGD;;EAIC;oCAtgDiC,kCAAkC"}
|