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

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

Created:
4 years, 7 months ago by hausner
Modified:
4 years, 7 months ago
Reviewers:
rmacnak
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 Second attempt, this time also capturing hidden variables like 'this' in initializer lists. Original CL is https://codereview.chromium.org/1980193002 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/117693961f3494283fe1ec8f2cda9c106b490092

Patch Set 1 #

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

Messages

Total messages: 7 (4 generated)
hausner
4 years, 7 months ago (2016-05-17 20:28:48 UTC) #3
rmacnak
lgtm
4 years, 7 months ago (2016-05-17 21:43:16 UTC) #5
hausner
4 years, 7 months ago (2016-05-17 22:59:47 UTC) #7
Message was sent while issue was closed.
Committed patchset #1 (id:1) manually as
117693961f3494283fe1ec8f2cda9c106b490092 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698