Fix the bit massaging code in CompleteParserRecorder::WriteNumber.
authormarja@chromium.org <marja@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Tue, 25 Feb 2014 11:51:02 +0000 (11:51 +0000)
committermarja@chromium.org <marja@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Tue, 25 Feb 2014 11:51:02 +0000 (11:51 +0000)
commit94af17a845213b2574ae00e9260cb7f4827999d4
tree6e08cde590c06b9576b2f8a89bb455147d80bc7d
parent368782f06136882053c094068b5a33d8f3e97e28
Fix the bit massaging code in CompleteParserRecorder::WriteNumber.

The original code, added by
https://codereview.chromium.org/3384003/diff/7001/src/parser.cc 3.5 years ago,
failed to write numbers which contain a chunk of 7 zeroes in the middle. The
smallest such number is 2^14, so this is a problem if the source file to
preparse contains 16384 or more symbols (which happens in the wild).

This bug went unnoticed because the symbol data was not used by Parser (see
https://codereview.chromium.org/172753002/ for starting to use it again) and
there were no tests.

R=ulan@chromium.org
BUG=346221
LOG=y

Review URL: https://codereview.chromium.org/179433004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19538 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
src/preparse-data.cc
src/preparse-data.h
test/cctest/test-parsing.cc