Rename buf1, reader1, etc to io_buffer, io_reader

Also remove the unused Buf1, Buf2 and Usize tokens.
This commit is contained in:
Nigel Tao committed 2018-04-05 20:49:48 +10:00
1 parent 82a48796c8
commit 97aab37462
46 files changed
+823 -847

No files matched your search

+4 -4
View File
@@ -121,7 +121,7 @@ pub struct decoder?(
end_of_block bool,
)
pub func decoder.decode?(dst writer1, src reader1)() {
pub func decoder.decode?(dst io_writer, src io_reader)() {
while true {
in.dst.mark()
var z status = try this.decode_blocks?(dst:in.dst, src:in.src)
@@ -173,7 +173,7 @@ pub func decoder.decode?(dst writer1, src reader1)() {
}
}
pri func decoder.decode_blocks?(dst writer1, src reader1)() {
pri func decoder.decode_blocks?(dst io_writer, src io_reader)() {
var final u32
while final == 0 {
while this.n_bits < 3,
@@ -213,7 +213,7 @@ pri func decoder.decode_blocks?(dst writer1, src reader1)() {
// decode_uncompressed decodes an uncompresed block as per the RFC section
// 3.2.4.
pri func decoder.decode_uncompressed?(dst writer1, src reader1)() {
pri func decoder.decode_uncompressed?(dst io_writer, src io_reader)() {
// TODO: make this "if" into a function invariant?
//
// Ditto for decode_huffman_slow and decode_huffman_fast.
@@ -272,7 +272,7 @@ pri func decoder.init_fixed_huffman?()() {
}
// init_dynamic_huffman initializes this.huffs as per the RFC section 3.2.7.
pri func decoder.init_dynamic_huffman?(src reader1)() {
pri func decoder.init_dynamic_huffman?(src io_reader)() {
var bits u32 = this.bits
var n_bits u32 = this.n_bits
while n_bits < 14,
+1 -1
View File
@@ -14,7 +14,7 @@
// TODO: describe how the xxx_fast version differs from the xxx_slow one, the
// assumptions that xxx_fast makes, and how that makes it fast.
pri func decoder.decode_huffman_fast?(dst writer1, src reader1)() {
pri func decoder.decode_huffman_fast?(dst io_writer, src io_reader)() {
// When editing this function, consider making the equivalent change to the
// decode_huffman_slow function. Keep the diff between the two
// decode_huffman_*.wuffs files as small as possible, while retaining both
+1 -1
View File
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
pri func decoder.decode_huffman_slow?(dst writer1, src reader1)() {
pri func decoder.decode_huffman_slow?(dst io_writer, src io_reader)() {
// When editing this function, consider making the equivalent change to the
// decode_huffman_fast function. Keep the diff between the two
// decode_huffman_*.wuffs files as small as possible, while retaining both