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

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

Created:
4 years, 7 months ago by hausner
Modified:
4 years, 6 months ago
Reviewers:
rmacnak
CC:
reviews_dartlang.org, vm-dev_dartlang.org, Florian Schneider, Vyacheslav Egorov (Google)
Base URL:
git@github.com:dart-lang/sdk.git@master
Target Ref:
refs/heads/master
Visibility:
Public.

Description

Fix capturing variables in optimized compilations Third attempt. A latent bug in finally block inlining caused the previous crashes in optimized functions. Fix is in https://codereview.chromium.org/2004883004/. 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/4dca5d0e012756faa08991c55098f8a566968e63

Patch Set 1 #

Patch Set 2 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+111 lines, -36 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.h View 1 1 chunk +4 lines, -0 lines 0 comments Download
M runtime/vm/parser.cc View 1 24 chunks +69 lines, -33 lines 0 comments Download
A tests/language/regress_26453_test.dart View 1 chunk +33 lines, -0 lines 0 comments Download

Messages

Total messages: 6 (3 generated)
hausner
Third time's a charm, hopefully.
4 years, 7 months ago (2016-05-24 19:52:42 UTC) #3
rmacnak
lgtm
4 years, 7 months ago (2016-05-24 21:17:09 UTC) #4
hausner
4 years, 7 months ago (2016-05-24 21:40:57 UTC) #6
Message was sent while issue was closed.
Committed patchset #1 (id:1) manually as
4dca5d0e012756faa08991c55098f8a566968e63 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698