Have writer1.slice take mark arguments.

This commit is contained in:
Nigel Tao committed 2017-09-23 13:57:48 +10:00
1 parent fd5d44b3fc
commit d5c8e20268
8 files changed
+59 -20

No files matched your search

+1 -1
View File
@@ -649,7 +649,7 @@ func (q *checker) bcheckExprOther(n *a.Expr, depth uint32) (*big.Int, *big.Int,
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.KeyCopyHistory32, 2) ||
isInDst(q.tm, n, t.KeyMark, 0) || isInDst(q.tm, n, t.KeySlice, 0) ||
isInDst(q.tm, n, t.KeyMark, 0) || isInDst(q.tm, n, t.KeySlice, 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) ||
+2 -2
View File
@@ -349,7 +349,7 @@ func (q *checker) tcheckExprOther(n *a.Expr, depth uint32) error {
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.KeyCopyHistory32, 2) ||
isInDst(q.tm, n, t.KeyMark, 0) || isInDst(q.tm, n, t.KeySlice, 0) ||
isInDst(q.tm, n, t.KeyMark, 0) || isInDst(q.tm, n, t.KeySlice, 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) ||
@@ -373,7 +373,7 @@ func (q *checker) tcheckExprOther(n *a.Expr, depth uint32) error {
n.SetMType(typeExprPlaceholder16) // HACK.
} else if isInDst(q.tm, n, t.KeyMark, 0) {
n.SetMType(typeExprBuf1Mark)
} else if isInDst(q.tm, n, t.KeySlice, 0) {
} else if isInDst(q.tm, n, t.KeySlice, 2) {
n.SetMType(typeExprSliceU8) // HACK.
} else {
n.SetMType(typeExprPlaceholder) // HACK.