lib/crypto/sha256: cite #269 for the def-array-dim divergence (rule-7)
The literal array dimensions ([64]u8/[8]u32/[64]u32) where Hare uses the BLOCKSZ def / [_]u32 are forced by ww rejecting a def in array-dimension position. rule-7 requires a retained divergence carry a filed-task pointer; add the #269 cite to the header divergence list and the state.x at-site note (previously described the limitation but cited no task).
This commit is contained in:
@@ -18,6 +18,10 @@
|
|||||||
// [[sha256]] rather than pointing at a module-level const vtable
|
// [[sha256]] rather than pointing at a module-level const vtable
|
||||||
// (the base64/memio/io convention; ww has no const-vtable-of-fn-ptrs
|
// (the base64/memio/io convention; ww has no const-vtable-of-fn-ptrs
|
||||||
// idiom).
|
// idiom).
|
||||||
|
// - array dimensions are integer literals (`[64]u8`, `[8]u32`,
|
||||||
|
// `[64]u32`) where Hare uses the `BLOCKSZ` def / `[_]u32`: ww rejects
|
||||||
|
// a def in array-dimension position ("array length must be an integer
|
||||||
|
// literal"). Retained language divergence — filed as #269.
|
||||||
// - slice-to-slice copy assignment (`h.x[a..b] = b[..n]`) is spelled
|
// - slice-to-slice copy assignment (`h.x[a..b] = b[..n]`) is spelled
|
||||||
// as a byte loop — ww has no slice-copy assignment (cf lib/memio's
|
// as a byte loop — ww has no slice-copy assignment (cf lib/memio's
|
||||||
// flat-field note). Same observable effect.
|
// flat-field note). Same observable effect.
|
||||||
@@ -78,7 +82,7 @@ def k: [64]u32 = [
|
|||||||
export type state = struct {
|
export type state = struct {
|
||||||
hash.hash,
|
hash.hash,
|
||||||
h: [8]u32,
|
h: [8]u32,
|
||||||
x: [64]u8, // BLOCKSZ; array dims require an integer literal
|
x: [64]u8, // BLOCKSZ; def array dims rejected (#269)
|
||||||
nx: size,
|
nx: size,
|
||||||
ln: size,
|
ln: size,
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user