Tweak builtin.SliceU8Funcs peek method names

This commit is contained in:
Nigel Tao committed 2021-01-18 16:01:44 +11:00
1 parent 9510479f50
commit 4024f5f051
3 files changed
+35 -9

No files matched your search

+5 -1
View File
@@ -593,7 +593,11 @@ func (g *gen) writeBuiltinSlice(b *buffer, recv *a.Expr, method t.ID, args []*a.
}
if (t.IDPeekU8 <= method) && (method <= t.IDPeekU64LE) {
b.printf("wuffs_base__%s__no_bounds_check(", method.Str(g.tm))
s := method.Str(g.tm)
if i := strings.Index(s, "_as_"); i >= 0 {
s = s[:i]
}
b.printf("wuffs_base__%s__no_bounds_check(", s)
if err := g.writeExpr(b, recv, depth); err != nil {
return err
}