What do the efficiency results for this say? (You can try with e.g.,
parser-shell and a big .js file, plus benchmarks like mandreel and code load).

The peeking approach lg in general.


https://codereview.chromium.org/987083003/diff/20001/src/preparser.h
File src/preparser.h (right):

https://codereview.chromium.org/987083003/diff/20001/src/preparser.h#newcode914
src/preparser.h:914: return TypeField::decode(code_) &
kSpreadExpression;
Hmm... so this works because kSpreadExpression happens to be 4 (which is
a single bit), right? But it's fragile and wouldn't work if somebody
reorders the Type enum...

https://codereview.chromium.org/987083003/diff/20001/src/preparser.h#newcode964
src/preparser.h:964: kSpreadExpression
So maybe add "= 1 << 3 " here to hint that kSpreadExpression needs to be
a single-bit thing.

https://codereview.chromium.org/987083003/diff/20001/src/preparser.h#newcode973
src/preparser.h:973: enum ExpressionType {
(Huh, why do we have Type and ExpressionType? Urgh. Seems to be coming
from https://codereview.chromium.org/422363002 .)

https://codereview.chromium.org/987083003/diff/20001/src/preparser.h#newcode1968
src/preparser.h:1968: int x = 5;
?

https://codereview.chromium.org/987083003/diff/20001/src/scanner.cc
File src/scanner.cc (right):

https://codereview.chromium.org/987083003/diff/20001/src/scanner.cc#newcode717
src/scanner.cc:717: // Not supported when there is multiple lookahead
tokens
... what prevents this from happening?

https://codereview.chromium.org/987083003/

--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to