mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-22 16:47:28 +01:00
Rename io_writer.history_available
This commit is contained in:
1 parent
be8542e313
commit
3c3d58bfe7
6 files changed
+39
-39
No files matched your search
@@ -446,7 +446,7 @@ var Funcs = []string{
|
||||
"io_writer.write_u64le_fast!(a: u64)",
|
||||
|
||||
"io_writer.count_since(mark: u64) u64",
|
||||
"io_writer.history_available() u64",
|
||||
"io_writer.history_length() u64",
|
||||
"io_writer.length() u64",
|
||||
"io_writer.mark() u64",
|
||||
"io_writer.position() u64",
|
||||
|
||||
@@ -1122,7 +1122,7 @@ func (q *checker) canLimitedCopyU32FromHistoryFast(recv *a.Expr, args []*a.Node)
|
||||
// As per cgen's io-private.h, there are three pre-conditions:
|
||||
// - n <= this.length()
|
||||
// - distance > 0
|
||||
// - distance <= this.history_available()
|
||||
// - distance <= this.history_length()
|
||||
|
||||
if len(args) != 2 {
|
||||
return fmt.Errorf("check: internal error: inconsistent copy_n_from_history_fast arguments")
|
||||
@@ -1180,7 +1180,7 @@ check1:
|
||||
return fmt.Errorf("check: could not prove distance > 0")
|
||||
}
|
||||
|
||||
// Check "distance <= this.history_available()".
|
||||
// Check "distance <= this.history_length()".
|
||||
check2:
|
||||
for {
|
||||
for _, x := range q.facts {
|
||||
@@ -1198,9 +1198,9 @@ check2:
|
||||
continue
|
||||
}
|
||||
|
||||
// Check that the RHS is "recv.history_available()".
|
||||
// Check that the RHS is "recv.history_length()".
|
||||
y, method, yArgs := splitReceiverMethodArgs(x.RHS().AsExpr())
|
||||
if method != t.IDHistoryAvailable || len(yArgs) != 0 {
|
||||
if method != t.IDHistoryLength || len(yArgs) != 0 {
|
||||
continue
|
||||
}
|
||||
if !y.Eq(recv) {
|
||||
@@ -1209,7 +1209,7 @@ check2:
|
||||
|
||||
break check2
|
||||
}
|
||||
return fmt.Errorf("check: could not prove distance <= %s.history_available()", recv.Str(q.tm))
|
||||
return fmt.Errorf("check: could not prove distance <= %s.history_length()", recv.Str(q.tm))
|
||||
}
|
||||
|
||||
return nil
|
||||
|
||||
+26
-26
@@ -503,19 +503,19 @@ const (
|
||||
|
||||
IDDecodeFrameOptions = ID(0x158)
|
||||
|
||||
IDCanUndoByte = ID(0x160)
|
||||
IDCountSince = ID(0x161)
|
||||
IDHistoryAvailable = ID(0x162)
|
||||
IDIsClosed = ID(0x163)
|
||||
IDMark = ID(0x164)
|
||||
IDMatch15 = ID(0x165)
|
||||
IDMatch31 = ID(0x166)
|
||||
IDMatch7 = ID(0x167)
|
||||
IDPosition = ID(0x168)
|
||||
IDSince = ID(0x169)
|
||||
IDSkip = ID(0x16A)
|
||||
IDSkipU32 = ID(0x16B)
|
||||
IDSkipU32Fast = ID(0x16C)
|
||||
IDCanUndoByte = ID(0x160)
|
||||
IDCountSince = ID(0x161)
|
||||
IDHistoryLength = ID(0x162)
|
||||
IDIsClosed = ID(0x163)
|
||||
IDMark = ID(0x164)
|
||||
IDMatch15 = ID(0x165)
|
||||
IDMatch31 = ID(0x166)
|
||||
IDMatch7 = ID(0x167)
|
||||
IDPosition = ID(0x168)
|
||||
IDSince = ID(0x169)
|
||||
IDSkip = ID(0x16A)
|
||||
IDSkipU32 = ID(0x16B)
|
||||
IDSkipU32Fast = ID(0x16C)
|
||||
|
||||
IDCopyFromSlice = ID(0x170)
|
||||
IDLimitedCopyU32FromHistory = ID(0x171)
|
||||
@@ -870,19 +870,19 @@ var builtInsByID = [nBuiltInIDs]string{
|
||||
|
||||
IDDecodeFrameOptions: "decode_frame_options",
|
||||
|
||||
IDCanUndoByte: "can_undo_byte",
|
||||
IDCountSince: "count_since",
|
||||
IDHistoryAvailable: "history_available",
|
||||
IDIsClosed: "is_closed",
|
||||
IDMark: "mark",
|
||||
IDMatch15: "match15",
|
||||
IDMatch31: "match31",
|
||||
IDMatch7: "match7",
|
||||
IDPosition: "position",
|
||||
IDSince: "since",
|
||||
IDSkip: "skip",
|
||||
IDSkipU32: "skip_u32",
|
||||
IDSkipU32Fast: "skip_u32_fast",
|
||||
IDCanUndoByte: "can_undo_byte",
|
||||
IDCountSince: "count_since",
|
||||
IDHistoryLength: "history_length",
|
||||
IDIsClosed: "is_closed",
|
||||
IDMark: "mark",
|
||||
IDMatch15: "match15",
|
||||
IDMatch31: "match31",
|
||||
IDMatch7: "match7",
|
||||
IDPosition: "position",
|
||||
IDSince: "since",
|
||||
IDSkip: "skip",
|
||||
IDSkipU32: "skip_u32",
|
||||
IDSkipU32Fast: "skip_u32_fast",
|
||||
|
||||
IDCopyFromSlice: "copy_from_slice",
|
||||
IDLimitedCopyU32FromHistory: "limited_copy_u32_from_history",
|
||||
|
||||
Reference in new issue
Block a user