Remove the obsolete is_marked method

This commit is contained in:
Nigel Tao committed 2018-04-28 10:13:32 +10:00
1 parent 6b2f7815da
commit 124a329e73
7 files changed
+8 -59

No files matched your search

+1 -12
View File
@@ -172,7 +172,6 @@ func (g *gen) writeExprOther(b *buffer, n *a.Expr, rp replacementPolicy, pp pare
aPrefix, bPrefix, aPrefix)
return nil
}
// TODO: io_reader.is_marked, not just io_writer.is_marked?
if isInDst(g.tm, n, t.IDLimit, 1) {
return fmt.Errorf(`TODO: cgen an "in.dst.limit" expression`)
}
@@ -190,7 +189,7 @@ func (g *gen) writeExprOther(b *buffer, n *a.Expr, rp replacementPolicy, pp pare
// TODO: drop the "true" in the "if true", provided that the
// benchmark numbers improve.
len0, len1 := "", ""
if true || !n.BoundsCheckOptimized() {
if true {
len0 = aPrefix + "dst.private_impl.bounds[0] ?"
len1 = ": 0"
}
@@ -200,16 +199,6 @@ func (g *gen) writeExprOther(b *buffer, n *a.Expr, rp replacementPolicy, pp pare
aPrefix, len0, bPrefix, aPrefix, len1)
return nil
}
if isInDst(g.tm, n, t.IDIsMarked, 0) {
if pp == parenthesesMandatory {
b.writeb('(')
}
b.printf("%sdst.private_impl.bounds[0] != NULL", aPrefix)
if pp == parenthesesMandatory {
b.writeb(')')
}
return nil
}
if isInDst(g.tm, n, t.IDCopyFromReader32, 2) {
b.printf("wuffs_base__io_writer__copy_from_reader32(&%swptr_dst, %swend_dst",
bPrefix, bPrefix)
-1
View File
@@ -834,7 +834,6 @@ 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.IDIsMarked &&
methodName != t.IDMark &&
methodName != t.IDLimit
// TODO: check that n.Args() is "(x:bar)".