diff --git a/packages/marshal/src/encodePassable.js b/packages/marshal/src/encodePassable.js index 387a88b402..bd4ff84cfb 100644 --- a/packages/marshal/src/encodePassable.js +++ b/packages/marshal/src/encodePassable.js @@ -98,6 +98,7 @@ const CanonicalNaNBits = 'fff8000000000000'; */ const encodeBinary64 = n => { // Normalize -0 to 0 and NaN to a canonical encoding + // TODO https://github.com/endojs/endo/issues/1602 if (is(n, -0)) { n = 0; } else if (is(n, NaN)) { diff --git a/packages/marshal/src/encodeToCapData.js b/packages/marshal/src/encodeToCapData.js index 5546072a71..6fba569f66 100644 --- a/packages/marshal/src/encodeToCapData.js +++ b/packages/marshal/src/encodeToCapData.js @@ -149,6 +149,7 @@ export const makeEncodeToCapData = (encodeOptions = {}) => { return { [QCLASS]: '-Infinity' }; } // Pass through everything else, replacing -0 with 0. + // TODO https://github.com/endojs/endo/issues/1602 return is(passable, -0) ? 0 : passable; } case 'bigint': { diff --git a/packages/marshal/src/encodeToSmallcaps.js b/packages/marshal/src/encodeToSmallcaps.js index f96c51b841..a006148f14 100644 --- a/packages/marshal/src/encodeToSmallcaps.js +++ b/packages/marshal/src/encodeToSmallcaps.js @@ -204,6 +204,7 @@ export const makeEncodeToSmallcaps = (encodeOptions = {}) => { return '#-Infinity'; } // Pass through everything else, replacing -0 with 0. + // TODO https://github.com/endojs/endo/issues/1602 return is(passable, -0) ? 0 : passable; } case 'bigint': { diff --git a/packages/marshal/src/rankOrder.js b/packages/marshal/src/rankOrder.js index f8d8d9d95c..8d1dfccc11 100644 --- a/packages/marshal/src/rankOrder.js +++ b/packages/marshal/src/rankOrder.js @@ -36,6 +36,8 @@ const { entries, fromEntries, setPrototypeOf, is } = Object; * abstractions, where NaN is the same as NaN and -0 is the same as * 0. Marshal serializes -0 as zero, so the semantics of our distributed * object system does not distinguish 0 from -0. + * TODO https://github.com/endojs/endo/issues/1602 + * and revise above comment. * * `sameValueZero` is the EcmaScript spec name for this equality comparison, * but TODO we need a better name for the API.