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

Issue 1005063002: Strawman: check strong mode free variables against the global object. (Closed)

Created:
5 years, 9 months ago by marja
Modified:
5 years, 9 months ago
CC:
v8-dev
Base URL:
https://chromium.googlesource.com/v8/v8.git@master
Target Ref:
refs/pending/heads/master
Project:
v8
Visibility:
Public.

Description

[strong] Check strong mode free variables against the global object. Gather references to unbound variables where the reference (VariableProxy) is inside strong mode. Check them against the global object when a script is bound to a context (during compilation). This CL only checks unbound variables which are not inside lazy functions - TBD how do we solve that; alternatives: add developer mode which disables laziness / do the check whenever lazy functions are really compiled. BUG=v8:3956 LOG=N Committed: https://crrev.com/cb7279da811f7add2f2f6a3bfbf0528834354fa3 Cr-Commit-Position: refs/heads/master@{#27422}

Patch Set 1 #

Patch Set 2 : moar strawmanning #

Patch Set 3 : rebased #

Patch Set 4 : error reporting, y u no work #

Patch Set 5 : errors now reported, location not yet there #

Total comments: 2

Patch Set 6 : tests + fixed lexical vars #

Patch Set 7 : eval tests, adding variable name #

Patch Set 8 : better tests #

Patch Set 9 : fix: we need to track whether the *proxy* is in strong mode, not the *variable* #

Patch Set 10 : . #

Patch Set 11 : . #

Total comments: 4

Patch Set 12 : code review (dslomov) #

Patch Set 13 : unused var fix #

Patch Set 14 : arrow func param fix #

Unified diffs Side-by-side diffs Delta from patch set Stats (+344 lines, -20 lines) Patch
M src/api.cc View 1 2 3 4 5 6 7 8 9 10 11 4 chunks +33 lines, -2 lines 0 comments Download
M src/messages.js View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 0 comments Download
M src/objects.h View 1 2 3 4 5 6 7 8 4 chunks +18 lines, -6 lines 0 comments Download
M src/parser.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +4 lines, -0 lines 0 comments Download
M src/pending-compilation-error-handler.h View 1 2 3 4 5 6 3 chunks +16 lines, -2 lines 0 comments Download
M src/pending-compilation-error-handler.cc View 1 2 3 4 5 6 2 chunks +3 lines, -1 line 0 comments Download
M src/scopeinfo.cc View 1 2 3 4 5 6 7 8 9 10 11 12 6 chunks +72 lines, -5 lines 0 comments Download
M src/scopes.h View 1 2 3 1 chunk +3 lines, -2 lines 0 comments Download
M src/scopes.cc View 1 2 3 4 5 6 7 8 3 chunks +14 lines, -2 lines 0 comments Download
M src/variables.h View 1 2 3 4 5 6 7 8 9 2 chunks +24 lines, -0 lines 0 comments Download
M src/variables.cc View 1 2 3 4 5 6 7 8 1 chunk +3 lines, -0 lines 0 comments Download
M test/cctest/test-parsing.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +150 lines, -0 lines 0 comments Download
M test/mjsunit/strong/declaration-after-use.js View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +3 lines, -0 lines 0 comments Download

Messages

Total messages: 13 (4 generated)
marja
dslomov, could you have an early look at this "dynamic strong mode scoping errors CL? ...
5 years, 9 months ago (2015-03-23 16:26:17 UTC) #2
marja
Hmm, this doesn't yet work for functions; functions introduced by previous *strong mode* scripts are ...
5 years, 9 months ago (2015-03-24 09:57:11 UTC) #3
Dmitry Lomov (no reviews)
overall looking good https://codereview.chromium.org/1005063002/diff/80001/src/api.cc File src/api.cc (right): https://codereview.chromium.org/1005063002/diff/80001/src/api.cc#newcode1500 src/api.cc:1500: Maybe<bool> has = i::JSReceiver::HasOwnProperty(global, name); Why ...
5 years, 9 months ago (2015-03-24 10:16:24 UTC) #4
marja
dslomov, could you have another look? This should be less strawmanny now. Changes: - added ...
5 years, 9 months ago (2015-03-24 14:20:06 UTC) #5
Dmitry Lomov (no reviews)
lgtm % comments https://codereview.chromium.org/1005063002/diff/200001/src/api.cc File src/api.cc (right): https://codereview.chromium.org/1005063002/diff/200001/src/api.cc#newcode1503 src/api.cc:1503: i::ScriptContextTable::LookupResult result; Maybe change order of ...
5 years, 9 months ago (2015-03-24 14:51:46 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1005063002/260001
5 years, 9 months ago (2015-03-24 16:45:32 UTC) #10
marja
Thanks for review. I had to fix arrow func params a bit (see the latest ...
5 years, 9 months ago (2015-03-24 16:46:15 UTC) #11
commit-bot: I haz the power
Committed patchset #14 (id:260001)
5 years, 9 months ago (2015-03-24 16:47:01 UTC) #12
commit-bot: I haz the power
5 years, 9 months ago (2015-03-24 16:47:11 UTC) #13
Message was sent while issue was closed.
Patchset 14 (id:??) landed as
https://crrev.com/cb7279da811f7add2f2f6a3bfbf0528834354fa3
Cr-Commit-Position: refs/heads/master@{#27422}

Powered by Google App Engine
This is Rietveld 408576698