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

Issue 1080003005: Make the mutable variables local to an IR builder instead of global. (Closed)

Created:
5 years, 8 months ago by Kevin Millikin (Google)
Modified:
5 years, 8 months ago
Reviewers:
asgerf
CC:
reviews_dartlang.org
Target Ref:
refs/remotes/git-svn
Visibility:
Public.

Description

Make the mutable variables local to an IR builder instead of global. When translating a try block, variables become mutable on entry and stop being mutable on exit. Make the set of set of mutable variables local to an IR builder instead of global for a whole function, so that the translation does not depend so heavily on the order of visiting subparts of the input. Since JS code can have mutable variables (i.e., not boxed in the heap), move them to the backend-independent IR builder state. This fixes a bug in the JS translation of try-catch where the environment would contain duplicated bindings for mutable variables. The right binding happened to 'win' so it was not observable other than an assertion failure. BUG= R=asgerf@google.com Committed: https://code.google.com/p/dart/source/detail?r=45272 Committed: https://code.google.com/p/dart/source/detail?r=45279

Patch Set 1 #

Total comments: 1

Patch Set 2 : A pair of bug fixes. #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+61 lines, -73 lines) Patch
M pkg/compiler/lib/src/cps_ir/cps_ir_builder.dart View 1 15 chunks +61 lines, -73 lines 2 comments Download

Messages

Total messages: 7 (1 generated)
Kevin Millikin (Google)
5 years, 8 months ago (2015-04-17 13:44:00 UTC) #2
asgerf
LGTM https://codereview.chromium.org/1080003005/diff/1/pkg/compiler/lib/src/cps_ir/cps_ir_builder.dart File pkg/compiler/lib/src/cps_ir/cps_ir_builder.dart (right): https://codereview.chromium.org/1080003005/diff/1/pkg/compiler/lib/src/cps_ir/cps_ir_builder.dart#newcode2136 pkg/compiler/lib/src/cps_ir/cps_ir_builder.dart:2136: dartState.registerizedMutableVariables.add(loopVariable); We should be able to get rid ...
5 years, 8 months ago (2015-04-20 08:46:10 UTC) #3
Kevin Millikin (Google)
Committed patchset #1 (id:1) manually as 45272 (presubmit successful).
5 years, 8 months ago (2015-04-20 09:00:21 UTC) #4
Kevin Millikin (Google)
I should have run dart2dart tests. I've fixed a pair of bugs. Please take a ...
5 years, 8 months ago (2015-04-20 10:32:20 UTC) #5
asgerf
lgtm
5 years, 8 months ago (2015-04-20 10:48:50 UTC) #6
Kevin Millikin (Google)
5 years, 8 months ago (2015-04-20 11:44:32 UTC) #7
Message was sent while issue was closed.
Committed patchset #2 (id:20001) manually as 45279 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698