Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(116)

Issue 7565003: Revert "Revert "Fix a bug in scope analysis."" (Closed)

Created:
9 years, 4 months ago by Kevin Millikin (Chromium)
Modified:
9 years, 4 months ago
Reviewers:
Lasse Reichstein
CC:
v8-dev
Visibility:
Public.

Description

Revert "Revert "Fix a bug in scope analysis."" Reapply r8783 with an additional fix. Because the preparser and parser do not use the same scope analysis to determine if a function can be lazily compiled, the parser can have false positives. Rather than treating this as a parse error, treat the preparser as authoritative and eagerly compile the function. R=lrn@chromium.org BUG= TEST= Committed: http://code.google.com/p/v8/source/detail?r=8797

Patch Set 1 #

Patch Set 2 : Update test expectation. #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+85 lines, -28 lines) Patch
M src/parser.cc View 2 chunks +33 lines, -23 lines 2 comments Download
M test/cctest/test-api.cc View 1 1 chunk +4 lines, -5 lines 0 comments Download
A test/mjsunit/regress/regress-91120.js View 1 chunk +48 lines, -0 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
Kevin Millikin (Chromium)
9 years, 4 months ago (2011-08-03 08:33:31 UTC) #1
Lasse Reichstein
LGTM http://codereview.chromium.org/7565003/diff/3001/src/parser.cc File src/parser.cc (right): http://codereview.chromium.org/7565003/diff/3001/src/parser.cc#newcode3737 src/parser.cc:3737: is_lazily_compiled = false; This handles false positives (from ...
9 years, 4 months ago (2011-08-03 09:05:17 UTC) #2
Kevin Millikin (Chromium)
9 years, 4 months ago (2011-08-03 09:09:49 UTC) #3
http://codereview.chromium.org/7565003/diff/3001/src/parser.cc
File src/parser.cc (right):

http://codereview.chromium.org/7565003/diff/3001/src/parser.cc#newcode3737
src/parser.cc:3737: is_lazily_compiled = false;
On 2011/08/03 09:05:17, Lasse Reichstein wrote:
> This handles false positives (from the parser's perspective) only. It also
> affects false negatives, if they can occur.  It will completely block all
> further laziness, since the ScriptDataImpl will never match (and thereby skip)
> the unused function entry.
> 
> That's probably fine for now.

Thanks for pointing that out, I hadn't realized it.  I want to commit this as
is, but we should clean it up soon.

Powered by Google App Engine
This is Rietveld 408576698