http://codereview.chromium.org/4112012/diff/3001/4001
File src/parser.cc (right):

http://codereview.chromium.org/4112012/diff/3001/4001#newcode47
src/parser.cc:47: #include "preparser.h"
Done.

http://codereview.chromium.org/4112012/diff/3001/4001#newcode4937
src/parser.cc:4937: class LogAdapter : public ParserLog {
Mainly to change the existing parser as little as possible ... for now.
I expect a largish cleanup of the real parser to remove the preparsing
(including the ParserLog class which is the one that does nothing,
virtually, when parsing).
This is, however, a small change that should be fairly easy to do now.
I'll remove the adapter and add the functions directly to PreParserLog.

http://codereview.chromium.org/4112012/diff/3001/4001#newcode4945
src/parser.cc:4945: void LogMessage(int start,
Done, and moved.

http://codereview.chromium.org/4112012/diff/3001/4002
File src/parser.h (right):

http://codereview.chromium.org/4112012/diff/3001/4002#newcode184
src/parser.h:184: // Records the occurrence of a function.
Comments added.

http://codereview.chromium.org/4112012/diff/3001/4002#newcode188
src/parser.h:188: virtual void LogError() { }
I'm pretty sure it's not used. I don't know if it ever was.
I'll remove it.

http://codereview.chromium.org/4112012/diff/3001/4002#newcode204
src/parser.h:204: PartialParserRecorder();
Space added.

http://codereview.chromium.org/4112012/diff/3001/4002#newcode231
src/parser.h:231: bool is_recording() {
Done.

http://codereview.chromium.org/4112012/diff/3001/4002#newcode243
src/parser.h:243: int prev_start;
It's only used in debug mode, to ensure that incoming logs have
monotonically increasing start points.

http://codereview.chromium.org/4112012/diff/3001/4003
File src/preparser.h (right):

http://codereview.chromium.org/4112012/diff/3001/4003#newcode75
src/preparser.h:75:
Fixed.

http://codereview.chromium.org/4112012/diff/3001/4003#newcode80
src/preparser.h:80: class PreParser {
Probably not.
We should either collect a corpus of JavaScript files that the two can
be tested against, or use a syntax fuzzer and compare the behavior.
I did some static testing on all our natives files and on a lot of
benchmark files I had available, to test that the old and new preparsing
generated the same preparser data, but I didn't want to add it as a
unit-test, since it relied on JavaScript code that isn't stable.

http://codereview.chromium.org/4112012/diff/3001/4003#newcode253
src/preparser.h:253: template <typename S, typename L>
Done. <S, L> -> <Scanner, Log>.

http://codereview.chromium.org/4112012/diff/3001/4004
File test/cctest/test-parsing.cc (right):

http://codereview.chromium.org/4112012/diff/3001/4004#newcode267
test/cctest/test-parsing.cc:267: void LogMessage(int start, int end,
const char* type, const char* arg_opt) {
Adapter class removed after moving the functions to
PartialParserRecorder.

http://codereview.chromium.org/4112012/show

--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to