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

Issue 934323004: Teach ModuleDescriptor about basic local exports (Closed)

Created:
5 years, 10 months ago by adamk
Modified:
5 years, 10 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

Teach ModuleDescriptor about basic local exports Add() becomes AddLocalExport, which takes an export_name and a local_name. New parsing tests exercise this. Also start generating exports for default exports (though this doesn't yet handle anonymous default exports). BUG=v8:1569 LOG=n Committed: https://crrev.com/a538d945e39cb653674ef244973ab21d128563d7 Cr-Commit-Position: refs/heads/master@{#26758}

Patch Set 1 #

Total comments: 5

Patch Set 2 : Handled review comments, added message tests #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+130 lines, -140 lines) Patch
M src/ast-value-factory.h View 1 chunk +1 line, -0 lines 0 comments Download
M src/messages.js View 1 1 chunk +1 line, -1 line 0 comments Download
M src/modules.h View 2 chunks +7 lines, -2 lines 0 comments Download
M src/modules.cc View 1 chunk +8 lines, -9 lines 0 comments Download
M src/parser.h View 1 1 chunk +3 lines, -1 line 0 comments Download
M src/parser.cc View 1 10 chunks +71 lines, -52 lines 0 comments Download
M src/scopeinfo.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M test/cctest/cctest.status View 1 chunk +0 lines, -3 lines 0 comments Download
M test/cctest/test-parsing.cc View 3 chunks +5 lines, -64 lines 0 comments Download
A + test/message/export-duplicate.js View 1 1 chunk +3 lines, -2 lines 0 comments Download
A test/message/export-duplicate.out View 1 1 chunk +7 lines, -0 lines 1 comment Download
A + test/message/export-duplicate-as.js View 1 1 chunk +3 lines, -2 lines 0 comments Download
A test/message/export-duplicate-as.out View 1 1 chunk +7 lines, -0 lines 0 comments Download
A + test/message/export-duplicate-default.js View 1 1 chunk +2 lines, -2 lines 0 comments Download
A test/message/export-duplicate-default.out View 1 1 chunk +7 lines, -0 lines 0 comments Download
M test/message/testcfg.py View 1 2 chunks +3 lines, -0 lines 0 comments Download

Messages

Total messages: 16 (5 generated)
adamk
5 years, 10 months ago (2015-02-19 00:45:24 UTC) #2
adamk
The other obvious approach here would be to retrofit ExportDeclaration/Parser::Declare to do this work. +marja ...
5 years, 10 months ago (2015-02-19 00:51:33 UTC) #4
adamk
To talk to myself a little bit more: my initial reasoning behind doing this in ...
5 years, 10 months ago (2015-02-19 00:58:36 UTC) #5
marja
Parsing LGTM. In general I'd like to move Parser::Declare to ParserBase and make PreParser declare ...
5 years, 10 months ago (2015-02-19 10:08:52 UTC) #6
arv (Not doing code reviews)
LGTM https://codereview.chromium.org/934323004/diff/1/src/messages.js File src/messages.js (right): https://codereview.chromium.org/934323004/diff/1/src/messages.js#newcode179 src/messages.js:179: duplicate_export: ["Cannot export '", "%0", "' more than ...
5 years, 10 months ago (2015-02-19 15:05:44 UTC) #8
rossberg
> To talk to myself a little bit more: my initial reasoning behind doing this ...
5 years, 10 months ago (2015-02-19 15:18:13 UTC) #9
adamk
https://codereview.chromium.org/934323004/diff/1/src/messages.js File src/messages.js (right): https://codereview.chromium.org/934323004/diff/1/src/messages.js#newcode179 src/messages.js:179: duplicate_export: ["Cannot export '", "%0", "' more than once"], ...
5 years, 10 months ago (2015-02-19 19:10:10 UTC) #11
arv (Not doing code reviews)
LGTM https://codereview.chromium.org/934323004/diff/20001/test/message/export-duplicate.out File test/message/export-duplicate.out (right): https://codereview.chromium.org/934323004/diff/20001/test/message/export-duplicate.out#newcode5 test/message/export-duplicate.out:5: export { a, b }; Hot!
5 years, 10 months ago (2015-02-19 19:27:42 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/934323004/20001
5 years, 10 months ago (2015-02-19 19:32:08 UTC) #14
commit-bot: I haz the power
Committed patchset #2 (id:20001)
5 years, 10 months ago (2015-02-19 20:15:02 UTC) #15
commit-bot: I haz the power
5 years, 10 months ago (2015-02-19 20:15:26 UTC) #16
Message was sent while issue was closed.
Patchset 2 (id:??) landed as
https://crrev.com/a538d945e39cb653674ef244973ab21d128563d7
Cr-Commit-Position: refs/heads/master@{#26758}

Powered by Google App Engine
This is Rietveld 408576698