Rename the generated C's io0_etc to io1_etc

This commit is contained in:
Nigel Tao committed 2019-07-06 21:45:55 +10:00
1 parent 7c6a88882e
commit cc9fb5224a
6 files changed
+77 -77

No files matched your search

+5 -5
View File
@@ -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.
)