Rename mark to set_mark, part 1 of N

This commit is contained in:
Nigel Tao committed 2018-05-12 14:17:26 +10:00
1 parent 4afd7de09f
commit bd12c54ab5
9 files changed
+15 -13

No files matched your search

+2 -2
View File
@@ -167,7 +167,7 @@ func (g *gen) writeExprOther(b *buffer, n *a.Expr, rp replacementPolicy, pp pare
// TODO: update the bPrefix variables?
return nil
}
if isInSrc(g.tm, n, t.IDMark, 0) {
if isInSrc(g.tm, n, t.IDSetMark, 0) {
b.printf("wuffs_base__io_reader__mark(&%ssrc, %srptr_src)", aPrefix, bPrefix)
return nil
}
@@ -178,7 +178,7 @@ func (g *gen) writeExprOther(b *buffer, n *a.Expr, rp replacementPolicy, pp pare
aPrefix, bPrefix, aPrefix)
return nil
}
if isInDst(g.tm, n, t.IDMark, 0) {
if isInDst(g.tm, n, t.IDSetMark, 0) {
// TODO: is a private_impl.bounds[0] the right representation? What
// if the function is passed a (ptr io_writer) instead of a
// (io_writer)? Do we still want to have that mark live outside of
+2 -2
View File
@@ -875,7 +875,7 @@ func (g *gen) writeReadUXX(b *buffer, n *a.Expr, name string, size uint32, endia
func isInSrc(tm *t.Map, n *a.Expr, methodName t.ID, nArgs int) bool {
callSuspendible := methodName != t.IDSinceMark &&
methodName != t.IDMark &&
methodName != t.IDSetMark &&
methodName != t.IDSetLimit
if n.Operator() != t.IDOpenParen || n.CallSuspendible() != callSuspendible || len(n.Args()) != nArgs {
return false
@@ -898,7 +898,7 @@ func isInDst(tm *t.Map, n *a.Expr, methodName t.ID, nArgs int) bool {
methodName != t.IDCopyFromSlice32 &&
methodName != t.IDCopyFromSlice &&
methodName != t.IDSinceMark &&
methodName != t.IDMark
methodName != t.IDSetMark
// TODO: check that n.Args() is "(x:bar)".
if n.Operator() != t.IDOpenParen || n.CallSuspendible() != callSuspendible || len(n.Args()) != nArgs {
return false