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

Issue 2634123002: [parser] Pessimistically assume top-level variables will be assigned. (Closed)

Created:
3 years, 11 months ago by neis
Modified:
3 years, 11 months ago
Reviewers:
adamk, marja
CC:
v8-reviews_googlegroups.com, Jarin
Target Ref:
refs/pending/heads/master
Project:
v8
Visibility:
Public.

Description

[parser] Pessimistically assume top-level variables will be assigned. We have to pessimistically assume that top-level variables will be assigned. This is because there may be lazily parsed top-level functions, which, for efficiency, we preparse without variable tracking. R=adamk@chromium.org, marja@chromium.org CC=jarin@chromium.org BUG=v8:5636 Review-Url: https://codereview.chromium.org/2634123002 Cr-Commit-Position: refs/heads/master@{#42398} Committed: https://chromium.googlesource.com/v8/v8/+/248d1b3de9872c21df3a92dbaff5c81e2026e0dc

Patch Set 1 #

Total comments: 1

Patch Set 2 : Feedback. #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+68 lines, -0 lines) Patch
M src/parsing/pattern-rewriter.cc View 1 chunk +8 lines, -0 lines 1 comment Download
M test/cctest/test-parsing.cc View 1 1 chunk +60 lines, -0 lines 0 comments Download

Messages

Total messages: 19 (9 generated)
neis
3 years, 11 months ago (2017-01-16 15:16:23 UTC) #1
marja
lgtm https://codereview.chromium.org/2634123002/diff/1/test/cctest/test-parsing.cc File test/cctest/test-parsing.cc (right): https://codereview.chromium.org/2634123002/diff/1/test/cctest/test-parsing.cc#newcode3515 test/cctest/test-parsing.cc:3515: "let foo; function bar() {foo = 42}; ext(bar); ...
3 years, 11 months ago (2017-01-16 15:28:07 UTC) #4
marja
Ahm, I also meant to ask why you ended up putting the maybe_assigned setting to ...
3 years, 11 months ago (2017-01-16 15:30:03 UTC) #5
neis
On 2017/01/16 15:28:07, marja wrote: > lgtm > > https://codereview.chromium.org/2634123002/diff/1/test/cctest/test-parsing.cc > File test/cctest/test-parsing.cc (right): > ...
3 years, 11 months ago (2017-01-17 10:07:17 UTC) #6
marja
still lgtm
3 years, 11 months ago (2017-01-17 10:09:28 UTC) #7
neis
On 2017/01/16 15:30:03, marja wrote: > Ahm, I also meant to ask why you ended ...
3 years, 11 months ago (2017-01-17 10:10:10 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2634123002/20001
3 years, 11 months ago (2017-01-17 10:38:22 UTC) #14
commit-bot: I haz the power
Committed patchset #2 (id:20001) as https://chromium.googlesource.com/v8/v8/+/248d1b3de9872c21df3a92dbaff5c81e2026e0dc
3 years, 11 months ago (2017-01-17 10:40:09 UTC) #17
adamk
https://codereview.chromium.org/2634123002/diff/20001/src/parsing/pattern-rewriter.cc File src/parsing/pattern-rewriter.cc (right): https://codereview.chromium.org/2634123002/diff/20001/src/parsing/pattern-rewriter.cc#newcode230 src/parsing/pattern-rewriter.cc:230: // assigned. This is because there may be lazily ...
3 years, 11 months ago (2017-01-17 18:09:04 UTC) #18
neis
3 years, 11 months ago (2017-01-18 09:07:27 UTC) #19
Message was sent while issue was closed.
On 2017/01/17 18:09:04, adamk wrote:
>
https://codereview.chromium.org/2634123002/diff/20001/src/parsing/pattern-rew...
> File src/parsing/pattern-rewriter.cc (right):
> 
>
https://codereview.chromium.org/2634123002/diff/20001/src/parsing/pattern-rew...
> src/parsing/pattern-rewriter.cc:230: // assigned.  This is because there may
be
> lazily parsed top-level
> As discussed offline, this comment is slightly misleading: top-level variables
> need to be marked as assigned because a script (or indirect eval) could always
> modify them (unless they're CONST, naturally).

or unless they are top-level inside a module.

Powered by Google App Engine
This is Rietveld 408576698