Rename copy_n32_etc to limited_copy_u32_etc

This commit is contained in:
Nigel Tao committed 2020-05-27 19:55:06 +10:00
1 parent e74fd729a7
commit 1ed0f89948
10 files changed
+97 -95

No files matched your search

+3 -3
View File
@@ -1019,8 +1019,8 @@ func (q *checker) bcheckExprCallSpecialCases(n *a.Expr, depth uint32) (bounds, e
return bounds{}, err
}
} else if method == t.IDCopyN32FromHistoryFast {
if err := q.canCopyN32FromHistoryFast(recv, n.Args()); err != nil {
} else if method == t.IDLimitedCopyU32FromHistoryFast {
if err := q.canLimitedCopyU32FromHistoryFast(recv, n.Args()); err != nil {
return bounds{}, err
}
@@ -1100,7 +1100,7 @@ func (q *checker) canUndoByte(recv *a.Expr) error {
return fmt.Errorf("check: could not prove %s.can_undo_byte()", recv.Str(q.tm))
}
func (q *checker) canCopyN32FromHistoryFast(recv *a.Expr, args []*a.Node) error {
func (q *checker) canLimitedCopyU32FromHistoryFast(recv *a.Expr, args []*a.Node) error {
// As per cgen's io-private.h, there are three pre-conditions:
// - n <= this.available()
// - distance > 0