mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-26 01:01:35 +01:00
Prepare to add cpu_arch_utility types
This commit is contained in:
1 parent
869be76fae
commit
492068f3dc
8 files changed
+77
-29
No files matched your search
@@ -238,7 +238,7 @@ func (g *gen) couldHaveDerivedVar(n *a.Expr) bool {
|
||||
case t.IDOpenParen:
|
||||
switch n.LHS().AsExpr().Ident() {
|
||||
case t.IDEmptyIOReader, t.IDEmptyIOWriter:
|
||||
if n.LHS().AsExpr().LHS().AsExpr().MType().Eq(typeExprUtility) {
|
||||
if n.LHS().AsExpr().LHS().AsExpr().MType().IsEtcUtilityType() {
|
||||
return false
|
||||
}
|
||||
}
|
||||
@@ -324,10 +324,11 @@ func (g *gen) writeResumeSuspend(b *buffer, f *funk, suspend bool) error {
|
||||
func (g *gen) writeVars(b *buffer, f *funk, inStructDecl bool) error {
|
||||
for _, n := range f.varList {
|
||||
typ := n.XType()
|
||||
if inStructDecl {
|
||||
if typ.HasPointers() || f.varResumables == nil || !f.varResumables[n.Name()] {
|
||||
continue
|
||||
}
|
||||
if typ.Innermost().IsEtcUtilityType() {
|
||||
continue
|
||||
} else if inStructDecl &&
|
||||
(typ.HasPointers() || f.varResumables == nil || !f.varResumables[n.Name()]) {
|
||||
continue
|
||||
}
|
||||
|
||||
name := n.Name().Str(g.tm)
|
||||
|
||||
Reference in new issue
Block a user