]> Cypherpunks repositories - gostls13.git/commit
regexp: hide one-pass code from exported API
authorRuss Cox <rsc@golang.org>
Wed, 28 May 2014 18:08:44 +0000 (14:08 -0400)
committerRuss Cox <rsc@golang.org>
Wed, 28 May 2014 18:08:44 +0000 (14:08 -0400)
commit6c10e64a906039678f5dffda8b453005ffcdb92e
tree0e7aa14f692e05d57180593035367aaad4a24a29
parent0782ee3ad57a21bd3566f20e76e4e453613e7a23
regexp: hide one-pass code from exported API

Update #8112

Hide one-pass regexp API.

This means moving the code from regexp/syntax to regexp,
but it avoids being locked into the specific API chosen for
the implementation.

It also removes a slice field from the syntax.Inst, which
should avoid bloating the memory footprint of a non-one-pass
regexp unnecessarily.

LGTM=r
R=golang-codereviews, r
CC=golang-codereviews, iant
https://golang.org/cl/98610046
api/next.txt
src/pkg/regexp/exec.go
src/pkg/regexp/onepass.go [new file with mode: 0644]
src/pkg/regexp/onepass_test.go [new file with mode: 0644]
src/pkg/regexp/regexp.go
src/pkg/regexp/syntax/prog.go
src/pkg/regexp/syntax/prog_test.go