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

Issue 1645053002: dart2js cps: Refactor tracking of side effects. (Closed)

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

Description

dart2js cps: Refactor tracking of side effects. Primitives now getter for its side effects, as a bitmask. This avoids a lot of code duplication between GVN, BoundsChecker, and LoopSideEffects. There are more flags than those in the SideEffects class (which is used by the SSA backend, foreign code annotations, and type inference). We are going to need these extra flags in general, but I want to use them in the CPS first to see how they work out. Upcoming changes which are "loose ends" in this CL to keep it manageable: - Simplify GvnVectorBuilder using dependency flags. - Stop the overuse of isSafeForElimination. - Add the extra flags to the rest of the compiler. BUG= R=sigmund@google.com Committed: https://github.com/dart-lang/sdk/commit/7f6c587de6654ea0b33d23d1c55a8f2a29316d1f Reverted: https://github.com/dart-lang/sdk/commit/a7fe3b140cf93f52cbed72d448c4229c4102ac6a Committed: https://github.com/dart-lang/sdk/commit/6f3b69d36519e1a0305b2879f9413b50662f87c4

Patch Set 1 #

Patch Set 2 : Minor doc change #

Patch Set 3 : Clarification #

Total comments: 10

Patch Set 4 : Rebase #

Patch Set 5 : Rename Primitive.{effectsFlags => effects} and add docs #

Patch Set 6 : Set isFinal at build time #

Patch Set 7 : Added docs for isFinal #

Patch Set 8 : Rebase #

Patch Set 9 : Treat named argument as optional #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+405 lines, -371 lines) Patch
M pkg/compiler/lib/src/cps_ir/bounds_checker.dart View 1 2 3 4 4 chunks +14 lines, -60 lines 0 comments Download
M pkg/compiler/lib/src/cps_ir/builtin_operator.dart View 1 2 3 4 5 6 7 2 chunks +16 lines, -0 lines 0 comments Download
M pkg/compiler/lib/src/cps_ir/cps_ir_builder.dart View 1 2 3 4 5 1 chunk +2 lines, -1 line 0 comments Download
M pkg/compiler/lib/src/cps_ir/cps_ir_builder_task.dart View 1 2 3 4 5 5 chunks +15 lines, -5 lines 0 comments Download
M pkg/compiler/lib/src/cps_ir/cps_ir_nodes.dart View 1 2 3 4 5 6 7 8 21 chunks +77 lines, -20 lines 1 comment Download
M pkg/compiler/lib/src/cps_ir/cps_ir_tracer.dart View 1 2 3 3 chunks +8 lines, -4 lines 0 comments Download
M pkg/compiler/lib/src/cps_ir/eagerly_load_statics.dart View 1 2 3 4 5 3 chunks +14 lines, -4 lines 0 comments Download
A pkg/compiler/lib/src/cps_ir/effects.dart View 1 2 1 chunk +197 lines, -0 lines 0 comments Download
M pkg/compiler/lib/src/cps_ir/gvn.dart View 1 2 3 4 17 chunks +22 lines, -173 lines 0 comments Download
M pkg/compiler/lib/src/cps_ir/loop_effects.dart View 1 2 3 4 4 chunks +17 lines, -104 lines 0 comments Download
M pkg/compiler/lib/src/cps_ir/type_propagation.dart View 1 2 3 4 5 5 chunks +23 lines, -0 lines 0 comments Download

Messages

Total messages: 17 (9 generated)
asgerf
4 years, 10 months ago (2016-01-28 16:20:19 UTC) #5
asgerf
Ping. As I discussed with Kevin, the original motivation for this (separating code motion and ...
4 years, 10 months ago (2016-02-17 16:12:36 UTC) #7
Siggi Cherem (dart-lang)
lgtm Just to make sure I saw all the differences. My main understanding is that ...
4 years, 10 months ago (2016-02-17 20:53:24 UTC) #8
asgerf
Your summary of the changes looks about right. As for (b): the "other" flag is ...
4 years, 9 months ago (2016-02-29 12:48:17 UTC) #9
asgerf
Committed patchset #8 (id:140001) manually as 7f6c587de6654ea0b33d23d1c55a8f2a29316d1f (presubmit successful).
4 years, 9 months ago (2016-02-29 14:10:14 UTC) #12
asgerf
Committed patchset #9 (id:160001) manually as 6f3b69d36519e1a0305b2879f9413b50662f87c4 (presubmit successful).
4 years, 9 months ago (2016-02-29 14:41:10 UTC) #15
sra1
I'd like to see some of the operations be a little more abstract, e.g. if ...
4 years, 9 months ago (2016-02-29 23:40:34 UTC) #16
asgerf
4 years, 9 months ago (2016-03-01 11:53:52 UTC) #17
Message was sent while issue was closed.
On 2016/02/29 23:40:34, sra1 wrote:
> I'd like to see some of the operations be a little more abstract, e.g.
> 
> if (node.primitive.effects & Effects.changesIndexableLength != 0) ...
> 
> -->
> 
> if (Effects.hasChange(node.primitive.effects, Effects.changesIndexableLength))
> ...
> 
>
https://codereview.chromium.org/1645053002/diff/160001/pkg/compiler/lib/src/c...
> File pkg/compiler/lib/src/cps_ir/cps_ir_nodes.dart (right):
> 
>
https://codereview.chromium.org/1645053002/diff/160001/pkg/compiler/lib/src/c...
> pkg/compiler/lib/src/cps_ir/cps_ir_nodes.dart:1382: int get effects => isFinal
?
> 0 : Effects.dependsOnInstanceField;
> isFinal ? Effects.none : Effects.dependsOnInstanceField

Why do you want to hide the fact that we are working with bit masks?

Powered by Google App Engine
This is Rietveld 408576698