Rename writer1.slice to writer1.since_mark.

This commit is contained in:
Nigel Tao committed 2017-10-26 13:03:19 +11:00
1 parent bdfe4abbd3
commit 5052b16f2d
7 files changed
+18 -23

No files matched your search

+1 -1
View File
@@ -168,7 +168,7 @@ func (g *gen) writeExprOther(b *buffer, n *a.Expr, rp replacementPolicy, pp pare
b.writes(")")
return nil
}
if isInDst(g.tm, n, t.KeySlice, 0) {
if isInDst(g.tm, n, t.KeySinceMark, 0) {
b.printf("((puffs_base__slice_u8){ "+
".ptr = %sdst.private_impl.mark, "+
".len = %sdst.private_impl.mark ? %swptr_dst - %sdst.private_impl.mark : 0, })",
+1 -1
View File
@@ -695,7 +695,7 @@ func isInDst(tm *t.Map, n *a.Expr, methodName t.Key, nArgs int) bool {
methodName != t.KeyCopyFromHistory32 &&
methodName != t.KeyCopyFromSlice32 &&
methodName != t.KeyCopyFromSlice &&
methodName != t.KeySlice &&
methodName != t.KeySinceMark &&
methodName != t.KeyMark
// TODO: check that n.Args() is "(x:bar)".
if n.ID0().Key() != t.KeyOpenParen || n.CallSuspendible() != callSuspendible || len(n.Args()) != nArgs {