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

Issue 641283003: Support lazy parsing of inner functions (Closed)

Created:
6 years, 2 months ago by Ian Cullinan
Modified:
5 years ago
Reviewers:
rossberg, marja
CC:
v8-dev, mckev
Base URL:
https://chromium.googlesource.com/external/v8.git@bleeding_edge
Project:
v8
Visibility:
Public.

Description

Support lazy parsing of inner functions The approach here is for the PreParser to report usage of identifiers in expression and calls to eval() with the ParserRecorder interface, which handily also creates the CachedData used to skip this work the next time we encounter the same script. BUG=v8:3195 LOG=Y

Patch Set 1 #

Patch Set 2 : Track variable declarations in the preparser #

Total comments: 1

Patch Set 3 : Actually track variable declarations in the preparser #

Unified diffs Side-by-side diffs Delta from patch set Stats (+619 lines, -95 lines) Patch
M src/parser.h View 1 6 chunks +33 lines, -1 line 0 comments Download
M src/parser.cc View 1 10 chunks +116 lines, -39 lines 0 comments Download
M src/preparse-data.h View 10 chunks +70 lines, -4 lines 0 comments Download
M src/preparse-data.cc View 3 chunks +19 lines, -1 line 0 comments Download
M src/preparse-data-format.h View 1 chunk +1 line, -1 line 0 comments Download
M src/preparser.h View 1 2 20 chunks +92 lines, -30 lines 0 comments Download
M src/preparser.cc View 1 2 20 chunks +140 lines, -9 lines 0 comments Download
M src/vector.h View 1 2 2 chunks +9 lines, -2 lines 0 comments Download
M test/cctest/test-parsing.cc View 1 2 14 chunks +139 lines, -8 lines 0 comments Download

Messages

Total messages: 16 (2 generated)
Ian Cullinan
Hi Marja, Here's a proposed fix for https://code.google.com/p/v8/issues/detail?id=3195 In my testing this signifigantly reduces initial ...
6 years, 2 months ago (2014-10-22 23:07:19 UTC) #2
marja
I had only a very quick look... (will have a better look next week) How ...
6 years, 2 months ago (2014-10-24 16:59:35 UTC) #3
Ian Cullinan
On 2014/10/24 16:59:35, marja wrote: > How do you distinguish between the following cases: I ...
6 years, 2 months ago (2014-10-24 17:30:57 UTC) #4
Ian Cullinan
FYI, I have a related CL https://codereview.chromium.org/677153004/ which provides good test coverage for this change. ...
6 years, 2 months ago (2014-10-24 22:00:34 UTC) #5
marja
rossberg@, this CL enables making inner functions lazy, but it always context-allocates outer function variables ...
6 years, 1 month ago (2014-10-27 08:16:45 UTC) #7
rossberg
On 2014/10/27 08:16:45, marja wrote: > rossberg@, this CL enables making inner functions lazy, but ...
6 years, 1 month ago (2014-10-27 10:20:52 UTC) #8
Ian Cullinan
Hi marja, rossberg, I've had a go at tracking variable declarations and bindings in the ...
6 years, 1 month ago (2014-11-06 02:27:34 UTC) #9
rossberg
Hm, I'm not sure I understand the change. The only place where a variable is ...
6 years, 1 month ago (2014-11-06 11:55:46 UTC) #10
Ian Cullinan
On 2014/11/06 11:55:46, rossberg wrote: > Hm, I'm not sure I understand the change. The ...
6 years, 1 month ago (2014-11-12 19:26:17 UTC) #11
Ian Cullinan
rossberg, PTAL at the latest patch set - I believe I've addressed all the concerns ...
6 years, 1 month ago (2014-11-19 23:35:08 UTC) #12
marja
Q: I wonder whether we need to / should modify the "preparse data". Would it ...
6 years ago (2014-12-09 15:20:46 UTC) #13
Ian Cullinan
> Q: I wonder whether we need to / should modify the "preparse data". Would ...
6 years ago (2014-12-09 21:57:33 UTC) #14
rossberg
I really appreciate the effort you put into this, and from a first look, the ...
6 years ago (2014-12-12 14:39:28 UTC) #15
Ian Cullinan
5 years, 11 months ago (2015-01-09 19:39:23 UTC) #16
On 2014/12/12 14:39:28, rossberg wrote:
> I really appreciate the effort you put into this, and from a first look, the
> latest patch makes sense.
> 
> However, I'm fundamentally concerned about the fact that this change
introduces
> a second, completely different mechanism for doing variable resolution. The
one
> we have now is already more subtle than we'd like. Having to maintain two
> different ones, and making sure that they stay in perfect sync, is probably
> going to be very painful. Especially when there are no significant tests even
> checking that they are in sync.
> 
> So, while I wholeheartedly agree that this would be great to have (and your
> numbers are very convincing!), I'm sorry to say that I don't think we want to
> land this patch in its current form. We would need to find a way to have a
> sufficiently unified implementation (e.g., by factoring out the commonalities
of
> Scope objects as well as the VariableResolution/Allocation algorithms
somehow).

Thanks for the time you've spent looking at this. Unfortunately I haven't had
any time to work on it over xmas/new year, and it's looking like I probably
won't any time soon.

If I do make some progress with Scope/VariableResolution/Allocation should I
post an update to this CL or open a new one?

Cheers,
Ian

Powered by Google App Engine
This is Rietveld 408576698