mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-19 08:38:14 +01:00
Add a copy_history32 method.
This commit is contained in:
1 parent
d7cb39b766
commit
d2aca16f3c
7 files changed
+109
-51
No files matched your search
@@ -646,7 +646,7 @@ func (q *checker) bcheckExprOther(n *a.Expr, depth uint32) (*big.Int, *big.Int,
|
||||
if isInSrc(q.tm, n, t.KeyReadU8, 0) || isInSrc(q.tm, n, t.KeyReadU32LE, 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) ||
|
||||
isInDst(q.tm, n, t.KeyCopyFrom32, 2) || isInDst(q.tm, n, t.KeyCopyHistory32, 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_uncompressed", 2) || isThisMethod(q.tm, n, "decode_huffman", 2) ||
|
||||
|
||||
+1
-1
@@ -346,7 +346,7 @@ func (q *checker) tcheckExprOther(n *a.Expr, depth uint32) error {
|
||||
if isInSrc(q.tm, n, t.KeyReadU8, 0) || isInSrc(q.tm, n, t.KeyReadU32LE, 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) ||
|
||||
isInDst(q.tm, n, t.KeyCopyFrom32, 2) || isInDst(q.tm, n, t.KeyCopyHistory32, 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_uncompressed", 2) || isThisMethod(q.tm, n, "decode_huffman", 2) ||
|
||||
|
||||
+15
-12
@@ -257,10 +257,11 @@ const (
|
||||
KeyWriteU64BE = Key(IDWriteU64BE >> KeyShift)
|
||||
KeyWriteU64LE = Key(IDWriteU64LE >> KeyShift)
|
||||
|
||||
KeyCopyFrom32 = Key(IDCopyFrom32 >> KeyShift)
|
||||
KeyCopyFrom64 = Key(IDCopyFrom64 >> KeyShift)
|
||||
KeySkip32 = Key(IDSkip32 >> KeyShift)
|
||||
KeySkip64 = Key(IDSkip64 >> KeyShift)
|
||||
KeyCopyFrom32 = Key(IDCopyFrom32 >> KeyShift)
|
||||
KeyCopyFrom64 = Key(IDCopyFrom64 >> KeyShift)
|
||||
KeySkip32 = Key(IDSkip32 >> KeyShift)
|
||||
KeySkip64 = Key(IDSkip64 >> KeyShift)
|
||||
KeyCopyHistory32 = Key(IDCopyHistory32 >> KeyShift)
|
||||
|
||||
KeyXUnaryPlus = Key(IDXUnaryPlus >> KeyShift)
|
||||
KeyXUnaryMinus = Key(IDXUnaryMinus >> KeyShift)
|
||||
@@ -421,10 +422,11 @@ const (
|
||||
IDWriteU64BE = ID(0xBE<<KeyShift | FlagsIdent | FlagsImplicitSemicolon)
|
||||
IDWriteU64LE = ID(0xBF<<KeyShift | FlagsIdent | FlagsImplicitSemicolon)
|
||||
|
||||
IDCopyFrom32 = ID(0xC0<<KeyShift | FlagsIdent | FlagsImplicitSemicolon)
|
||||
IDCopyFrom64 = ID(0xC1<<KeyShift | FlagsIdent | FlagsImplicitSemicolon)
|
||||
IDSkip32 = ID(0xC2<<KeyShift | FlagsIdent | FlagsImplicitSemicolon)
|
||||
IDSkip64 = ID(0xC3<<KeyShift | FlagsIdent | FlagsImplicitSemicolon)
|
||||
IDCopyFrom32 = ID(0xC0<<KeyShift | FlagsIdent | FlagsImplicitSemicolon)
|
||||
IDCopyFrom64 = ID(0xC1<<KeyShift | FlagsIdent | FlagsImplicitSemicolon)
|
||||
IDSkip32 = ID(0xC2<<KeyShift | FlagsIdent | FlagsImplicitSemicolon)
|
||||
IDSkip64 = ID(0xC3<<KeyShift | FlagsIdent | FlagsImplicitSemicolon)
|
||||
IDCopyHistory32 = ID(0xC4<<KeyShift | FlagsIdent | FlagsImplicitSemicolon)
|
||||
)
|
||||
|
||||
// The IDXFoo IDs are not returned by the tokenizer. They are used by the
|
||||
@@ -607,10 +609,11 @@ var builtInsByKey = [nBuiltInKeys]struct {
|
||||
KeyWriteU64BE: {"write_u64be", IDWriteU64BE},
|
||||
KeyWriteU64LE: {"write_u64le", IDWriteU64LE},
|
||||
|
||||
KeyCopyFrom32: {"copy_from32", IDCopyFrom32},
|
||||
KeyCopyFrom64: {"copy_from64", IDCopyFrom64},
|
||||
KeySkip32: {"skip32", IDSkip32},
|
||||
KeySkip64: {"skip64", IDSkip64},
|
||||
KeyCopyFrom32: {"copy_from32", IDCopyFrom32},
|
||||
KeyCopyFrom64: {"copy_from64", IDCopyFrom64},
|
||||
KeySkip32: {"skip32", IDSkip32},
|
||||
KeySkip64: {"skip64", IDSkip64},
|
||||
KeyCopyHistory32: {"copy_history32", IDCopyHistory32},
|
||||
}
|
||||
|
||||
var builtInsByName = map[string]ID{}
|
||||
|
||||
Reference in new issue
Block a user