From 2e24d8d49e79690d2cb9fae7d4e7bb6247a7000d Mon Sep 17 00:00:00 2001 From: Brian Warner Date: Sun, 8 Sep 2019 18:19:09 -0700 Subject: [PATCH] move parseVatSlots.js out of src/vats/ up to src/ --- src/kernel/deviceManager.js | 2 +- src/kernel/deviceSlots.js | 6 +----- src/kernel/kernel.js | 2 +- src/kernel/liveSlots.js | 6 +----- src/kernel/state/deviceKeeper.js | 2 +- src/kernel/state/vatKeeper.js | 2 +- src/kernel/vatManager.js | 2 +- src/{vats => }/parseVatSlots.js | 2 +- src/vats/comms/clist.js | 2 +- src/vats/comms/dispatch.js | 2 +- src/vats/comms/outbound.js | 2 +- src/vats/comms/remote.js | 2 +- src/vats/comms/state.js | 2 +- test/test-kernel.js | 2 +- 14 files changed, 14 insertions(+), 22 deletions(-) rename src/{vats => }/parseVatSlots.js (98%) diff --git a/src/kernel/deviceManager.js b/src/kernel/deviceManager.js index d93d38e49b3..16bdff34adb 100644 --- a/src/kernel/deviceManager.js +++ b/src/kernel/deviceManager.js @@ -1,7 +1,7 @@ import harden from '@agoric/harden'; import { insist } from '../insist'; import { insistKernelType } from './parseKernelSlots'; -import { insistVatType, parseVatSlot } from '../vats/parseVatSlots'; +import { insistVatType, parseVatSlot } from '../parseVatSlots'; export default function makeDeviceManager( deviceName, diff --git a/src/kernel/deviceSlots.js b/src/kernel/deviceSlots.js index 9dc0d1328af..96ad49f40d9 100644 --- a/src/kernel/deviceSlots.js +++ b/src/kernel/deviceSlots.js @@ -2,11 +2,7 @@ import harden from '@agoric/harden'; import Nat from '@agoric/nat'; import { QCLASS, mustPassByPresence, makeMarshal } from '@agoric/marshal'; import { insist } from '../insist'; -import { - insistVatType, - makeVatSlot, - parseVatSlot, -} from '../vats/parseVatSlots'; +import { insistVatType, makeVatSlot, parseVatSlot } from '../parseVatSlots'; // 'makeDeviceSlots' is a subset of makeLiveSlots, for device code diff --git a/src/kernel/kernel.js b/src/kernel/kernel.js index 1a35200b720..7e0c23b5b7d 100644 --- a/src/kernel/kernel.js +++ b/src/kernel/kernel.js @@ -8,7 +8,7 @@ import makeVatManager from './vatManager'; import makeDeviceManager from './deviceManager'; import makeKernelKeeper from './state/kernelKeeper'; import { insistKernelType, parseKernelSlot } from './parseKernelSlots'; -import { makeVatSlot } from '../vats/parseVatSlots'; +import { makeVatSlot } from '../parseVatSlots'; import { insist } from '../insist'; function abbreviateReviver(_, arg) { diff --git a/src/kernel/liveSlots.js b/src/kernel/liveSlots.js index 8dfad7cd7e1..32a2cb39aa2 100644 --- a/src/kernel/liveSlots.js +++ b/src/kernel/liveSlots.js @@ -2,11 +2,7 @@ import harden from '@agoric/harden'; import Nat from '@agoric/nat'; import { QCLASS, mustPassByPresence, makeMarshal } from '@agoric/marshal'; import { insist } from '../insist'; -import { - insistVatType, - makeVatSlot, - parseVatSlot, -} from '../vats/parseVatSlots'; +import { insistVatType, makeVatSlot, parseVatSlot } from '../parseVatSlots'; // 'makeLiveSlots' is a dispatcher which uses javascript Maps to keep track // of local objects which have been exported. These cannot be persisted diff --git a/src/kernel/state/deviceKeeper.js b/src/kernel/state/deviceKeeper.js index afab7f70dfb..d23423e3b0d 100644 --- a/src/kernel/state/deviceKeeper.js +++ b/src/kernel/state/deviceKeeper.js @@ -1,7 +1,7 @@ import harden from '@agoric/harden'; import { insist } from '../../insist'; import { parseKernelSlot } from '../parseKernelSlots'; -import { makeVatSlot, parseVatSlot } from '../../vats/parseVatSlots'; +import { makeVatSlot, parseVatSlot } from '../../parseVatSlots'; // makeVatKeeper is a pure function: all state is kept in the argument object diff --git a/src/kernel/state/vatKeeper.js b/src/kernel/state/vatKeeper.js index 5d211d7e1ef..78b1c306087 100644 --- a/src/kernel/state/vatKeeper.js +++ b/src/kernel/state/vatKeeper.js @@ -1,7 +1,7 @@ import harden from '@agoric/harden'; import { insist } from '../../insist'; import { parseKernelSlot } from '../parseKernelSlots'; -import { makeVatSlot, parseVatSlot } from '../../vats/parseVatSlots'; +import { makeVatSlot, parseVatSlot } from '../../parseVatSlots'; // makeVatKeeper is a pure function: all state is kept in the argument object diff --git a/src/kernel/vatManager.js b/src/kernel/vatManager.js index babb89e051b..fa547907dd0 100644 --- a/src/kernel/vatManager.js +++ b/src/kernel/vatManager.js @@ -2,7 +2,7 @@ import harden from '@agoric/harden'; import djson from './djson'; import { insist } from '../insist'; import { insistKernelType, parseKernelSlot } from './parseKernelSlots'; -import { insistVatType, parseVatSlot } from '../vats/parseVatSlots'; +import { insistVatType, parseVatSlot } from '../parseVatSlots'; export default function makeVatManager( vatID, diff --git a/src/vats/parseVatSlots.js b/src/parseVatSlots.js similarity index 98% rename from src/vats/parseVatSlots.js rename to src/parseVatSlots.js index 446eb70dc38..314d2e474db 100644 --- a/src/vats/parseVatSlots.js +++ b/src/parseVatSlots.js @@ -1,5 +1,5 @@ import Nat from '@agoric/nat'; -import { insist } from '../insist'; +import { insist } from './insist'; // Object/promise references (in vats) contain a three-tuple of (type, // allocator flag, index). The 'ownership' flag is expressed as a sign: "-" diff --git a/src/vats/comms/clist.js b/src/vats/comms/clist.js index 54949fdb361..93bd0f5e7b5 100644 --- a/src/vats/comms/clist.js +++ b/src/vats/comms/clist.js @@ -1,5 +1,5 @@ import Nat from '@agoric/nat'; -import { makeVatSlot, parseVatSlot, insistVatType } from '../parseVatSlots'; +import { makeVatSlot, parseVatSlot, insistVatType } from '../../parseVatSlots'; import { flipRemoteSlot, insistRemoteType, diff --git a/src/vats/comms/dispatch.js b/src/vats/comms/dispatch.js index 0c44e3b1375..eacf614bfb9 100644 --- a/src/vats/comms/dispatch.js +++ b/src/vats/comms/dispatch.js @@ -1,5 +1,5 @@ import harden from '@agoric/harden'; -import { makeVatSlot } from '../parseVatSlots'; +import { makeVatSlot } from '../../parseVatSlots'; import { getRemote } from './remote'; import { makeState } from './state'; import { deliverToRemote, resolvePromiseToRemote } from './outbound'; diff --git a/src/vats/comms/outbound.js b/src/vats/comms/outbound.js index 66ad202ec89..2fed53ae76b 100644 --- a/src/vats/comms/outbound.js +++ b/src/vats/comms/outbound.js @@ -1,4 +1,4 @@ -import { insistVatType } from '../parseVatSlots'; +import { insistVatType } from '../../parseVatSlots'; import { insistRemoteType } from './parseRemoteSlot'; import { getOutbound, mapOutbound, mapOutboundResult } from './clist'; import { diff --git a/src/vats/comms/remote.js b/src/vats/comms/remote.js index f9e5b2c1915..560a4522c81 100644 --- a/src/vats/comms/remote.js +++ b/src/vats/comms/remote.js @@ -1,5 +1,5 @@ import Nat from '@agoric/nat'; -import { makeVatSlot, insistVatType } from '../parseVatSlots'; +import { makeVatSlot, insistVatType } from '../../parseVatSlots'; import { insist } from '../../insist'; function makeRemoteID(index) { diff --git a/src/vats/comms/state.js b/src/vats/comms/state.js index 09da1e3abe0..3cefcf41797 100644 --- a/src/vats/comms/state.js +++ b/src/vats/comms/state.js @@ -1,5 +1,5 @@ import { insist } from '../../insist'; -import { makeVatSlot } from '../parseVatSlots'; +import { makeVatSlot } from '../../parseVatSlots'; export function makeState() { const state = { diff --git a/test/test-kernel.js b/test/test-kernel.js index 22afae53c3f..06910d1e0f7 100644 --- a/test/test-kernel.js +++ b/test/test-kernel.js @@ -2,7 +2,7 @@ /* global setImmediate */ import { test } from 'tape-promise/tape'; import buildKernel from '../src/kernel/index'; -import { makeVatSlot } from '../src/vats/parseVatSlots'; +import { makeVatSlot } from '../src/parseVatSlots'; import { checkKT } from './util'; function checkPromises(t, kernel, expected) {