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

Issue 2375793002: Reland: [modules] Properly initialize declared variables. (Closed)

Created:
4 years, 2 months ago by neis
Modified:
4 years, 2 months ago
CC:
v8-reviews_googlegroups.com, rmcilroy
Target Ref:
refs/pending/heads/master
Project:
v8
Visibility:
Public.

Description

Reland: [modules] Properly initialize declared variables. Before evaluating a module, all variables declared at the top-level in _any_ of the modules in the dependency graph must be initialized. This is observable because a module A can access a variable imported from module B (e.g. a function) at a point when module B's body hasn't been evaluated yet. We achieve this by implementing modules internally as generators with two states (not initialized, initialized). R=adamk@chromium.org BUG=v8:1569 CQ_INCLUDE_TRYBOTS=master.tryserver.v8:v8_win_dbg Committed: https://crrev.com/f4dfb6fbe1cdd9a0f287a1a9c496e1f69f6f5d20 Committed: https://crrev.com/8c52a411583e870bd5ed100864caa58f491c5d88 Committed: https://crrev.com/427242326cdb322fd8d6df1f80bb3f4a24733708 Cr-Original-Original-Commit-Position: refs/heads/master@{#39871} Cr-Original-Commit-Position: refs/heads/master@{#39892} Cr-Commit-Position: refs/heads/master@{#39900}

Patch Set 1 #

Total comments: 1

Patch Set 2 : Rebase. #

Patch Set 3 : Use internal version of generator_prototype_next that doesn't show up in trace. #

Patch Set 4 : Address comment and remove bogus comment. #

Patch Set 5 : Use new FunctionKind::kModule rather than kGeneratorFunction. #

Patch Set 6 : Update CompilerHints. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+145 lines, -55 lines) Patch
M src/ast/scopes.cc View 1 2 3 4 1 chunk +2 lines, -1 line 0 comments Download
M src/bootstrapper.cc View 1 2 1 chunk +6 lines, -0 lines 0 comments Download
M src/contexts.h View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M src/globals.h View 1 2 3 4 3 chunks +8 lines, -1 line 0 comments Download
M src/interpreter/bytecode-generator.cc View 3 chunks +9 lines, -2 lines 0 comments Download
M src/objects.h View 1 2 3 4 5 3 chunks +5 lines, -2 lines 0 comments Download
M src/objects.cc View 1 2 2 chunks +17 lines, -6 lines 0 comments Download
M src/parsing/parser.h View 1 2 chunks +3 lines, -0 lines 0 comments Download
M src/parsing/parser.cc View 1 2 3 7 chunks +43 lines, -36 lines 0 comments Download
M test/cctest/interpreter/bytecode_expectations/CallRuntime.golden View 1 chunk +1 line, -1 line 0 comments Download
A + test/mjsunit/modules-error-trace.js View 1 2 1 chunk +3 lines, -1 line 0 comments Download
A + test/mjsunit/modules-init1.js View 1 chunk +3 lines, -1 line 0 comments Download
A + test/mjsunit/modules-init2.js View 1 chunk +2 lines, -1 line 0 comments Download
A test/mjsunit/modules-init3.js View 1 chunk +20 lines, -0 lines 0 comments Download
A + test/mjsunit/modules-skip-init1.js View 1 chunk +2 lines, -3 lines 0 comments Download
A test/mjsunit/modules-skip-init3.js View 1 chunk +20 lines, -0 lines 0 comments Download

Messages

Total messages: 63 (30 generated)
neis
4 years, 2 months ago (2016-09-27 23:09:57 UTC) #1
neis
Please take a first look.
4 years, 2 months ago (2016-09-27 23:10:20 UTC) #2
adamk
Very clean indeed. lgtm with more CL description. https://codereview.chromium.org/2375793002/diff/1/src/parsing/parser.cc File src/parsing/parser.cc (right): https://codereview.chromium.org/2375793002/diff/1/src/parsing/parser.cc#newcode2600 src/parsing/parser.cc:2600: this->scope()->ForceContextAllocation(); ...
4 years, 2 months ago (2016-09-27 23:26:13 UTC) #3
neis
On 2016/09/27 23:26:13, adamk wrote: > Very clean indeed. lgtm with more CL description. > ...
4 years, 2 months ago (2016-09-29 11:43:57 UTC) #5
neis
+mstarzinger for interpreter
4 years, 2 months ago (2016-09-29 11:44:27 UTC) #7
Michael Starzinger
LGTM on "interpreter", didn't look at the rest.
4 years, 2 months ago (2016-09-29 12:30:26 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/2375793002/60001
4 years, 2 months ago (2016-09-29 12:37:14 UTC) #11
commit-bot: I haz the power
Try jobs failed on following builders: v8_linux_rel_ng on master.tryserver.v8 (JOB_FAILED, http://build.chromium.org/p/tryserver.v8/builders/v8_linux_rel_ng/builds/13674) v8_linux_rel_ng_triggered on master.tryserver.v8 (JOB_FAILED, ...
4 years, 2 months ago (2016-09-29 13:10:00 UTC) #13
neis
Ok, I need to introduce a new FunctionKind after all.
4 years, 2 months ago (2016-09-29 13:14:54 UTC) #14
Michael Starzinger
LGTM on patch set #4 from my end as well.
4 years, 2 months ago (2016-09-29 13:46:43 UTC) #15
Michael Starzinger
Doesn't SharedFunctionInfo::is_resumable need to be adapted though?
4 years, 2 months ago (2016-09-29 13:48:00 UTC) #18
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/2375793002/80001
4 years, 2 months ago (2016-09-29 13:48:01 UTC) #19
commit-bot: I haz the power
Committed patchset #5 (id:80001)
4 years, 2 months ago (2016-09-29 14:20:38 UTC) #21
commit-bot: I haz the power
Patchset 5 (id:??) landed as https://crrev.com/f4dfb6fbe1cdd9a0f287a1a9c496e1f69f6f5d20 Cr-Commit-Position: refs/heads/master@{#39871}
4 years, 2 months ago (2016-09-29 14:21:09 UTC) #23
Michael Achenbach
A revert of this CL (patchset #5 id:80001) has been created in https://codereview.chromium.org/2379063002/ by machenbach@chromium.org. ...
4 years, 2 months ago (2016-09-29 15:09:43 UTC) #24
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/2375793002/100001
4 years, 2 months ago (2016-09-29 18:03:51 UTC) #29
Michael Achenbach
On 2016/09/29 18:03:51, commit-bot: I haz the power wrote: > CQ is trying da patch. ...
4 years, 2 months ago (2016-09-29 18:05:58 UTC) #31
Michael Achenbach
On 2016/09/29 18:05:58, machenbach (slow) wrote: > On 2016/09/29 18:03:51, commit-bot: I haz the power ...
4 years, 2 months ago (2016-09-29 18:07:43 UTC) #33
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/2375793002/100001
4 years, 2 months ago (2016-09-29 18:08:11 UTC) #35
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/2375793002/100001
4 years, 2 months ago (2016-09-29 18:35:16 UTC) #38
commit-bot: I haz the power
Try jobs failed on following builders: v8_linux_rel_ng on master.tryserver.v8 (JOB_FAILED, http://build.chromium.org/p/tryserver.v8/builders/v8_linux_rel_ng/builds/13717) v8_linux_rel_ng_triggered on master.tryserver.v8 (JOB_FAILED, ...
4 years, 2 months ago (2016-09-29 19:31:41 UTC) #40
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/2375793002/100001
4 years, 2 months ago (2016-09-29 19:51:44 UTC) #42
commit-bot: I haz the power
Try jobs failed on following builders: v8_linux_rel_ng on master.tryserver.v8 (JOB_FAILED, http://build.chromium.org/p/tryserver.v8/builders/v8_linux_rel_ng/builds/13720) v8_linux_rel_ng_triggered on master.tryserver.v8 (JOB_FAILED, ...
4 years, 2 months ago (2016-09-29 20:43:36 UTC) #44
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/2375793002/100001
4 years, 2 months ago (2016-09-29 20:47:51 UTC) #46
commit-bot: I haz the power
Try jobs failed on following builders: v8_linux_rel_ng on master.tryserver.v8 (JOB_FAILED, http://build.chromium.org/p/tryserver.v8/builders/v8_linux_rel_ng/builds/13725) v8_linux_rel_ng_triggered on master.tryserver.v8 (JOB_FAILED, ...
4 years, 2 months ago (2016-09-29 21:34:41 UTC) #48
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/2375793002/100001
4 years, 2 months ago (2016-09-29 21:57:40 UTC) #50
commit-bot: I haz the power
Committed patchset #6 (id:100001)
4 years, 2 months ago (2016-09-29 22:24:44 UTC) #52
commit-bot: I haz the power
Patchset 6 (id:??) landed as https://crrev.com/8c52a411583e870bd5ed100864caa58f491c5d88 Cr-Commit-Position: refs/heads/master@{#39892}
4 years, 2 months ago (2016-09-29 22:25:08 UTC) #54
Benedikt Meurer
A revert of this CL (patchset #6 id:100001) has been created in https://codereview.chromium.org/2387593002/ by bmeurer@chromium.org. ...
4 years, 2 months ago (2016-09-30 04:21:54 UTC) #55
Michael Achenbach
Very strange: The problems seemed to have started with this CL again, stopped on revert, ...
4 years, 2 months ago (2016-09-30 06:41:16 UTC) #56
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/2375793002/100001
4 years, 2 months ago (2016-09-30 07:50:47 UTC) #59
commit-bot: I haz the power
Committed patchset #6 (id:100001)
4 years, 2 months ago (2016-09-30 07:53:49 UTC) #61
commit-bot: I haz the power
4 years, 2 months ago (2016-09-30 07:54:12 UTC) #63
Message was sent while issue was closed.
Patchset 6 (id:??) landed as
https://crrev.com/427242326cdb322fd8d6df1f80bb3f4a24733708
Cr-Commit-Position: refs/heads/master@{#39900}

Powered by Google App Engine
This is Rietveld 408576698