]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: factor our literal lexing from main lexer function
authorRobert Griesemer <gri@golang.org>
Wed, 24 Feb 2016 06:04:20 +0000 (22:04 -0800)
committerRobert Griesemer <gri@golang.org>
Wed, 24 Feb 2016 16:56:51 +0000 (16:56 +0000)
commit8dd2ce2b980d341a4c88e4f3c95e4eca396b6a07
tree8257f3e78f9648ddf2c930f7e0979e94935bdfc9
parent38d4511b104ad61d949d91652985bcdef8cbea5a
cmd/compile: factor our literal lexing from main lexer function

Further reduces complexity of lexer.next which is now readable.
Also removes the need to initialize various local variables in
each next call even if they are not used for the current token.

No measurable performance change for `time go build -a net/http`
(best of 5 runs): difference < 0.3% (in the noise).

Change-Id: I0d74caa2768920af1ceee027e0f46595119d4210
Reviewed-on: https://go-review.googlesource.com/19865
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
src/cmd/compile/internal/gc/lex.go