mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-23 16:52:18 +01:00
std/jpeg: call slice.bulk_memset
This commit is contained in:
1 parent
5edfe45e15
commit
2f18dc61d0
8 files changed
+160
-91
No files matched your search
+10
-2
@@ -730,8 +730,16 @@ func (q *checker) tcheckDot(n *a.Expr, depth uint32) error {
|
||||
qqid[0] = t.IDBase
|
||||
qqid[1] = t.IDDagger1
|
||||
if q.c.isBuiltInSliceFunc(qqid, lTyp) {
|
||||
n.SetMType(a.NewTypeExpr(t.IDFunc, 0, n.Ident(), lTyp.AsNode(), nil, nil))
|
||||
return nil
|
||||
bulky := false
|
||||
switch qqid[2] {
|
||||
case t.IDBulkMemset:
|
||||
bulky = true
|
||||
}
|
||||
|
||||
if !bulky || lTyp.Inner().IsBulkNumType() {
|
||||
n.SetMType(a.NewTypeExpr(t.IDFunc, 0, n.Ident(), lTyp.AsNode(), nil, nil))
|
||||
return nil
|
||||
}
|
||||
}
|
||||
return fmt.Errorf("check: no %s method %q", lTyp.Decorator().Str(q.tm), n.Ident().Str(q.tm))
|
||||
|
||||
|
||||
Reference in new issue
Block a user