use StringPiece for makefile deps
authorEvan Martin <martine@danga.com>
Mon, 12 Sep 2011 17:17:11 +0000 (10:17 -0700)
committerEvan Martin <martine@danga.com>
Mon, 12 Sep 2011 18:46:18 +0000 (11:46 -0700)
commitf1139aff5deddacd899be064fad9ed5a185e7444
tree2d293defa9fd2d257cb25a20d7a66c110fd1f50b
parent0c8e0f761f55e78bdaaad8a92f39a724e81474bf
use StringPiece for makefile deps

Because of this, MakefileParser now returns pointers into the source
makefile string rather than allocating new strings.  Despite needing
to take the result and stuff it into a new string anyway to canonicalize
it, this takes another 50ms or so off the null Chrome build, likely
due to the vector used in MakefileParser changing to a type that doesn't
use any allocations.

(I also experimented with making the vector reserve an initial size but
didn't see any performance impact.)
src/graph.cc
src/parsers.cc
src/parsers.h
src/parsers_test.cc
src/string_piece.h [new file with mode: 0644]