mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-22 00:47:28 +01:00
Decode flate stored blocks.
This commit is contained in:
1 parent
fe96654119
commit
6a34375cb3
11 files changed
+438
-12
No files matched your search
@@ -620,8 +620,10 @@ func (q *checker) bcheckExprOther(n *a.Expr, depth uint32) (*big.Int, *big.Int,
|
||||
// TODO: delete this hack that only matches "in.src.read_u8?()" etc.
|
||||
if isInSrc(q.tm, n, t.KeyReadU8, 0) || isInSrc(q.tm, n, t.KeySkip32, 1) ||
|
||||
isInDst(q.tm, n, t.KeyWrite, 1) || isInDst(q.tm, n, t.KeyWriteU8, 1) ||
|
||||
isInDst(q.tm, n, t.KeyCopyFrom32, 2) ||
|
||||
isThisMethod(q.tm, n, "decode_header", 1) || isThisMethod(q.tm, n, "decode_lsd", 1) ||
|
||||
isThisMethod(q.tm, n, "decode_extension", 1) || isThisMethod(q.tm, n, "decode_id", 2) {
|
||||
isThisMethod(q.tm, n, "decode_extension", 1) || isThisMethod(q.tm, n, "decode_id", 2) ||
|
||||
isThisMethod(q.tm, n, "decode_uncompressed", 2) {
|
||||
|
||||
for _, o := range n.Args() {
|
||||
// TODO: check that the arg range at the caller and the
|
||||
|
||||
+4
-2
@@ -236,7 +236,7 @@ func (q *checker) tcheckAssign(n *a.Assign) error {
|
||||
|
||||
switch n.Operator().Key() {
|
||||
case t.KeyShiftLEq, t.KeyShiftREq:
|
||||
if rTyp.IsNumType() {
|
||||
if rTyp.IsNumTypeOrIdeal() {
|
||||
return nil
|
||||
}
|
||||
return fmt.Errorf("check: assignment %q: shift %q, of type %q, does not have numeric type",
|
||||
@@ -338,8 +338,10 @@ func (q *checker) tcheckExprOther(n *a.Expr, depth uint32) error {
|
||||
// TODO: delete this hack that only matches "in.src.read_u8?()" etc.
|
||||
if isInSrc(q.tm, n, t.KeyReadU8, 0) || isInSrc(q.tm, n, t.KeySkip32, 1) ||
|
||||
isInDst(q.tm, n, t.KeyWrite, 1) || isInDst(q.tm, n, t.KeyWriteU8, 1) ||
|
||||
isInDst(q.tm, n, t.KeyCopyFrom32, 2) ||
|
||||
isThisMethod(q.tm, n, "decode_header", 1) || isThisMethod(q.tm, n, "decode_lsd", 1) ||
|
||||
isThisMethod(q.tm, n, "decode_extension", 1) || isThisMethod(q.tm, n, "decode_id", 2) {
|
||||
isThisMethod(q.tm, n, "decode_extension", 1) || isThisMethod(q.tm, n, "decode_id", 2) ||
|
||||
isThisMethod(q.tm, n, "decode_uncompressed", 2) {
|
||||
|
||||
if err := q.tcheckExpr(n.LHS().Expr(), depth); err != nil {
|
||||
return err
|
||||
|
||||
Reference in new issue
Block a user