If our scopes differ depending on whether we preparse or not, they are
broken.
Preparsing should be an optimization only. If we have preparser data,
great, we
use it. If not, we may or may no create SOME of it ourselves. The
"PartialPreParser" could easily diverge more from the full one, and start
collecting other things that are useful when run immediately before the
normal
parse.
You can't predict whether we had preparser data for the original parse. The
browser might have supplied it or not.
http://codereview.chromium.org/8590027/diff/1/src/runtime.cc
File src/runtime.cc (right):
http://codereview.chromium.org/8590027/diff/1/src/runtime.cc#newcode11247
src/runtime.cc:11247: pre_data = ParserApi::PartialPreParse(source,
NULL, flags);
Why preparse? Is it for speed?
Maybe only do it if the source is larger than 1K, as we do in the normal
parsing.
http://codereview.chromium.org/8590027/diff/1/test/mjsunit/debug-stepout-scope.js
File test/mjsunit/debug-stepout-scope.js (right):
http://codereview.chromium.org/8590027/diff/1/test/mjsunit/debug-stepout-scope.js#newcode175
test/mjsunit/debug-stepout-scope.js:175: break invalid_break_label;
Don't add tests like this.
It should be an early error, so eventually the preparser will detect it
and the test will fail.
If anything, it should be in the bugs/ directory.
http://codereview.chromium.org/8590027/
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev