@agoric/swingset-liveslots 0.10.3-dev-77a85e2.0 → 0.10.3-dev-93d7fac.0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agoric/swingset-liveslots",
3
- "version": "0.10.3-dev-77a85e2.0+77a85e2",
3
+ "version": "0.10.3-dev-93d7fac.0+93d7fac",
4
4
  "description": "SwingSet ocap support layer",
5
5
  "type": "module",
6
6
  "main": "src/index.js",
@@ -19,8 +19,8 @@
19
19
  "postpack": "git clean -f ':!src/types-index.d.ts' '*.d.ts*' '*.tsbuildinfo'"
20
20
  },
21
21
  "dependencies": {
22
- "@agoric/internal": "0.3.3-dev-77a85e2.0+77a85e2",
23
- "@agoric/store": "0.9.3-dev-77a85e2.0+77a85e2",
22
+ "@agoric/internal": "0.3.3-dev-93d7fac.0+93d7fac",
23
+ "@agoric/store": "0.9.3-dev-93d7fac.0+93d7fac",
24
24
  "@endo/env-options": "^1.1.8",
25
25
  "@endo/errors": "^1.2.9",
26
26
  "@endo/eventual-send": "^1.3.0",
@@ -34,7 +34,7 @@
34
34
  "@endo/promise-kit": "^1.1.9"
35
35
  },
36
36
  "devDependencies": {
37
- "@agoric/kmarshal": "0.1.1-dev-77a85e2.0+77a85e2",
37
+ "@agoric/kmarshal": "0.1.1-dev-93d7fac.0+93d7fac",
38
38
  "ava": "^5.3.0"
39
39
  },
40
40
  "files": [
@@ -68,5 +68,5 @@
68
68
  "typeCoverage": {
69
69
  "atLeast": 75.24
70
70
  },
71
- "gitHead": "77a85e22be3a5a9cde6068f85ecaa6a1da66f84f"
71
+ "gitHead": "93d7fac547fbc9a20c9b312d811010fa7aa37fec"
72
72
  }
@@ -1 +1 @@
1
- {"version":3,"file":"watchedPromises.d.ts","sourceRoot":"","sources":["watchedPromises.js"],"names":[],"mappings":"AASA;;;;GAIG;AAEH;;;;;;;;;GASG;AACH,6IAR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AAO,wBAAwB,EAAE,uBAAuB;IACU,GAAG,EAArE,OAAO,2BAA2B,EAAE,oBAAoB;IAC7C,iBAAiB,EAA5B,GAAC;IACsD,gBAAgB,EAAvE,OAAO,eAAe,EAAE,gBAAgB,CAAC,GAAG,CAAC;IACU,gBAAgB,EAAvE,OAAO,eAAe,EAAE,gBAAgB,CAAC,GAAG,CAAC;IACb,kBAAkB,EAAlD,CAAC,IAAI,EAAE,GAAG,KAAK,OAAO;CAChC;;6CA+GY,CAAC,IAAI,EAAE,GAAG,KAAK,OAAO,CAAC,GAAG,CAAC,KACzB,IAAI;4BAiBJ,CAAC,EACO,CAAC,SAAR,GAAG,EAAG,cACT,OAAO,mBAAmB,EAAE,iBAAiB,mBAC7C,CAAC,KAAK,EAAE,CAAC,EAAE,GAAG,IAAI,EAAE,CAAC,KAAK,IAAI,kBAC9B,CAAC,MAAM,EAAE,GAAG,EAAE,GAAG,IAAI,EAAE,CAAC,KAAK,IAAI,KAC/B,OAAO,YAAY,EAAE,cAAc,CAAC,CAAC,EAAE,CAAC,CAAC;mBAmC3C,CAAC,SAAS,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,SAAS,GAAG,EAAE,KAAK,CAAC,WAAW,OAAO,YAAY,EAAE,cAAc,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,WAAW,CAAC,KAAK,IAAI;EAoE3I;gCA3PY,CAAC,EACQ,CAAC,SAAT,GAAG,EAAG,gBACP,CAAC,OAAO,EAAE,OAAO,YAAY,EAAE,cAAc,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,GAAG,IAAI,EAAE,CAAC,CAAC"}
@@ -36,13 +36,12 @@ export function makeWatchedPromiseManager({
36
36
  const { defineDurableKind } = vom;
37
37
 
38
38
  /**
39
- * virtual Store (not durable) mapping vpid to Promise objects, to
40
- * maintain the slotToVal registration until resolution. Without
41
- * this, slotToVal would forget local Promises that aren't exported.
39
+ * Track promises watched in `buildRootObject` so `loadWatchedPromiseTable`
40
+ * can differentiate them from promises watched in a previous incarnation.
42
41
  *
43
- * @type {MapStore<string, Promise<unknown>>}
42
+ * @type {Set<string> | null}
44
43
  */
45
- let promiseRegistrations;
44
+ let buildRootObjectWatchedPromiseRefs;
46
45
 
47
46
  /**
48
47
  * watched promises by vpid: each entry is an array of watches on the
@@ -60,7 +59,7 @@ export function makeWatchedPromiseManager({
60
59
  let promiseWatcherByKindTable;
61
60
 
62
61
  function preparePromiseWatcherTables() {
63
- promiseRegistrations = makeScalarBigMapStore('promiseRegistrations');
62
+ buildRootObjectWatchedPromiseRefs = new Set();
64
63
  let watcherTableID = syscall.vatstoreGet('watcherTableID');
65
64
  if (watcherTableID) {
66
65
  promiseWatcherByKindTable = convertSlotToVal(watcherTableID);
@@ -105,7 +104,7 @@ export function makeWatchedPromiseManager({
105
104
  function settle(value, wasFulfilled) {
106
105
  const watches = watchedPromiseTable.get(vpid);
107
106
  watchedPromiseTable.delete(vpid);
108
- promiseRegistrations.delete(vpid);
107
+ buildRootObjectWatchedPromiseRefs?.delete(vpid);
109
108
  for (const watch of watches) {
110
109
  const [watcher, ...args] = watch;
111
110
  void Promise.resolve().then(() => {
@@ -139,16 +138,16 @@ export function makeWatchedPromiseManager({
139
138
  */
140
139
  function loadWatchedPromiseTable(revivePromise) {
141
140
  for (const vpid of watchedPromiseTable.keys()) {
142
- if (promiseRegistrations.has(vpid)) {
141
+ if (buildRootObjectWatchedPromiseRefs?.has(vpid)) {
143
142
  // We're only interested in reconnecting the promises from the previous
144
143
  // incarnation. Any promise watched during buildRootObject would have
145
144
  // already created a registration.
146
145
  continue;
147
146
  }
148
147
  const p = revivePromise(vpid);
149
- promiseRegistrations.init(vpid, p);
150
148
  pseudoThen(p, vpid);
151
149
  }
150
+ buildRootObjectWatchedPromiseRefs = null;
152
151
  }
153
152
 
154
153
  /**
@@ -235,11 +234,9 @@ export function makeWatchedPromiseManager({
235
234
  } else {
236
235
  watchedPromiseTable.init(vpid, harden([[watcher, ...args]]));
237
236
 
238
- promiseRegistrations.init(vpid, p);
237
+ buildRootObjectWatchedPromiseRefs?.add(vpid);
239
238
 
240
- // pseudoThen registers a settlement callback that will remove
241
- // this promise from promiseRegistrations and
242
- // watchedPromiseTable. To avoid triggering
239
+ // To avoid triggering
243
240
  // https://github.com/Agoric/agoric-sdk/issues/10757 and
244
241
  // preventing slotToVal cleanup, the `pseudoThen()` should
245
242
  // precede `maybeExportPromise()`. This isn't foolproof, but
@@ -9,8 +9,8 @@ import { parseVatSlot } from '../src/parseVatSlots.js';
9
9
  let aWeakMapStore;
10
10
  let aWeakSetStore;
11
11
 
12
- export const mainHolderIdx = 5;
13
- export const mainHeldIdx = 6;
12
+ export const mainHolderIdx = 4;
13
+ export const mainHeldIdx = 5;
14
14
 
15
15
  export function buildRootObject(vatPowers) {
16
16
  const { VatData } = vatPowers;
@@ -588,8 +588,7 @@ test('watched local promises should not leak slotToVal entries', async t => {
588
588
  // The workaround doesn't handle this case because it learns about the
589
589
  // settlement before the virtual object system
590
590
  // See https://github.com/Agoric/agoric-sdk/issues/10757
591
- // prettier-ignore
592
- test.failing('watched imported promises should not leak slotToVal entries', async t => {
591
+ test('watched imported promises should not leak slotToVal entries', async t => {
593
592
  const S = 'settlement';
594
593
  // cf. src/liveslots.js:initialIDCounters
595
594
  const firstPExport = 5;
@@ -70,34 +70,28 @@ test('initial vatstore contents', async t => {
70
70
  t.deepEqual(kunser(JSON.parse(get(`vc.1.|schemata`))), stringSchema);
71
71
 
72
72
  // then three tables for the promise watcher (one virtual, two durable)
73
- t.is(getLabel(`vc.3.|schemata`), 'promiseWatcherByKind'); // durable
74
- t.is(getLabel(`vc.4.|schemata`), 'watchedPromises'); // durable
75
- // the promiseRegistrations table is not durable, and only gets vc.2
76
- // on the first incarnation: it will get a new ID on subsequent
77
- // incarnations
78
- t.is(getLabel(`vc.2.|schemata`), `promiseRegistrations`); // virtual
73
+ t.is(getLabel(`vc.2.|schemata`), 'promiseWatcherByKind'); // durable
74
+ t.is(getLabel(`vc.3.|schemata`), 'watchedPromises'); // durable
79
75
 
80
76
  const watcherTableVref = get('watcherTableID');
81
77
  const watchedPromiseTableVref = get('watchedPromiseTableID');
82
- t.is(watcherTableVref, `${dmsBase}/3`);
83
- t.is(watchedPromiseTableVref, `${dmsBase}/4`);
78
+ t.is(watcherTableVref, `${dmsBase}/2`);
79
+ t.is(watchedPromiseTableVref, `${dmsBase}/3`);
84
80
 
85
81
  // baggage and the two durable promise-watcher tables are pinned
86
82
  t.is(get(`vom.rc.${baggageVref}`), '1');
87
83
  t.is(get(`vom.rc.${watcherTableVref}`), '1');
88
84
  t.is(get(`vom.rc.${watchedPromiseTableVref}`), '1');
89
85
 
90
- // promiseRegistrations and promiseWatcherByKind arbitrary scalars as keys
91
- const scalarSchema2 = { label: 'promiseRegistrations', keyShape: M.scalar() };
86
+ // promiseWatcherByKind arbitrary scalars as keys
92
87
  const scalarSchema3 = { label: 'promiseWatcherByKind', keyShape: M.scalar() };
93
- t.deepEqual(kunser(JSON.parse(get(`vc.2.|schemata`))), scalarSchema2);
94
- t.deepEqual(kunser(JSON.parse(get(`vc.3.|schemata`))), scalarSchema3);
88
+ t.deepEqual(kunser(JSON.parse(get(`vc.2.|schemata`))), scalarSchema3);
95
89
  // watchedPromises uses vref (string) keys
96
90
  const scalarStringSchema = {
97
91
  label: 'watchedPromises',
98
92
  keyShape: M.and(M.scalar(), M.string()),
99
93
  };
100
- t.deepEqual(kunser(JSON.parse(get(`vc.4.|schemata`))), scalarStringSchema);
94
+ t.deepEqual(kunser(JSON.parse(get(`vc.3.|schemata`))), scalarStringSchema);
101
95
  });
102
96
 
103
97
  test('vrefs', async t => {
@@ -141,11 +135,11 @@ test('vrefs', async t => {
141
135
  const dh2Vref = (await run('getDinstance2')).slots[0];
142
136
  t.is(dh2Vref, expectedDH2Vref);
143
137
 
144
- // the liveslots-created collections consume vc.1 through vc.4,
145
- // leaving vc.5 for the first user-created collection
146
- t.is(getLabel('vc.5.|schemata'), 'store1');
147
- const expectedStore1Vref = `o+v${initialKindIDs.scalarMapStore}/5`;
138
+ // the liveslots-created collections consume vc.1 through vc.3,
139
+ // leaving vc.4 for the first user-created collection
140
+ t.is(getLabel('vc.4.|schemata'), 'store1');
141
+ const expectedStore1Vref = `o+v${initialKindIDs.scalarMapStore}/4`;
148
142
  const store1Vref = (await run('getStore1')).slots[0];
149
143
  t.is(store1Vref, expectedStore1Vref);
150
- t.is(kunser(JSON.parse(fakestore.get(`vc.5.s${'key'}`))), 'value');
144
+ t.is(kunser(JSON.parse(fakestore.get(`vc.4.s${'key'}`))), 'value');
151
145
  });
@@ -289,7 +289,7 @@ avaRetry(test.serial, 'GC dispatch.dropExports', async t => {
289
289
  t.deepEqual(log.shift(), {
290
290
  type: 'vatstoreSet',
291
291
  key: 'idCounters',
292
- value: '{"exportID":11,"collectionID":5,"promiseID":5}',
292
+ value: '{"exportID":11,"collectionID":4,"promiseID":5}',
293
293
  });
294
294
  t.deepEqual(log, []);
295
295
 
@@ -369,7 +369,7 @@ avaRetry(
369
369
  t.deepEqual(log.shift(), {
370
370
  type: 'vatstoreSet',
371
371
  key: 'idCounters',
372
- value: '{"exportID":11,"collectionID":5,"promiseID":5}',
372
+ value: '{"exportID":11,"collectionID":4,"promiseID":5}',
373
373
  });
374
374
  t.deepEqual(log, []);
375
375
 
@@ -713,7 +713,7 @@ test('capdata size limit on syscalls', async t => {
713
713
  const label = 'test';
714
714
  t.deepEqual(log.shift(), {
715
715
  type: 'vatstoreGet',
716
- key: 'vc.5.|schemata',
716
+ key: 'vc.4.|schemata',
717
717
  result: JSON.stringify(kser({ label, keyShape: M.scalar() })),
718
718
  });
719
719
  };
@@ -723,7 +723,7 @@ test('capdata size limit on syscalls', async t => {
723
723
  gotSchema();
724
724
  t.deepEqual(log.shift(), {
725
725
  type: 'vatstoreGet',
726
- key: 'vc.5.skey',
726
+ key: 'vc.4.skey',
727
727
  result: undefined,
728
728
  });
729
729
  expectFail();
@@ -735,7 +735,7 @@ test('capdata size limit on syscalls', async t => {
735
735
  gotSchema();
736
736
  t.deepEqual(log.shift(), {
737
737
  type: 'vatstoreGet',
738
- key: 'vc.5.skey',
738
+ key: 'vc.4.skey',
739
739
  result: undefined,
740
740
  });
741
741
  expectFail();
@@ -14,12 +14,12 @@ import { parseVatSlot } from '../../src/parseVatSlots.js';
14
14
 
15
15
  function getLastCollection(v) {
16
16
  // makeAndHold() uses makeScalarBigMapStore, and since we call it
17
- // early, it always gets "store #6", in vref o+2/6 (o+2 means
18
- // scalarMapStore, non-durable, and /6 means collectionID=6)
19
- const vref = 'o+v2/6';
17
+ // early, it always gets "store #5", in vref o+2/5 (o+2 means
18
+ // scalarMapStore, non-durable, and /5 means collectionID=5)
19
+ const vref = 'o+v2/5';
20
20
  // double-check that at least the collectionID is right
21
21
  const { t, fakestore } = v;
22
- t.is(JSON.parse(fakestore.get('idCounters')).collectionID, 7); // last was 6
22
+ t.is(JSON.parse(fakestore.get('idCounters')).collectionID, 6); // last was 5
23
23
  return vref;
24
24
  }
25
25
 
@@ -590,12 +590,12 @@ test('durable kind IDs can be reanimated', t => {
590
590
 
591
591
  // Store it in the store without having used it
592
592
  placeToPutIt.init('savedKindID', kindHandle);
593
- t.is(log.shift(), 'get vc.4.ssavedKindID => undefined');
593
+ t.is(log.shift(), 'get vc.3.ssavedKindID => undefined');
594
594
  t.is(log.shift(), `get vom.rc.${khid} => undefined`);
595
595
  t.is(log.shift(), `set vom.rc.${khid} 1`);
596
- t.is(log.shift(), `set vc.4.ssavedKindID ${vstr(kind)}`);
597
- t.is(log.shift(), 'get vc.4.|entryCount => 0');
598
- t.is(log.shift(), 'set vc.4.|entryCount 1');
596
+ t.is(log.shift(), `set vc.3.ssavedKindID ${vstr(kind)}`);
597
+ t.is(log.shift(), 'get vc.3.|entryCount => 0');
598
+ t.is(log.shift(), 'set vc.3.|entryCount 1');
599
599
  t.deepEqual(log, []);
600
600
 
601
601
  // Forget its Representative
@@ -609,7 +609,7 @@ test('durable kind IDs can be reanimated', t => {
609
609
 
610
610
  // Fetch it from the store, which should reanimate it
611
611
  const fetchedKindID = placeToPutIt.get('savedKindID');
612
- t.is(log.shift(), `get vc.4.ssavedKindID => ${vstr(kind)}`);
612
+ t.is(log.shift(), `get vc.3.ssavedKindID => ${vstr(kind)}`);
613
613
  t.is(
614
614
  log.shift(),
615
615
  'get vom.dkind.10.descriptor => {"kindID":"10","tag":"testkind"}',
@@ -658,20 +658,18 @@ test('virtual object gc', t => {
658
658
  ];
659
659
  t.is(log.shift(), `get storeKindIDTable => undefined`);
660
660
  t.is(log.shift(), `set ${skit[0]} ${skit[1]}`);
661
+ t.is(log.shift(), 'get watcherTableID => undefined');
661
662
  t.is(log.shift(), 'set vc.1.|nextOrdinal 1');
662
663
  t.is(log.shift(), 'set vc.1.|entryCount 0');
663
- t.is(log.shift(), 'get watcherTableID => undefined');
664
+ t.is(log.shift(), 'set watcherTableID o+d6/1');
665
+ t.is(log.shift(), 'get vom.rc.o+d6/1 => undefined');
666
+ t.is(log.shift(), 'set vom.rc.o+d6/1 1');
667
+ t.is(log.shift(), 'get watchedPromiseTableID => undefined');
664
668
  t.is(log.shift(), 'set vc.2.|nextOrdinal 1');
665
669
  t.is(log.shift(), 'set vc.2.|entryCount 0');
666
- t.is(log.shift(), 'set watcherTableID o+d6/2');
670
+ t.is(log.shift(), 'set watchedPromiseTableID o+d6/2');
667
671
  t.is(log.shift(), 'get vom.rc.o+d6/2 => undefined');
668
672
  t.is(log.shift(), 'set vom.rc.o+d6/2 1');
669
- t.is(log.shift(), 'get watchedPromiseTableID => undefined');
670
- t.is(log.shift(), 'set vc.3.|nextOrdinal 1');
671
- t.is(log.shift(), 'set vc.3.|entryCount 0');
672
- t.is(log.shift(), 'set watchedPromiseTableID o+d6/3');
673
- t.is(log.shift(), 'get vom.rc.o+d6/3 => undefined');
674
- t.is(log.shift(), 'set vom.rc.o+d6/3 1');
675
673
  t.is(
676
674
  log.shift(),
677
675
  'set vom.vkind.10.descriptor {"kindID":"10","tag":"thing"}',
@@ -704,8 +702,6 @@ test('virtual object gc', t => {
704
702
  ['vc.1.|nextOrdinal', '1'],
705
703
  ['vc.2.|entryCount', '0'],
706
704
  ['vc.2.|nextOrdinal', '1'],
707
- ['vc.3.|entryCount', '0'],
708
- ['vc.3.|nextOrdinal', '1'],
709
705
  [`vom.${tbase}/1`, minThing('thing #1')],
710
706
  [`vom.${tbase}/2`, minThing('thing #2')],
711
707
  [`vom.${tbase}/3`, minThing('thing #3')],
@@ -715,12 +711,12 @@ test('virtual object gc', t => {
715
711
  [`vom.${tbase}/7`, minThing('thing #7')],
716
712
  [`vom.${tbase}/8`, minThing('thing #8')],
717
713
  [`vom.${tbase}/9`, minThing('thing #9')],
714
+ ['vom.rc.o+d6/1', '1'],
718
715
  ['vom.rc.o+d6/2', '1'],
719
- ['vom.rc.o+d6/3', '1'],
720
716
  ['vom.vkind.10.descriptor', '{"kindID":"10","tag":"thing"}'],
721
717
  ['vom.vkind.11.descriptor', '{"kindID":"11","tag":"ref"}'],
722
- ['watchedPromiseTableID', 'o+d6/3'],
723
- ['watcherTableID', 'o+d6/2'],
718
+ ['watchedPromiseTableID', 'o+d6/2'],
719
+ ['watcherTableID', 'o+d6/1'],
724
720
  ]);
725
721
 
726
722
  // This is what the finalizer would do if the local reference was dropped and GC'd
@@ -750,8 +746,6 @@ test('virtual object gc', t => {
750
746
  ['vc.1.|nextOrdinal', '1'],
751
747
  ['vc.2.|entryCount', '0'],
752
748
  ['vc.2.|nextOrdinal', '1'],
753
- ['vc.3.|entryCount', '0'],
754
- ['vc.3.|nextOrdinal', '1'],
755
749
  [`vom.es.${tbase}/1`, 'r'],
756
750
  [`vom.${tbase}/1`, minThing('thing #1')],
757
751
  [`vom.${tbase}/2`, minThing('thing #2')],
@@ -762,12 +756,12 @@ test('virtual object gc', t => {
762
756
  [`vom.${tbase}/7`, minThing('thing #7')],
763
757
  [`vom.${tbase}/8`, minThing('thing #8')],
764
758
  [`vom.${tbase}/9`, minThing('thing #9')],
759
+ ['vom.rc.o+d6/1', '1'],
765
760
  ['vom.rc.o+d6/2', '1'],
766
- ['vom.rc.o+d6/3', '1'],
767
761
  ['vom.vkind.10.descriptor', '{"kindID":"10","tag":"thing"}'],
768
762
  ['vom.vkind.11.descriptor', '{"kindID":"11","tag":"ref"}'],
769
- ['watchedPromiseTableID', 'o+d6/3'],
770
- ['watcherTableID', 'o+d6/2'],
763
+ ['watchedPromiseTableID', 'o+d6/2'],
764
+ ['watcherTableID', 'o+d6/1'],
771
765
  ]);
772
766
 
773
767
  // drop export -- should delete
@@ -801,8 +795,6 @@ test('virtual object gc', t => {
801
795
  ['vc.1.|nextOrdinal', '1'],
802
796
  ['vc.2.|entryCount', '0'],
803
797
  ['vc.2.|nextOrdinal', '1'],
804
- ['vc.3.|entryCount', '0'],
805
- ['vc.3.|nextOrdinal', '1'],
806
798
  [`vom.${tbase}/2`, minThing('thing #2')],
807
799
  [`vom.${tbase}/3`, minThing('thing #3')],
808
800
  [`vom.${tbase}/4`, minThing('thing #4')],
@@ -811,12 +803,12 @@ test('virtual object gc', t => {
811
803
  [`vom.${tbase}/7`, minThing('thing #7')],
812
804
  [`vom.${tbase}/8`, minThing('thing #8')],
813
805
  [`vom.${tbase}/9`, minThing('thing #9')],
806
+ ['vom.rc.o+d6/1', '1'],
814
807
  ['vom.rc.o+d6/2', '1'],
815
- ['vom.rc.o+d6/3', '1'],
816
808
  ['vom.vkind.10.descriptor', '{"kindID":"10","tag":"thing"}'],
817
809
  ['vom.vkind.11.descriptor', '{"kindID":"11","tag":"ref"}'],
818
- ['watchedPromiseTableID', 'o+d6/3'],
819
- ['watcherTableID', 'o+d6/2'],
810
+ ['watchedPromiseTableID', 'o+d6/2'],
811
+ ['watcherTableID', 'o+d6/1'],
820
812
  ]);
821
813
 
822
814
  // case 2: export, drop export, drop local ref
@@ -838,8 +830,6 @@ test('virtual object gc', t => {
838
830
  ['vc.1.|nextOrdinal', '1'],
839
831
  ['vc.2.|entryCount', '0'],
840
832
  ['vc.2.|nextOrdinal', '1'],
841
- ['vc.3.|entryCount', '0'],
842
- ['vc.3.|nextOrdinal', '1'],
843
833
  [`vom.es.${tbase}/2`, 's'],
844
834
  [`vom.${tbase}/2`, minThing('thing #2')],
845
835
  [`vom.${tbase}/3`, minThing('thing #3')],
@@ -849,12 +839,12 @@ test('virtual object gc', t => {
849
839
  [`vom.${tbase}/7`, minThing('thing #7')],
850
840
  [`vom.${tbase}/8`, minThing('thing #8')],
851
841
  [`vom.${tbase}/9`, minThing('thing #9')],
842
+ ['vom.rc.o+d6/1', '1'],
852
843
  ['vom.rc.o+d6/2', '1'],
853
- ['vom.rc.o+d6/3', '1'],
854
844
  ['vom.vkind.10.descriptor', '{"kindID":"10","tag":"thing"}'],
855
845
  ['vom.vkind.11.descriptor', '{"kindID":"11","tag":"ref"}'],
856
- ['watchedPromiseTableID', 'o+d6/3'],
857
- ['watcherTableID', 'o+d6/2'],
846
+ ['watchedPromiseTableID', 'o+d6/2'],
847
+ ['watcherTableID', 'o+d6/1'],
858
848
  ]);
859
849
 
860
850
  // drop local ref -- should delete
@@ -879,8 +869,6 @@ test('virtual object gc', t => {
879
869
  ['vc.1.|nextOrdinal', '1'],
880
870
  ['vc.2.|entryCount', '0'],
881
871
  ['vc.2.|nextOrdinal', '1'],
882
- ['vc.3.|entryCount', '0'],
883
- ['vc.3.|nextOrdinal', '1'],
884
872
  [`vom.${tbase}/3`, minThing('thing #3')],
885
873
  [`vom.${tbase}/4`, minThing('thing #4')],
886
874
  [`vom.${tbase}/5`, minThing('thing #5')],
@@ -888,12 +876,12 @@ test('virtual object gc', t => {
888
876
  [`vom.${tbase}/7`, minThing('thing #7')],
889
877
  [`vom.${tbase}/8`, minThing('thing #8')],
890
878
  [`vom.${tbase}/9`, minThing('thing #9')],
879
+ ['vom.rc.o+d6/1', '1'],
891
880
  ['vom.rc.o+d6/2', '1'],
892
- ['vom.rc.o+d6/3', '1'],
893
881
  ['vom.vkind.10.descriptor', '{"kindID":"10","tag":"thing"}'],
894
882
  ['vom.vkind.11.descriptor', '{"kindID":"11","tag":"ref"}'],
895
- ['watchedPromiseTableID', 'o+d6/3'],
896
- ['watcherTableID', 'o+d6/2'],
883
+ ['watchedPromiseTableID', 'o+d6/2'],
884
+ ['watcherTableID', 'o+d6/1'],
897
885
  ]);
898
886
 
899
887
  // case 3: drop local ref with no prior export
@@ -919,20 +907,18 @@ test('virtual object gc', t => {
919
907
  ['vc.1.|nextOrdinal', '1'],
920
908
  ['vc.2.|entryCount', '0'],
921
909
  ['vc.2.|nextOrdinal', '1'],
922
- ['vc.3.|entryCount', '0'],
923
- ['vc.3.|nextOrdinal', '1'],
924
910
  [`vom.${tbase}/4`, minThing('thing #4')],
925
911
  [`vom.${tbase}/5`, minThing('thing #5')],
926
912
  [`vom.${tbase}/6`, minThing('thing #6')],
927
913
  [`vom.${tbase}/7`, minThing('thing #7')],
928
914
  [`vom.${tbase}/8`, minThing('thing #8')],
929
915
  [`vom.${tbase}/9`, minThing('thing #9')],
916
+ ['vom.rc.o+d6/1', '1'],
930
917
  ['vom.rc.o+d6/2', '1'],
931
- ['vom.rc.o+d6/3', '1'],
932
918
  ['vom.vkind.10.descriptor', '{"kindID":"10","tag":"thing"}'],
933
919
  ['vom.vkind.11.descriptor', '{"kindID":"11","tag":"ref"}'],
934
- ['watchedPromiseTableID', 'o+d6/3'],
935
- ['watcherTableID', 'o+d6/2'],
920
+ ['watchedPromiseTableID', 'o+d6/2'],
921
+ ['watcherTableID', 'o+d6/1'],
936
922
  ]);
937
923
 
938
924
  // case 4: ref virtually, export, drop local ref, drop export
@@ -949,21 +935,19 @@ test('virtual object gc', t => {
949
935
  ['vc.1.|nextOrdinal', '1'],
950
936
  ['vc.2.|entryCount', '0'],
951
937
  ['vc.2.|nextOrdinal', '1'],
952
- ['vc.3.|entryCount', '0'],
953
- ['vc.3.|nextOrdinal', '1'],
954
938
  [`vom.${tbase}/4`, minThing('thing #4')],
955
939
  [`vom.${tbase}/5`, minThing('thing #5')],
956
940
  [`vom.${tbase}/6`, minThing('thing #6')],
957
941
  [`vom.${tbase}/7`, minThing('thing #7')],
958
942
  [`vom.${tbase}/8`, minThing('thing #8')],
959
943
  [`vom.${tbase}/9`, minThing('thing #9')],
944
+ ['vom.rc.o+d6/1', '1'],
960
945
  ['vom.rc.o+d6/2', '1'],
961
- ['vom.rc.o+d6/3', '1'],
962
946
  [`vom.rc.${tbase}/4`, '1'],
963
947
  ['vom.vkind.10.descriptor', '{"kindID":"10","tag":"thing"}'],
964
948
  ['vom.vkind.11.descriptor', '{"kindID":"11","tag":"ref"}'],
965
- ['watchedPromiseTableID', 'o+d6/3'],
966
- ['watcherTableID', 'o+d6/2'],
949
+ ['watchedPromiseTableID', 'o+d6/2'],
950
+ ['watcherTableID', 'o+d6/1'],
967
951
  ]);
968
952
  // export
969
953
  setExportStatus(`${tbase}/4`, 'reachable');
@@ -1001,8 +985,6 @@ test('virtual object gc', t => {
1001
985
  ['vc.1.|nextOrdinal', '1'],
1002
986
  ['vc.2.|entryCount', '0'],
1003
987
  ['vc.2.|nextOrdinal', '1'],
1004
- ['vc.3.|entryCount', '0'],
1005
- ['vc.3.|nextOrdinal', '1'],
1006
988
  [`vom.es.${tbase}/4`, 's'],
1007
989
  [`vom.es.${tbase}/5`, 'r'],
1008
990
  [`vom.${tbase}/4`, minThing('thing #4')],
@@ -1011,14 +993,14 @@ test('virtual object gc', t => {
1011
993
  [`vom.${tbase}/7`, minThing('thing #7')],
1012
994
  [`vom.${tbase}/8`, minThing('thing #8')],
1013
995
  [`vom.${tbase}/9`, minThing('thing #9')],
996
+ ['vom.rc.o+d6/1', '1'],
1014
997
  ['vom.rc.o+d6/2', '1'],
1015
- ['vom.rc.o+d6/3', '1'],
1016
998
  [`vom.rc.${tbase}/4`, '1'],
1017
999
  [`vom.rc.${tbase}/5`, '1'],
1018
1000
  ['vom.vkind.10.descriptor', '{"kindID":"10","tag":"thing"}'],
1019
1001
  ['vom.vkind.11.descriptor', '{"kindID":"11","tag":"ref"}'],
1020
- ['watchedPromiseTableID', 'o+d6/3'],
1021
- ['watcherTableID', 'o+d6/2'],
1002
+ ['watchedPromiseTableID', 'o+d6/2'],
1003
+ ['watcherTableID', 'o+d6/1'],
1022
1004
  ]);
1023
1005
  // drop local ref -- should not delete because ref'd virtually AND exported
1024
1006
  pretendGC(`${tbase}/5`, false);
@@ -1046,8 +1028,6 @@ test('virtual object gc', t => {
1046
1028
  ['vc.1.|nextOrdinal', '1'],
1047
1029
  ['vc.2.|entryCount', '0'],
1048
1030
  ['vc.2.|nextOrdinal', '1'],
1049
- ['vc.3.|entryCount', '0'],
1050
- ['vc.3.|nextOrdinal', '1'],
1051
1031
  [`vom.es.${tbase}/4`, 's'],
1052
1032
  [`vom.es.${tbase}/5`, 's'],
1053
1033
  [`vom.${tbase}/4`, minThing('thing #4')],
@@ -1056,15 +1036,15 @@ test('virtual object gc', t => {
1056
1036
  [`vom.${tbase}/7`, minThing('thing #7')],
1057
1037
  [`vom.${tbase}/8`, minThing('thing #8')],
1058
1038
  [`vom.${tbase}/9`, minThing('thing #9')],
1039
+ ['vom.rc.o+d6/1', '1'],
1059
1040
  ['vom.rc.o+d6/2', '1'],
1060
- ['vom.rc.o+d6/3', '1'],
1061
1041
  [`vom.rc.${tbase}/4`, '1'],
1062
1042
  [`vom.rc.${tbase}/5`, '1'],
1063
1043
  [`vom.rc.${tbase}/6`, '1'],
1064
1044
  ['vom.vkind.10.descriptor', '{"kindID":"10","tag":"thing"}'],
1065
1045
  ['vom.vkind.11.descriptor', '{"kindID":"11","tag":"ref"}'],
1066
- ['watchedPromiseTableID', 'o+d6/3'],
1067
- ['watcherTableID', 'o+d6/2'],
1046
+ ['watchedPromiseTableID', 'o+d6/2'],
1047
+ ['watcherTableID', 'o+d6/1'],
1068
1048
  ]);
1069
1049
  // drop local ref -- should not delete because ref'd virtually
1070
1050
  pretendGC(`${tbase}/6`, false);
@@ -1078,8 +1058,6 @@ test('virtual object gc', t => {
1078
1058
  ['vc.1.|nextOrdinal', '1'],
1079
1059
  ['vc.2.|entryCount', '0'],
1080
1060
  ['vc.2.|nextOrdinal', '1'],
1081
- ['vc.3.|entryCount', '0'],
1082
- ['vc.3.|nextOrdinal', '1'],
1083
1061
  [`vom.es.${tbase}/4`, 's'],
1084
1062
  [`vom.es.${tbase}/5`, 's'],
1085
1063
  [`vom.${tbase}/4`, minThing('thing #4')],
@@ -1088,15 +1066,15 @@ test('virtual object gc', t => {
1088
1066
  [`vom.${tbase}/7`, minThing('thing #7')],
1089
1067
  [`vom.${tbase}/8`, minThing('thing #8')],
1090
1068
  [`vom.${tbase}/9`, minThing('thing #9')],
1069
+ ['vom.rc.o+d6/1', '1'],
1091
1070
  ['vom.rc.o+d6/2', '1'],
1092
- ['vom.rc.o+d6/3', '1'],
1093
1071
  [`vom.rc.${tbase}/4`, '1'],
1094
1072
  [`vom.rc.${tbase}/5`, '1'],
1095
1073
  [`vom.rc.${tbase}/6`, '1'],
1096
1074
  ['vom.vkind.10.descriptor', '{"kindID":"10","tag":"thing"}'],
1097
1075
  ['vom.vkind.11.descriptor', '{"kindID":"11","tag":"ref"}'],
1098
- ['watchedPromiseTableID', 'o+d6/3'],
1099
- ['watcherTableID', 'o+d6/2'],
1076
+ ['watchedPromiseTableID', 'o+d6/2'],
1077
+ ['watcherTableID', 'o+d6/1'],
1100
1078
  ]);
1101
1079
  });
1102
1080
 
@@ -1 +1 @@
1
- {"version":3,"file":"fakeVirtualSupport.d.ts","sourceRoot":"","sources":["fakeVirtualSupport.js"],"names":[],"mappings":"AAyCA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAuQC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAcC;AAED;;;mEA9HE,wBAEa,iDACiB,GAAI,gDAI/B,GAAI,4BACuB,iBACtB;kFAgD6D,iBAC/D;EAmFP;AAED;;;;;;;;;;GAUG;AACH,+CAPG;IAAyB,SAAS;IACR,oBAAoB;I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