diff --git a/internal/cgen/base/io-private.h b/internal/cgen/base/io-private.h index d13e055c..e19940c0 100644 --- a/internal/cgen/base/io-private.h +++ b/internal/cgen/base/io-private.h @@ -34,7 +34,7 @@ wuffs_base__io__since(uint64_t mark, uint64_t index, uint8_t* ptr) { static inline uint32_t // wuffs_base__io_writer__copy_n_from_history(uint8_t** ptr_iop_w, - uint8_t* io0_w, + uint8_t* io1_w, uint8_t* io2_w, uint32_t length, uint32_t distance) { @@ -42,7 +42,7 @@ wuffs_base__io_writer__copy_n_from_history(uint8_t** ptr_iop_w, return 0; } uint8_t* p = *ptr_iop_w; - if ((size_t)(p - io0_w) < (size_t)(distance)) { + if ((size_t)(p - io1_w) < (size_t)(distance)) { return 0; } uint8_t* q = p - distance; @@ -78,11 +78,11 @@ wuffs_base__io_writer__copy_n_from_history(uint8_t** ptr_iop_w, // wuffs_base__io_writer__copy_n_from_history function above, but has stronger // pre-conditions. The caller needs to prove that: // - distance > 0 -// - distance <= (*ptr_iop_w - io0_w) +// - distance <= (*ptr_iop_w - io1_w) // - length <= (io2_w - *ptr_iop_w) static inline uint32_t // wuffs_base__io_writer__copy_n_from_history_fast(uint8_t** ptr_iop_w, - uint8_t* io0_w, + uint8_t* io1_w, uint8_t* io2_w, uint32_t length, uint32_t distance) { diff --git a/internal/cgen/builtin.go b/internal/cgen/builtin.go index a2e96be5..e2fcff03 100644 --- a/internal/cgen/builtin.go +++ b/internal/cgen/builtin.go @@ -137,7 +137,7 @@ func (g *gen) writeBuiltinIOReader(b *buffer, recv *a.Expr, method t.ID, args [] return nil case t.IDCanUndoByte: - b.writes("(iop_a_src > io0_a_src)") + b.writes("(iop_a_src > io1_a_src)") return nil case t.IDCountSince: diff --git a/internal/cgen/cgen.go b/internal/cgen/cgen.go index 2b1bac18..670c0e95 100644 --- a/internal/cgen/cgen.go +++ b/internal/cgen/cgen.go @@ -68,22 +68,22 @@ const ( // reading or writing the next byte (and advancing the stream) is essentially // "etc = *iop_a_src++" or "*io_a_dst++ = etc". // -// The other two prefixes, giving names like io0_etc and io2_etc, are +// The other two prefixes, giving names like io1_etc and io2_etc, are // auxilliary pointers: lower and upper inclusive bounds. As an iop_etc pointer // advances, it cannot advance past io2_etc. In the rarer case that an iop_etc -// pointer retreats, undoing a read or write, it cannot retreat past io0_etc. +// pointer retreats, undoing a read or write, it cannot retreat past io1_etc. // // At the start of a function, these pointers are initialized from an // io_buffer's fields (ptr, ri, wi, len). For an io_reader: -// - io0_etc = ptr + ri +// - io1_etc = ptr + ri // - iop_etc = ptr + ri // - io2_etc = ptr + wi // and for an io_writer: -// - io0_etc = ptr + wi +// - io1_etc = ptr + wi // - iop_etc = ptr + wi // - io2_etc = ptr + len const ( - io0Prefix = "io0_" // Lower bound. + io1Prefix = "io1_" // Lower bound. io2Prefix = "io2_" // Upper bound. iopPrefix = "iop_" // Pointer. ) diff --git a/internal/cgen/data.go b/internal/cgen/data.go index de95d331..13e1aea7 100644 --- a/internal/cgen/data.go +++ b/internal/cgen/data.go @@ -163,9 +163,9 @@ const baseImagePublicH = "" + "" const baseIOPrivateH = "" + - "// ---------------- I/O\n\nstatic inline uint64_t //\nwuffs_base__io__count_since(uint64_t mark, uint64_t index) {\n if (index >= mark) {\n return index - mark;\n }\n return 0;\n}\n\nstatic inline wuffs_base__slice_u8 //\nwuffs_base__io__since(uint64_t mark, uint64_t index, uint8_t* ptr) {\n if (index >= mark) {\n return wuffs_base__make_slice_u8(ptr + mark, index - mark);\n }\n return wuffs_base__make_slice_u8(NULL, 0);\n}\n\nstatic inline uint32_t //\nwuffs_base__io_writer__copy_n_from_history(uint8_t** ptr_iop_w,\n uint8_t* io0_w,\n uint8_t* io2_w,\n uint32_t length,\n uint32_t distance) {\n if (!distance) {\n return 0;\n }\n uint8_t* p = *ptr_iop_w;\n if ((size_t)(p - io0_w) < (size_t)(distance)) {\n return 0;\n }\n uint8_t* q = p - distance;\n size_t n = (size_t)(io2_w - p);\n if ((size_t)(length) > n) {\n length = (uint32_t)(n);\n } else {\n" + + "// ---------------- I/O\n\nstatic inline uint64_t //\nwuffs_base__io__count_since(uint64_t mark, uint64_t index) {\n if (index >= mark) {\n return index - mark;\n }\n return 0;\n}\n\nstatic inline wuffs_base__slice_u8 //\nwuffs_base__io__since(uint64_t mark, uint64_t index, uint8_t* ptr) {\n if (index >= mark) {\n return wuffs_base__make_slice_u8(ptr + mark, index - mark);\n }\n return wuffs_base__make_slice_u8(NULL, 0);\n}\n\nstatic inline uint32_t //\nwuffs_base__io_writer__copy_n_from_history(uint8_t** ptr_iop_w,\n uint8_t* io1_w,\n uint8_t* io2_w,\n uint32_t length,\n uint32_t distance) {\n if (!distance) {\n return 0;\n }\n uint8_t* p = *ptr_iop_w;\n if ((size_t)(p - io1_w) < (size_t)(distance)) {\n return 0;\n }\n uint8_t* q = p - distance;\n size_t n = (size_t)(io2_w - p);\n if ((size_t)(length) > n) {\n length = (uint32_t)(n);\n } else {\n" + " n = (size_t)(length);\n }\n // TODO: unrolling by 3 seems best for the std/deflate benchmarks, but that\n // is mostly because 3 is the minimum length for the deflate format. This\n // function implementation shouldn't overfit to that one format. Perhaps the\n // copy_n_from_history Wuffs method should also take an unroll hint argument,\n // and the cgen can look if that argument is the constant expression '3'.\n //\n // See also wuffs_base__io_writer__copy_n_from_history_fast below.\n //\n // Alternatively, or additionally, have a sloppy_copy_n_from_history method\n // that copies 8 bytes at a time, possibly writing more than length bytes?\n for (; n >= 3; n -= 3) {\n *p++ = *q++;\n *p++ = *q++;\n *p++ = *q++;\n }\n for (; n; n--) {\n *p++ = *q++;\n }\n *ptr_iop_w = p;\n return length;\n}\n\n// wuffs_base__io_writer__copy_n_from_history_fast is like the\n// wuffs_base__io_writer__copy_n_from_history function above, but has stronger\n// pre-conditions. The caller needs to prove that:\n// - distance > " + - "0\n// - distance <= (*ptr_iop_w - io0_w)\n// - length <= (io2_w - *ptr_iop_w)\nstatic inline uint32_t //\nwuffs_base__io_writer__copy_n_from_history_fast(uint8_t** ptr_iop_w,\n uint8_t* io0_w,\n uint8_t* io2_w,\n uint32_t length,\n uint32_t distance) {\n uint8_t* p = *ptr_iop_w;\n uint8_t* q = p - distance;\n uint32_t n = length;\n for (; n >= 3; n -= 3) {\n *p++ = *q++;\n *p++ = *q++;\n *p++ = *q++;\n }\n for (; n; n--) {\n *p++ = *q++;\n }\n *ptr_iop_w = p;\n return length;\n}\n\nstatic inline uint32_t //\nwuffs_base__io_writer__copy_n_from_reader(uint8_t** ptr_iop_w,\n uint8_t* io2_w,\n uint32_t length,\n uint8_t** ptr_iop_r,\n uint8_t* io2_r) {\n uint8_t* i" + + "0\n// - distance <= (*ptr_iop_w - io1_w)\n// - length <= (io2_w - *ptr_iop_w)\nstatic inline uint32_t //\nwuffs_base__io_writer__copy_n_from_history_fast(uint8_t** ptr_iop_w,\n uint8_t* io1_w,\n uint8_t* io2_w,\n uint32_t length,\n uint32_t distance) {\n uint8_t* p = *ptr_iop_w;\n uint8_t* q = p - distance;\n uint32_t n = length;\n for (; n >= 3; n -= 3) {\n *p++ = *q++;\n *p++ = *q++;\n *p++ = *q++;\n }\n for (; n; n--) {\n *p++ = *q++;\n }\n *ptr_iop_w = p;\n return length;\n}\n\nstatic inline uint32_t //\nwuffs_base__io_writer__copy_n_from_reader(uint8_t** ptr_iop_w,\n uint8_t* io2_w,\n uint32_t length,\n uint8_t** ptr_iop_r,\n uint8_t* io2_r) {\n uint8_t* i" + "op_w = *ptr_iop_w;\n size_t n = length;\n if (n > ((size_t)(io2_w - iop_w))) {\n n = (size_t)(io2_w - iop_w);\n }\n uint8_t* iop_r = *ptr_iop_r;\n if (n > ((size_t)(io2_r - iop_r))) {\n n = (size_t)(io2_r - iop_r);\n }\n if (n > 0) {\n memmove(iop_w, iop_r, n);\n *ptr_iop_w += n;\n *ptr_iop_r += n;\n }\n return (uint32_t)(n);\n}\n\nstatic inline uint64_t //\nwuffs_base__io_writer__copy_from_slice(uint8_t** ptr_iop_w,\n uint8_t* io2_w,\n wuffs_base__slice_u8 src) {\n uint8_t* iop_w = *ptr_iop_w;\n size_t n = src.len;\n if (n > ((size_t)(io2_w - iop_w))) {\n n = (size_t)(io2_w - iop_w);\n }\n if (n > 0) {\n memmove(iop_w, src.ptr, n);\n *ptr_iop_w += n;\n }\n return (uint64_t)(n);\n}\n\nstatic inline uint32_t //\nwuffs_base__io_writer__copy_n_from_slice(uint8_t** ptr_iop_w,\n uint8_t* io2_w,\n uint32_t length,\n w" + "uffs_base__slice_u8 src) {\n uint8_t* iop_w = *ptr_iop_w;\n size_t n = src.len;\n if (n > length) {\n n = length;\n }\n if (n > ((size_t)(io2_w - iop_w))) {\n n = (size_t)(io2_w - iop_w);\n }\n if (n > 0) {\n memmove(iop_w, src.ptr, n);\n *ptr_iop_w += n;\n }\n return (uint32_t)(n);\n}\n\nstatic inline wuffs_base__empty_struct //\nwuffs_base__io_reader__set(wuffs_base__io_buffer** o,\n wuffs_base__io_buffer* b,\n uint8_t** ptr_iop_r,\n uint8_t** ptr_io2_r,\n wuffs_base__slice_u8 data) {\n b->data = data;\n b->meta.wi = data.len;\n b->meta.ri = 0;\n b->meta.pos = 0;\n b->meta.closed = false;\n\n *o = b;\n *ptr_iop_r = data.ptr;\n *ptr_io2_r = data.ptr + data.len;\n\n wuffs_base__empty_struct ret;\n ret.private_impl = 0;\n return ret;\n}\n\nstatic inline wuffs_base__slice_u8 //\nwuffs_base__io_reader__take(uint8_t** ptr_iop_r, uint8_t* io2_r, uint64_t n) {\n if (n <= ((size_t)(io2_r - *ptr_iop_r))) {\n uint8_t*" + " p = *ptr_iop_r;\n *ptr_iop_r += n;\n return wuffs_base__make_slice_u8(p, n);\n }\n return wuffs_base__make_slice_u8(NULL, 0);\n}\n\nstatic inline wuffs_base__empty_struct //\nwuffs_base__io_writer__set(wuffs_base__io_buffer** o,\n wuffs_base__io_buffer* b,\n uint8_t** ptr_iop_w,\n uint8_t** ptr_io2_w,\n wuffs_base__slice_u8 data) {\n b->data = data;\n b->meta.wi = 0;\n b->meta.ri = 0;\n b->meta.pos = 0;\n b->meta.closed = false;\n\n *o = b;\n *ptr_iop_w = data.ptr;\n *ptr_io2_w = data.ptr + data.len;\n\n wuffs_base__empty_struct ret;\n ret.private_impl = 0;\n return ret;\n}\n\n" + diff --git a/internal/cgen/var.go b/internal/cgen/var.go index 5c6ffe19..fb08a55a 100644 --- a/internal/cgen/var.go +++ b/internal/cgen/var.go @@ -102,7 +102,7 @@ func (g *gen) writeLoadDerivedVar(b *buffer, hack string, prefix string, name t. if header { b.printf("uint8_t* %s%s = NULL;", iopPrefix, preName) - b.printf("uint8_t* %s%s WUFFS_BASE__POTENTIALLY_UNUSED = NULL;", io0Prefix, preName) + b.printf("uint8_t* %s%s WUFFS_BASE__POTENTIALLY_UNUSED = NULL;", io1Prefix, preName) b.printf("uint8_t* %s%s WUFFS_BASE__POTENTIALLY_UNUSED = NULL;", io2Prefix, preName) } @@ -112,7 +112,7 @@ func (g *gen) writeLoadDerivedVar(b *buffer, hack string, prefix string, name t. iopPrefix, preName, preName, preName, i0) if header { - b.printf("%s%s = %s%s;", io0Prefix, preName, iopPrefix, preName) + b.printf("%s%s = %s%s;", io1Prefix, preName, iopPrefix, preName) b.printf("%s%s = %s->data.ptr + %s->%s;", io2Prefix, preName, preName, preName, i1) @@ -296,7 +296,7 @@ func (g *gen) writeVars(b *buffer, f *funk, inStructDecl bool) error { b.printf("wuffs_base__io_buffer %s%s WUFFS_BASE__POTENTIALLY_UNUSED = "+ "wuffs_base__null_io_buffer();\n", uPrefix, name) preName := vPrefix + name - // TODO: io0_etc variables? + // TODO: io1_etc variables? b.printf("uint8_t* %s%s WUFFS_BASE__POTENTIALLY_UNUSED = NULL;\n", iopPrefix, preName) b.printf("uint8_t* %s%s WUFFS_BASE__POTENTIALLY_UNUSED = NULL;\n", io2Prefix, preName) } diff --git a/release/c/wuffs-unsupported-snapshot.c b/release/c/wuffs-unsupported-snapshot.c index cd1275a9..0a6d4d07 100644 --- a/release/c/wuffs-unsupported-snapshot.c +++ b/release/c/wuffs-unsupported-snapshot.c @@ -4484,7 +4484,7 @@ wuffs_base__io__since(uint64_t mark, uint64_t index, uint8_t* ptr) { static inline uint32_t // wuffs_base__io_writer__copy_n_from_history(uint8_t** ptr_iop_w, - uint8_t* io0_w, + uint8_t* io1_w, uint8_t* io2_w, uint32_t length, uint32_t distance) { @@ -4492,7 +4492,7 @@ wuffs_base__io_writer__copy_n_from_history(uint8_t** ptr_iop_w, return 0; } uint8_t* p = *ptr_iop_w; - if ((size_t)(p - io0_w) < (size_t)(distance)) { + if ((size_t)(p - io1_w) < (size_t)(distance)) { return 0; } uint8_t* q = p - distance; @@ -4528,11 +4528,11 @@ wuffs_base__io_writer__copy_n_from_history(uint8_t** ptr_iop_w, // wuffs_base__io_writer__copy_n_from_history function above, but has stronger // pre-conditions. The caller needs to prove that: // - distance > 0 -// - distance <= (*ptr_iop_w - io0_w) +// - distance <= (*ptr_iop_w - io1_w) // - length <= (io2_w - *ptr_iop_w) static inline uint32_t // wuffs_base__io_writer__copy_n_from_history_fast(uint8_t** ptr_iop_w, - uint8_t* io0_w, + uint8_t* io1_w, uint8_t* io2_w, uint32_t length, uint32_t distance) { @@ -6396,11 +6396,11 @@ wuffs_deflate__decoder__decode_io_writer(wuffs_deflate__decoder* self, uint32_t v_already_full = 0; uint8_t* iop_a_dst = NULL; - uint8_t* io0_a_dst WUFFS_BASE__POTENTIALLY_UNUSED = NULL; + uint8_t* io1_a_dst WUFFS_BASE__POTENTIALLY_UNUSED = NULL; uint8_t* io2_a_dst WUFFS_BASE__POTENTIALLY_UNUSED = NULL; if (a_dst) { iop_a_dst = a_dst->data.ptr + a_dst->meta.wi; - io0_a_dst = iop_a_dst; + io1_a_dst = iop_a_dst; io2_a_dst = a_dst->data.ptr + a_dst->data.len; if (a_dst->meta.closed) { io2_a_dst = iop_a_dst; @@ -6513,11 +6513,11 @@ wuffs_deflate__decoder__decode_blocks(wuffs_deflate__decoder* self, wuffs_base__status v_status = NULL; uint8_t* iop_a_src = NULL; - uint8_t* io0_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; + uint8_t* io1_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; uint8_t* io2_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; if (a_src) { iop_a_src = a_src->data.ptr + a_src->meta.ri; - io0_a_src = iop_a_src; + io1_a_src = iop_a_src; io2_a_src = a_src->data.ptr + a_src->meta.wi; } @@ -6657,22 +6657,22 @@ wuffs_deflate__decoder__decode_uncompressed(wuffs_deflate__decoder* self, uint32_t v_n_copied = 0; uint8_t* iop_a_dst = NULL; - uint8_t* io0_a_dst WUFFS_BASE__POTENTIALLY_UNUSED = NULL; + uint8_t* io1_a_dst WUFFS_BASE__POTENTIALLY_UNUSED = NULL; uint8_t* io2_a_dst WUFFS_BASE__POTENTIALLY_UNUSED = NULL; if (a_dst) { iop_a_dst = a_dst->data.ptr + a_dst->meta.wi; - io0_a_dst = iop_a_dst; + io1_a_dst = iop_a_dst; io2_a_dst = a_dst->data.ptr + a_dst->data.len; if (a_dst->meta.closed) { io2_a_dst = iop_a_dst; } } uint8_t* iop_a_src = NULL; - uint8_t* io0_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; + uint8_t* io1_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; uint8_t* io2_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; if (a_src) { iop_a_src = a_src->data.ptr + a_src->meta.ri; - io0_a_src = iop_a_src; + io1_a_src = iop_a_src; io2_a_src = a_src->data.ptr + a_src->meta.wi; } @@ -6831,11 +6831,11 @@ wuffs_deflate__decoder__init_dynamic_huffman(wuffs_deflate__decoder* self, uint32_t v_b3 = 0; uint8_t* iop_a_src = NULL; - uint8_t* io0_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; + uint8_t* io1_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; uint8_t* io2_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; if (a_src) { iop_a_src = a_src->data.ptr + a_src->meta.ri; - io0_a_src = iop_a_src; + io1_a_src = iop_a_src; io2_a_src = a_src->data.ptr + a_src->meta.wi; } @@ -7334,22 +7334,22 @@ wuffs_deflate__decoder__decode_huffman_fast(wuffs_deflate__decoder* self, uint32_t v_hdist = 0; uint8_t* iop_a_dst = NULL; - uint8_t* io0_a_dst WUFFS_BASE__POTENTIALLY_UNUSED = NULL; + uint8_t* io1_a_dst WUFFS_BASE__POTENTIALLY_UNUSED = NULL; uint8_t* io2_a_dst WUFFS_BASE__POTENTIALLY_UNUSED = NULL; if (a_dst) { iop_a_dst = a_dst->data.ptr + a_dst->meta.wi; - io0_a_dst = iop_a_dst; + io1_a_dst = iop_a_dst; io2_a_dst = a_dst->data.ptr + a_dst->data.len; if (a_dst->meta.closed) { io2_a_dst = iop_a_dst; } } uint8_t* iop_a_src = NULL; - uint8_t* io0_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; + uint8_t* io1_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; uint8_t* io2_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; if (a_src) { iop_a_src = a_src->data.ptr + a_src->meta.ri; - io0_a_src = iop_a_src; + io1_a_src = iop_a_src; io2_a_src = a_src->data.ptr + a_src->meta.wi; } @@ -7568,7 +7568,7 @@ label_0_continue:; label_0_break:; while (v_n_bits >= 8) { v_n_bits -= 8; - if (iop_a_src > io0_a_src) { + if (iop_a_src > io1_a_src) { (iop_a_src--, wuffs_base__make_empty_struct()); } else { status = wuffs_deflate__error__internal_error_inconsistent_i_o; @@ -7623,22 +7623,22 @@ wuffs_deflate__decoder__decode_huffman_slow(wuffs_deflate__decoder* self, uint32_t v_hdist = 0; uint8_t* iop_a_dst = NULL; - uint8_t* io0_a_dst WUFFS_BASE__POTENTIALLY_UNUSED = NULL; + uint8_t* io1_a_dst WUFFS_BASE__POTENTIALLY_UNUSED = NULL; uint8_t* io2_a_dst WUFFS_BASE__POTENTIALLY_UNUSED = NULL; if (a_dst) { iop_a_dst = a_dst->data.ptr + a_dst->meta.wi; - io0_a_dst = iop_a_dst; + io1_a_dst = iop_a_dst; io2_a_dst = a_dst->data.ptr + a_dst->data.len; if (a_dst->meta.closed) { io2_a_dst = iop_a_dst; } } uint8_t* iop_a_src = NULL; - uint8_t* io0_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; + uint8_t* io1_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; uint8_t* io2_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; if (a_src) { iop_a_src = a_src->data.ptr + a_src->meta.ri; - io0_a_src = iop_a_src; + io1_a_src = iop_a_src; io2_a_src = a_src->data.ptr + a_src->meta.wi; } @@ -8224,11 +8224,11 @@ wuffs_lzw__decoder__read_from(wuffs_lzw__decoder* self, uint16_t v_lm1_a = 0; uint8_t* iop_a_src = NULL; - uint8_t* io0_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; + uint8_t* io1_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; uint8_t* io2_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; if (a_src) { iop_a_src = a_src->data.ptr + a_src->meta.ri; - io0_a_src = iop_a_src; + io1_a_src = iop_a_src; io2_a_src = a_src->data.ptr + a_src->meta.wi; } @@ -8369,7 +8369,7 @@ label_0_break:; if (self->private_impl.f_read_from_return_value != 2) { while (v_n_bits >= 8) { v_n_bits -= 8; - if (iop_a_src > io0_a_src) { + if (iop_a_src > io1_a_src) { (iop_a_src--, wuffs_base__make_empty_struct()); } else { self->private_impl.f_read_from_return_value = 4; @@ -8402,11 +8402,11 @@ wuffs_lzw__decoder__write_to(wuffs_lzw__decoder* self, uint64_t v_n = 0; uint8_t* iop_a_dst = NULL; - uint8_t* io0_a_dst WUFFS_BASE__POTENTIALLY_UNUSED = NULL; + uint8_t* io1_a_dst WUFFS_BASE__POTENTIALLY_UNUSED = NULL; uint8_t* io2_a_dst WUFFS_BASE__POTENTIALLY_UNUSED = NULL; if (a_dst) { iop_a_dst = a_dst->data.ptr + a_dst->meta.wi; - io0_a_dst = iop_a_dst; + io1_a_dst = iop_a_dst; io2_a_dst = a_dst->data.ptr + a_dst->data.len; if (a_dst->meta.closed) { io2_a_dst = iop_a_dst; @@ -8830,11 +8830,11 @@ wuffs_gif__decoder__ack_metadata_chunk(wuffs_gif__decoder* self, wuffs_base__status status = NULL; uint8_t* iop_a_src = NULL; - uint8_t* io0_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; + uint8_t* io1_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; uint8_t* io2_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; if (a_src) { iop_a_src = a_src->data.ptr + a_src->meta.ri; - io0_a_src = iop_a_src; + io1_a_src = iop_a_src; io2_a_src = a_src->data.ptr + a_src->meta.wi; } @@ -9086,11 +9086,11 @@ wuffs_gif__decoder__decode_frame_config(wuffs_gif__decoder* self, uint8_t v_flags = 0; uint8_t* iop_a_src = NULL; - uint8_t* io0_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; + uint8_t* io1_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; uint8_t* io2_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; if (a_src) { iop_a_src = a_src->data.ptr + a_src->meta.ri; - io0_a_src = iop_a_src; + io1_a_src = iop_a_src; io2_a_src = a_src->data.ptr + a_src->meta.wi; } @@ -9229,11 +9229,11 @@ wuffs_gif__decoder__skip_frame(wuffs_gif__decoder* self, uint8_t v_lw = 0; uint8_t* iop_a_src = NULL; - uint8_t* io0_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; + uint8_t* io1_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; uint8_t* io2_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; if (a_src) { iop_a_src = a_src->data.ptr + a_src->meta.ri; - io0_a_src = iop_a_src; + io1_a_src = iop_a_src; io2_a_src = a_src->data.ptr + a_src->meta.wi; } @@ -9425,11 +9425,11 @@ wuffs_gif__decoder__decode_up_to_id_part1(wuffs_gif__decoder* self, uint8_t v_block_type = 0; uint8_t* iop_a_src = NULL; - uint8_t* io0_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; + uint8_t* io1_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; uint8_t* io2_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; if (a_src) { iop_a_src = a_src->data.ptr + a_src->meta.ri; - io0_a_src = iop_a_src; + io1_a_src = iop_a_src; io2_a_src = a_src->data.ptr + a_src->meta.wi; } @@ -9543,11 +9543,11 @@ wuffs_gif__decoder__decode_header(wuffs_gif__decoder* self, uint32_t v_i = 0; uint8_t* iop_a_src = NULL; - uint8_t* io0_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; + uint8_t* io1_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; uint8_t* io2_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; if (a_src) { iop_a_src = a_src->data.ptr + a_src->meta.ri; - io0_a_src = iop_a_src; + io1_a_src = iop_a_src; io2_a_src = a_src->data.ptr + a_src->meta.wi; } @@ -9614,11 +9614,11 @@ wuffs_gif__decoder__decode_lsd(wuffs_gif__decoder* self, uint32_t v_argb = 0; uint8_t* iop_a_src = NULL; - uint8_t* io0_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; + uint8_t* io1_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; uint8_t* io2_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; if (a_src) { iop_a_src = a_src->data.ptr + a_src->meta.ri; - io0_a_src = iop_a_src; + io1_a_src = iop_a_src; io2_a_src = a_src->data.ptr + a_src->meta.wi; } @@ -9823,11 +9823,11 @@ wuffs_gif__decoder__decode_extension(wuffs_gif__decoder* self, uint8_t v_label = 0; uint8_t* iop_a_src = NULL; - uint8_t* io0_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; + uint8_t* io1_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; uint8_t* io2_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; if (a_src) { iop_a_src = a_src->data.ptr + a_src->meta.ri; - io0_a_src = iop_a_src; + io1_a_src = iop_a_src; io2_a_src = a_src->data.ptr + a_src->meta.wi; } @@ -9917,11 +9917,11 @@ wuffs_gif__decoder__skip_blocks(wuffs_gif__decoder* self, uint8_t v_block_size = 0; uint8_t* iop_a_src = NULL; - uint8_t* io0_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; + uint8_t* io1_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; uint8_t* io2_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; if (a_src) { iop_a_src = a_src->data.ptr + a_src->meta.ri; - io0_a_src = iop_a_src; + io1_a_src = iop_a_src; io2_a_src = a_src->data.ptr + a_src->meta.wi; } @@ -9993,11 +9993,11 @@ wuffs_gif__decoder__decode_ae(wuffs_gif__decoder* self, bool v_is_xmp = false; uint8_t* iop_a_src = NULL; - uint8_t* io0_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; + uint8_t* io1_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; uint8_t* io2_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; if (a_src) { iop_a_src = a_src->data.ptr + a_src->meta.ri; - io0_a_src = iop_a_src; + io1_a_src = iop_a_src; io2_a_src = a_src->data.ptr + a_src->meta.wi; } @@ -10242,11 +10242,11 @@ wuffs_gif__decoder__decode_gc(wuffs_gif__decoder* self, uint16_t v_gc_duration_centiseconds = 0; uint8_t* iop_a_src = NULL; - uint8_t* io0_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; + uint8_t* io1_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; uint8_t* io2_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; if (a_src) { iop_a_src = a_src->data.ptr + a_src->meta.ri; - io0_a_src = iop_a_src; + io1_a_src = iop_a_src; io2_a_src = a_src->data.ptr + a_src->meta.wi; } @@ -10369,11 +10369,11 @@ wuffs_gif__decoder__decode_id_part0(wuffs_gif__decoder* self, wuffs_base__status status = NULL; uint8_t* iop_a_src = NULL; - uint8_t* io0_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; + uint8_t* io1_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; uint8_t* io2_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; if (a_src) { iop_a_src = a_src->data.ptr + a_src->meta.ri; - io0_a_src = iop_a_src; + io1_a_src = iop_a_src; io2_a_src = a_src->data.ptr + a_src->meta.wi; } @@ -10549,11 +10549,11 @@ wuffs_gif__decoder__decode_id_part1(wuffs_gif__decoder* self, uint8_t v_lw = 0; uint8_t* iop_a_src = NULL; - uint8_t* io0_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; + uint8_t* io1_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; uint8_t* io2_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; if (a_src) { iop_a_src = a_src->data.ptr + a_src->meta.ri; - io0_a_src = iop_a_src; + io1_a_src = iop_a_src; io2_a_src = a_src->data.ptr + a_src->meta.wi; } @@ -10750,11 +10750,11 @@ wuffs_gif__decoder__decode_id_part2(wuffs_gif__decoder* self, wuffs_base__slice_u8 v_uncompressed = {0}; uint8_t* iop_a_src = NULL; - uint8_t* io0_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; + uint8_t* io1_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; uint8_t* io2_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; if (a_src) { iop_a_src = a_src->data.ptr + a_src->meta.ri; - io0_a_src = iop_a_src; + io1_a_src = iop_a_src; io2_a_src = a_src->data.ptr + a_src->meta.wi; } @@ -11230,22 +11230,22 @@ wuffs_gzip__decoder__decode_io_writer(wuffs_gzip__decoder* self, uint32_t v_decoded_length_want = 0; uint8_t* iop_a_dst = NULL; - uint8_t* io0_a_dst WUFFS_BASE__POTENTIALLY_UNUSED = NULL; + uint8_t* io1_a_dst WUFFS_BASE__POTENTIALLY_UNUSED = NULL; uint8_t* io2_a_dst WUFFS_BASE__POTENTIALLY_UNUSED = NULL; if (a_dst) { iop_a_dst = a_dst->data.ptr + a_dst->meta.wi; - io0_a_dst = iop_a_dst; + io1_a_dst = iop_a_dst; io2_a_dst = a_dst->data.ptr + a_dst->data.len; if (a_dst->meta.closed) { io2_a_dst = iop_a_dst; } } uint8_t* iop_a_src = NULL; - uint8_t* io0_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; + uint8_t* io1_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; uint8_t* io2_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; if (a_src) { iop_a_src = a_src->data.ptr + a_src->meta.ri; - io0_a_src = iop_a_src; + io1_a_src = iop_a_src; io2_a_src = a_src->data.ptr + a_src->meta.wi; } @@ -11702,22 +11702,22 @@ wuffs_zlib__decoder__decode_io_writer(wuffs_zlib__decoder* self, uint64_t v_mark = 0; uint8_t* iop_a_dst = NULL; - uint8_t* io0_a_dst WUFFS_BASE__POTENTIALLY_UNUSED = NULL; + uint8_t* io1_a_dst WUFFS_BASE__POTENTIALLY_UNUSED = NULL; uint8_t* io2_a_dst WUFFS_BASE__POTENTIALLY_UNUSED = NULL; if (a_dst) { iop_a_dst = a_dst->data.ptr + a_dst->meta.wi; - io0_a_dst = iop_a_dst; + io1_a_dst = iop_a_dst; io2_a_dst = a_dst->data.ptr + a_dst->data.len; if (a_dst->meta.closed) { io2_a_dst = iop_a_dst; } } uint8_t* iop_a_src = NULL; - uint8_t* io0_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; + uint8_t* io1_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; uint8_t* io2_a_src WUFFS_BASE__POTENTIALLY_UNUSED = NULL; if (a_src) { iop_a_src = a_src->data.ptr + a_src->meta.ri; - io0_a_src = iop_a_src; + io1_a_src = iop_a_src; io2_a_src = a_src->data.ptr + a_src->meta.wi; }