Fix some built-in methods' effects

This commit is contained in:
Nigel Tao committed 2018-05-12 17:55:57 +10:00
1 parent 2919e51575
commit 131732e7eb
8 files changed
+21 -24

No files matched your search

+3 -3
View File
@@ -318,13 +318,13 @@ pri func decoder.decode_huffman_fast?(dst base.io_writer, src base.io_reader)()
// TODO: copy_from_slice32 should probably update the
// "in.dst.available() >= 258" fact. It should certainly
// invalidate any fact that was "<=" instead of ">=".
n_copied = in.dst.copy_from_slice32(
n_copied = in.dst.copy_from_slice32!(
s:this.history[hdist & 0x7FFF:], length:hlen)
if hlen <= n_copied {
break
}
hlen -= n_copied
in.dst.copy_from_slice32(s:this.history[:], length:hlen)
in.dst.copy_from_slice32!(s:this.history[:], length:hlen)
break
}
@@ -348,7 +348,7 @@ pri func decoder.decode_huffman_fast?(dst base.io_writer, src base.io_reader)()
assert (length as base.u64) <= in.dst.available() via "a <= b: a <= c; c <= b"(c:258)
// Copy from in.dst.
in.dst.copy_from_history32(distance:(dist_minus_1 + 1), length:length)
in.dst.copy_from_history32!(distance:(dist_minus_1 + 1), length:length)
break
}
}