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

Issue 1851673007: [modules] Treat top-level functions as lexical (Closed)

Created:
4 years, 8 months ago by mike3
Modified:
4 years, 8 months ago
Reviewers:
adamk
CC:
v8-reviews_googlegroups.com
Base URL:
https://chromium.googlesource.com/v8/v8.git@master
Target Ref:
refs/pending/heads/master
Project:
v8
Visibility:
Public.

Description

[modules] Treat top-level functions as lexical [15.2.1.11 Static Semantics: LexicallyDeclaredNames](https://tc39.github.io/ecma262/#sec-module-semantics-static-semantics-lexicallydeclarednames) (in contrast with its definition for StatementListItem) makes no explicit provision for HoistableDeclarations. This means that function declarations are treated as lexically scoped in module code, as described in section 15.2.1.11's informative note: > At the top level of a function, or script, function declarations are > treated like var declarations rather than like lexical declarations. BUG=v8:4884 LOG=N R=adamk@chromium.org Committed: https://crrev.com/43fa3e65c931bc2a91a7e2be935ebbc4fb269b0d Cr-Commit-Position: refs/heads/master@{#35633}

Patch Set 1 #

Total comments: 2

Patch Set 2 : Re-implement logic in ParseFunctionDeclaration #

Unified diffs Side-by-side diffs Delta from patch set Stats (+40 lines, -1 line) Patch
M src/parsing/parser.cc View 1 1 chunk +3 lines, -1 line 0 comments Download
M test/cctest/test-parsing.cc View 1 1 chunk +37 lines, -0 lines 0 comments Download

Messages

Total messages: 13 (4 generated)
mike3
4 years, 8 months ago (2016-04-01 23:44:46 UTC) #1
adamk
Thanks for the bug report and test! https://codereview.chromium.org/1851673007/diff/1/src/parsing/parser.cc File src/parsing/parser.cc (right): https://codereview.chromium.org/1851673007/diff/1/src/parsing/parser.cc#newcode1917 src/parsing/parser.cc:1917: (declaration_scope->is_module_scope() && ...
4 years, 8 months ago (2016-04-04 22:19:54 UTC) #2
mike3
Hi Adam! I've just re-implemented this change as you have requested. It doesn't seem as ...
4 years, 8 months ago (2016-04-13 21:18:44 UTC) #3
adamk
lgtm
4 years, 8 months ago (2016-04-18 18:27:23 UTC) #4
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1851673007/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1851673007/20001
4 years, 8 months ago (2016-04-19 13:29:42 UTC) #6
commit-bot: I haz the power
Try jobs failed on following builders: v8_linux_arm_rel_ng on tryserver.v8 (JOB_TIMED_OUT, http://build.chromium.org/p/tryserver.v8/builders/v8_linux_arm_rel_ng/builds/377) v8_linux_nodcheck_rel_ng on tryserver.v8 (JOB_TIMED_OUT, ...
4 years, 8 months ago (2016-04-19 15:32:45 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1851673007/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1851673007/20001
4 years, 8 months ago (2016-04-19 17:34:57 UTC) #10
commit-bot: I haz the power
Committed patchset #2 (id:20001)
4 years, 8 months ago (2016-04-19 17:51:59 UTC) #11
nodir1
4 years, 8 months ago (2016-04-22 18:43:17 UTC) #13
Message was sent while issue was closed.
Patchset 2 (id:??) landed as
https://crrev.com/43fa3e65c931bc2a91a7e2be935ebbc4fb269b0d
Cr-Commit-Position: refs/heads/master@{#35633}

Powered by Google App Engine
This is Rietveld 408576698