diff options
author | Ian Lance Taylor <ian@gcc.gnu.org> | 2016-07-22 18:15:38 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@gcc.gnu.org> | 2016-07-22 18:15:38 +0000 |
commit | 22b955cca564a9a3a5b8c9d9dd1e295b7943c128 (patch) | |
tree | abdbd898676e1f853fca2d7e031d105d7ebcf676 /libgo/go/regexp/exec.go | |
parent | 9d04a3af4c6491536badf6bde9707c907e4d196b (diff) | |
download | gcc-22b955cca564a9a3a5b8c9d9dd1e295b7943c128.zip gcc-22b955cca564a9a3a5b8c9d9dd1e295b7943c128.tar.gz gcc-22b955cca564a9a3a5b8c9d9dd1e295b7943c128.tar.bz2 |
libgo: update to go1.7rc3
Reviewed-on: https://go-review.googlesource.com/25150
From-SVN: r238662
Diffstat (limited to 'libgo/go/regexp/exec.go')
-rw-r--r-- | libgo/go/regexp/exec.go | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/libgo/go/regexp/exec.go b/libgo/go/regexp/exec.go index 5182720..4fd61b5 100644 --- a/libgo/go/regexp/exec.go +++ b/libgo/go/regexp/exec.go @@ -19,7 +19,7 @@ type queue struct { // A entry is an entry on a queue. // It holds both the instruction pc and the actual thread. // Some queue entries are just place holders so that the machine -// knows it has considered that pc. Such entries have t == nil. +// knows it has considered that pc. Such entries have t == nil. type entry struct { pc uint32 t *thread @@ -107,14 +107,6 @@ func (m *machine) alloc(i *syntax.Inst) *thread { return t } -// free returns t to the free pool. -func (m *machine) free(t *thread) { - m.inputBytes.str = nil - m.inputString.str = "" - m.inputReader.r = nil - m.pool = append(m.pool, t) -} - // match runs the machine over the input starting at pos. // It reports whether a match was found. // If so, m.matchcap holds the submatch information. @@ -192,7 +184,6 @@ func (m *machine) match(i input, pos int) bool { func (m *machine) clear(q *queue) { for _, d := range q.dense { if d.t != nil { - // m.free(d.t) m.pool = append(m.pool, d.t) } } @@ -213,7 +204,6 @@ func (m *machine) step(runq, nextq *queue, pos, nextPos int, c rune, nextCond sy continue } if longest && m.matched && len(t.cap) > 0 && m.matchcap[0] < t.cap[0] { - // m.free(t) m.pool = append(m.pool, t) continue } @@ -232,7 +222,6 @@ func (m *machine) step(runq, nextq *queue, pos, nextPos int, c rune, nextCond sy // First-match mode: cut off all lower-priority threads. for _, d := range runq.dense[j+1:] { if d.t != nil { - // m.free(d.t) m.pool = append(m.pool, d.t) } } @@ -253,7 +242,6 @@ func (m *machine) step(runq, nextq *queue, pos, nextPos int, c rune, nextCond sy t = m.add(nextq, i.Out, nextPos, t.cap, nextCond, t) } if t != nil { - // m.free(t) m.pool = append(m.pool, t) } } |