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

Issue 2010283004: Fix capturing variables in optimized compilations (Closed)

Created:
4 years, 6 months ago by hausner
Modified:
4 years, 6 months ago
CC:
reviews_dartlang.org, vm-dev_dartlang.org
Base URL:
git@github.com:dart-lang/sdk.git@master
Target Ref:
refs/heads/master
Visibility:
Public.

Description

Fix capturing variables in optimized compilations Fourth(!) attempt. This CL fixes another instance where parsing a nested function modifies the parser state of the function that is being compiled. When a local function gets compiled the second time, constant expressions may not be parsed again, since the constant value is found in the cache. If the expression refers to an outer variable, it does not get captured correctly. Fix: instead of parsing a local function repeatedly to capture outer variables, use the local function’s context scope to mark outer variables as captured. This fixes the bug, and makes the compiler more efficient as well. BUG=26453 R=rmacnak@google.com Committed: https://github.com/dart-lang/sdk/commit/7daa2a8915af72ba9394fada91cb40402bff2624

Patch Set 1 #

Patch Set 2 : patch in fix for bug 26453 #

Patch Set 3 : Fix skipping closurization #

Unified diffs Side-by-side diffs Delta from patch set Stats (+112 lines, -36 lines) Patch
M runtime/vm/ast.h View 1 1 chunk +4 lines, -3 lines 0 comments Download
M runtime/vm/flow_graph_builder.cc View 1 1 chunk +1 line, -0 lines 0 comments Download
M runtime/vm/parser.h View 1 chunk +4 lines, -0 lines 0 comments Download
M runtime/vm/parser.cc View 1 2 25 chunks +70 lines, -33 lines 0 comments Download
A tests/language/regress_26453_test.dart View 1 1 chunk +33 lines, -0 lines 0 comments Download

Messages

Total messages: 9 (5 generated)
hausner
4 years, 6 months ago (2016-05-27 16:28:45 UTC) #4
rmacnak
lgtm
4 years, 6 months ago (2016-05-27 18:21:00 UTC) #5
hausner
Committed patchset #3 (id:40001) manually as 7daa2a8915af72ba9394fada91cb40402bff2624 (presubmit successful).
4 years, 6 months ago (2016-05-27 18:27:15 UTC) #7
Florian Schneider
4 years, 6 months ago (2016-05-30 11:57:51 UTC) #9
Message was sent while issue was closed.
Out of curiosity: What was the missing piece to make this fix work?

Powered by Google App Engine
This is Rietveld 408576698