Add a std/flate decode_blocks method.

This commit is contained in:
Nigel Tao committed 2017-08-31 11:16:23 +10:00
1 parent b328529e00
commit 209178a2c6
6 files changed
+64 -10

No files matched your search

+8
View File
@@ -1089,6 +1089,14 @@ func (g *gen) writeCallSuspendibles(b *buffer, n *a.Expr, depth uint32) error {
}
b.writes("if (status) { goto suspend; }\n")
} else if isThisMethod(g.tm, n, "decode_blocks", 2) {
b.printf("status = %s%s_decode_blocks(self, %sdst, %ssrc);\n",
g.pkgPrefix, g.currFunk.astFunc.Receiver().String(g.tm), aPrefix, aPrefix)
if err := g.writeLoadExprDerivedVars(b, n); err != nil {
return err
}
b.writes("if (status) { goto suspend; }\n")
} else if isThisMethod(g.tm, n, "decode_uncompressed", 2) {
b.printf("status = %s%s_decode_uncompressed(self, %sdst, %ssrc);\n",
g.pkgPrefix, g.currFunk.astFunc.Receiver().String(g.tm), aPrefix, aPrefix)