message-size-increase #3

Open
sashakoshka wants to merge 209 commits from message-size-increase into main
Showing only changes of commit a9f583d2e7 - Show all commits

View File

@ -610,23 +610,17 @@ func (this *Generator) generateDecodeBranch(hash [16]byte, typ Type) (n int, err
n += nn; if err != nil { return n, err } n += nn; if err != nil { return n, err }
return n, nil return n, nil
} }
// FIXME: the tag is validated improperly, the result of
// generateTag means basically nothing here because
// there is no data in the destination, we need another
// function that checks if a tag can be assigned to a
// PDL type
// validate header // validate header
// TODO: here, validate that length is less than the // TODO: here, validate that length is less than the
// max, whatever that is configured to be. the reason we // max, whatever that is configured to be. the reason we
// want to read it here is that we would have to skip // want to read it here is that we would have to skip
// the tag anyway so why not. // the tag anyway so why not.
nn, err = this.iprintf("if %s != ", elementTagVar) nn, err = this.iprintf("if !(")
n += nn; if err != nil { return n, err } n += nn; if err != nil { return n, err }
nn, err = this.generateTag(typ.Element, "(*this)") nn, err = this.generateCanAssign(typ.Element, elementTagVar)
n += nn; if err != nil { return n, err } n += nn; if err != nil { return n, err }
nn, err = this.printf(" {\n") nn, err = this.printf(") {\n")
n += nn; if err != nil { return n, err } n += nn; if err != nil { return n, err }
this.push() this.push()
nn, err = abort() nn, err = abort()