@agoric/internal 0.3.3-dev-a98a0f0.0.a98a0f0 → 0.3.3-dev-f199a73.0.f199a73

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/internal",
3
- "version": "0.3.3-dev-a98a0f0.0.a98a0f0",
3
+ "version": "0.3.3-dev-f199a73.0.f199a73",
4
4
  "description": "Externally unsupported utilities internal to agoric-sdk",
5
5
  "repository": {
6
6
  "type": "git",
@@ -24,7 +24,7 @@
24
24
  "lint:types": "yarn run -T tsgo --tsBuildInfoFile tsconfig.tsgo.tsbuildinfo"
25
25
  },
26
26
  "dependencies": {
27
- "@agoric/base-zone": "0.1.1-dev-a98a0f0.0.a98a0f0",
27
+ "@agoric/base-zone": "0.1.1-dev-f199a73.0.f199a73",
28
28
  "@endo/cache-map": "^1.1.0",
29
29
  "@endo/common": "^1.4.0",
30
30
  "@endo/compartment-mapper": "^2.3.0",
@@ -42,7 +42,7 @@
42
42
  "jessie.js": "^0.3.4"
43
43
  },
44
44
  "devDependencies": {
45
- "@agoric/cosmic-proto": "0.4.1-dev-a98a0f0.0.a98a0f0",
45
+ "@agoric/cosmic-proto": "0.4.1-dev-f199a73.0.f199a73",
46
46
  "@endo/exo": "^1.7.0",
47
47
  "@endo/init": "^1.1.13",
48
48
  "@endo/ses-ava": "^1.4.2",
@@ -62,5 +62,5 @@
62
62
  "typeCoverage": {
63
63
  "atLeast": 95.63
64
64
  },
65
- "gitHead": "a98a0f0d9930b1875bea2f51b43f5daeeada23c8"
65
+ "gitHead": "f199a73e09237872162e5fca668948011a8cb650"
66
66
  }
package/src/hex.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"hex.d.ts","sourceRoot":"","sources":["hex.js"],"names":[],"mappings":"AAmCO,wCAFM,QAAQ,CAyBpB;AAgBM,iDAJI,oBAAoB,GAElB,QAAQ,CAoBpB;8BA1FmB,UAAU,KAAK,MAAM;8BACrB,MAAM,KAAK,UAAU;;eAD3B,CAAC,GAAG,EAAE,UAAU,KAAK,MAAM;eAC3B,CAAC,GAAG,EAAE,MAAM,KAAK,UAAU;;;;;mCA0D5B,IAAI,CAAC,iBAAiB,EAAE,MAAM,GAAG,UAAU,CAAC,GAAG;IACvD,SAAS,EAAE,IAAI,CAAC,MAAM,EAAE,UAAU,CAAC,GAAG,UAAU,CAAC;CAClD"}
1
+ {"version":3,"file":"hex.d.ts","sourceRoot":"","sources":["hex.js"],"names":[],"mappings":"AAkCO,wCAFM,QAAQ,CAyBpB;AAgBM,iDAJI,oBAAoB,GAElB,QAAQ,CAoBpB;8BAzFmB,UAAU,KAAK,MAAM;8BACrB,MAAM,KAAK,UAAU;;eAD3B,CAAC,GAAG,EAAE,UAAU,KAAK,MAAM;eAC3B,CAAC,GAAG,EAAE,MAAM,KAAK,UAAU;;;;;mCAyD5B,IAAI,CAAC,iBAAiB,EAAE,MAAM,GAAG,UAAU,CAAC,GAAG;IACvD,SAAS,EAAE,IAAI,CAAC,MAAM,EAAE,UAAU,CAAC,GAAG,UAAU,CAAC;CAClD"}
package/src/hex.js CHANGED
@@ -5,13 +5,10 @@
5
5
  */
6
6
 
7
7
  /** @type {string[]} */
8
- const encodings = Array.from({ length: 256 }, (_, b) =>
9
- // Write the hex representation of the byte.
10
- b.toString(16).padStart(2, '0'),
11
- );
8
+ const encodings = new Array(256);
12
9
 
13
10
  /**
14
- * Create map entries for all four permutations of lowercase and uppercase
11
+ * Map entries for all four permutations of lowercase and uppercase
15
12
  * transformations of the two hex digits per byte. The map is keyed by the hex
16
13
  * string and the value is the byte value. This allows for fast lookups when
17
14
  * decoding hex strings.
@@ -19,9 +16,11 @@ const encodings = Array.from({ length: 256 }, (_, b) =>
19
16
  * @type {Map<string, number>}
20
17
  */
21
18
  const decodings = new Map();
22
- for (const [b, hexdigits] of encodings.entries()) {
23
- const lo = hexdigits.toLowerCase();
24
- const UP = hexdigits.toUpperCase();
19
+ for (let b = 0; b < 256; b += 1) {
20
+ // Write the hex representation of the byte.
21
+ const lo = b.toString(16).padStart(2, '0');
22
+ const UP = lo.toUpperCase();
23
+ encodings[b] = lo;
25
24
  decodings.set(lo, b);
26
25
  decodings.set(`${lo[0]}${UP[1]}`, b);
27
26
  decodings.set(`${UP[0]}${lo[1]}`, b);
@@ -200,9 +200,9 @@ export const wrapRemoteMarshallerSendSlotsOnly = (
200
200
  let hasRemoteCap = false;
201
201
  const { length } = slots;
202
202
  /** @type {(RemotableSlotWrapper<NonNullable<Slot>> | null | undefined)[]} */
203
- const slotWrapperMappedSlots = Array.from({ length });
203
+ const slotWrapperMappedSlots = new Array(length).fill(undefined);
204
204
  /** @type {(object | null | undefined)[]} */
205
- const locallyResolvedCapSlots = Array.from({ length });
205
+ const locallyResolvedCapSlots = new Array(length).fill(undefined);
206
206
 
207
207
  for (const [index, slot] of slots.entries()) {
208
208
  if (slot === null) {
@@ -268,9 +268,9 @@ export const wrapRemoteMarshallerSendSlotsOnly = (
268
268
  let hasRemoteCap = false;
269
269
  const { length } = caps;
270
270
  /** @type {(Slot | null | undefined)[]} */
271
- const locallyResolvedSlots = Array.from({ length });
271
+ const locallyResolvedSlots = new Array(length).fill(undefined);
272
272
  /** @type {(object | null | undefined)[]} */
273
- const remoteCapsToResolve = Array.from({ length });
273
+ const remoteCapsToResolve = new Array(length).fill(undefined);
274
274
 
275
275
  for (const [index, cap] of caps.entries()) {
276
276
  if (cap === null) {