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

Issue 1458703007: dart2js cps: Refactor CallExpressions into Primitives. (Closed)

Created:
5 years, 1 month ago by asgerf
Modified:
5 years, 1 month 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 CallExpressions into Primitives. (Work-in-progress, but mostly done) InvokeMethod and friends no longer take a continuation, but are instead primitives bound by LetPrim. This touches a lot of code. Some general housekeeping came along in the process. InvokeMethod has a "calling convention" enum on it to enable dartReceiver and getDartArgument convenience methods. There is a new UnsafePrimitive class to help type propagation constant-fold InvokeMethods. I expect the class will go away after some changes to type propagation. Most optimizations work exactly as before, but not all are 100% consistent. The consecutive push rewrite was removed entirely because V8 does not like that. BUG= R=kmillikin@google.com, sra@google.com Committed: https://github.com/dart-lang/sdk/commit/cb8d7994cee3771b95d03aadd2b6c16398e5da97

Patch Set 1 #

Total comments: 34

Patch Set 2 : Some renamings and doc comments #

Patch Set 3 : More comments addressed #

Patch Set 4 : Rename substituteFor, redefineAs --> replaceUsesWith, replaceWith #

Patch Set 5 : Missed a renaming #

Patch Set 6 : Do not call push with multiple arguments #

Patch Set 7 : visitLetPrim will reprocess a returned primitive #

Patch Set 8 : Some minor fixes #

Patch Set 9 : Unsugar == null to Identical rather than LooseEq to ensure type refinement #

Patch Set 10 : Enable type mask assertion again #

Patch Set 11 : Comment on isPure #

Patch Set 12 : Fix return type on visitTypeCast #

Patch Set 13 : Another minor fix #

Total comments: 16

Patch Set 14 : Kevin's comments #

Patch Set 15 : Update test expectation #

Patch Set 16 : Rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+764 lines, -1004 lines) Patch
M pkg/compiler/lib/src/cps_ir/bounds_checker.dart View 1 2 3 7 chunks +2 lines, -13 lines 0 comments Download
M pkg/compiler/lib/src/cps_ir/cps_fragment.dart View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +44 lines, -25 lines 0 comments Download
M pkg/compiler/lib/src/cps_ir/cps_ir_builder.dart View 1 2 3 4 5 6 7 8 9 10 11 12 13 12 chunks +23 lines, -41 lines 0 comments Download
M pkg/compiler/lib/src/cps_ir/cps_ir_integrity.dart View 1 chunk +3 lines, -0 lines 0 comments Download
M pkg/compiler/lib/src/cps_ir/cps_ir_nodes.dart View 1 2 3 4 23 chunks +117 lines, -95 lines 0 comments Download
M pkg/compiler/lib/src/cps_ir/cps_ir_nodes_sexpr.dart View 1 7 chunks +17 lines, -26 lines 0 comments Download
M pkg/compiler/lib/src/cps_ir/cps_ir_tracer.dart View 11 chunks +26 lines, -50 lines 0 comments Download
M pkg/compiler/lib/src/cps_ir/insert_refinements.dart View 1 2 3 4 5 6 7 8 9 10 11 12 13 7 chunks +27 lines, -42 lines 0 comments Download
M pkg/compiler/lib/src/cps_ir/loop_hierarchy.dart View 2 chunks +2 lines, -25 lines 0 comments Download
M pkg/compiler/lib/src/cps_ir/mutable_ssa.dart View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M pkg/compiler/lib/src/cps_ir/redundant_phi.dart View 1 2 3 2 chunks +2 lines, -2 lines 0 comments Download
M pkg/compiler/lib/src/cps_ir/remove_refinements.dart View 1 2 3 4 5 6 7 1 chunk +1 line, -2 lines 0 comments Download
M pkg/compiler/lib/src/cps_ir/scalar_replacement.dart View 1 2 3 2 chunks +3 lines, -3 lines 0 comments Download
M pkg/compiler/lib/src/cps_ir/share_final_fields.dart View 1 2 3 1 chunk +1 line, -2 lines 0 comments Download
M pkg/compiler/lib/src/cps_ir/share_interceptors.dart View 1 2 3 4 chunks +4 lines, -8 lines 0 comments Download
M pkg/compiler/lib/src/cps_ir/shrinking_reductions.dart View 1 2 3 2 chunks +2 lines, -3 lines 0 comments Download
M pkg/compiler/lib/src/cps_ir/type_propagation.dart View 1 2 3 4 5 6 7 8 9 10 11 12 13 50 chunks +337 lines, -485 lines 0 comments Download
M pkg/compiler/lib/src/js_backend/codegen/unsugar.dart View 1 2 3 4 5 6 7 8 9 chunks +47 lines, -44 lines 0 comments Download
M pkg/compiler/lib/src/tree_ir/tree_ir_builder.dart View 1 2 3 4 5 6 5 chunks +104 lines, -136 lines 0 comments Download
M tests/compiler/dart2js/js_backend_cps_ir_closures_test.dart View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 11 (3 generated)
asgerf
5 years, 1 month ago (2015-11-19 18:39:41 UTC) #3
sra1
Looking good. https://codereview.chromium.org/1458703007/diff/1/pkg/compiler/lib/src/cps_ir/cps_fragment.dart File pkg/compiler/lib/src/cps_ir/cps_fragment.dart (right): https://codereview.chromium.org/1458703007/diff/1/pkg/compiler/lib/src/cps_ir/cps_fragment.dart#newcode129 pkg/compiler/lib/src/cps_ir/cps_fragment.dart:129: /// The continuation body becomes the new ...
5 years, 1 month ago (2015-11-19 21:41:46 UTC) #4
asgerf
https://codereview.chromium.org/1458703007/diff/1/pkg/compiler/lib/src/cps_ir/cps_fragment.dart File pkg/compiler/lib/src/cps_ir/cps_fragment.dart (right): https://codereview.chromium.org/1458703007/diff/1/pkg/compiler/lib/src/cps_ir/cps_fragment.dart#newcode129 pkg/compiler/lib/src/cps_ir/cps_fragment.dart:129: /// The continuation body becomes the new hole. On ...
5 years, 1 month ago (2015-11-20 16:23:54 UTC) #5
sra1
lgtm looks great!
5 years, 1 month ago (2015-11-20 23:47:23 UTC) #6
asgerf
5 years, 1 month ago (2015-11-23 09:25:44 UTC) #8
Kevin Millikin (Google)
LGTM (looks great to me). https://codereview.chromium.org/1458703007/diff/220001/pkg/compiler/lib/src/cps_ir/cps_fragment.dart File pkg/compiler/lib/src/cps_ir/cps_fragment.dart (right): https://codereview.chromium.org/1458703007/diff/220001/pkg/compiler/lib/src/cps_ir/cps_fragment.dart#newcode132 pkg/compiler/lib/src/cps_ir/cps_fragment.dart:132: sourceInformation)); I'm not sure ...
5 years, 1 month ago (2015-11-23 10:22:44 UTC) #9
asgerf
https://codereview.chromium.org/1458703007/diff/220001/pkg/compiler/lib/src/cps_ir/cps_fragment.dart File pkg/compiler/lib/src/cps_ir/cps_fragment.dart (right): https://codereview.chromium.org/1458703007/diff/220001/pkg/compiler/lib/src/cps_ir/cps_fragment.dart#newcode132 pkg/compiler/lib/src/cps_ir/cps_fragment.dart:132: sourceInformation)); On 2015/11/23 10:22:44, Kevin Millikin (Google) wrote: > ...
5 years, 1 month ago (2015-11-23 10:48:57 UTC) #10
asgerf
5 years, 1 month ago (2015-11-23 11:29:49 UTC) #11
Message was sent while issue was closed.
Committed patchset #16 (id:280001) manually as
cb8d7994cee3771b95d03aadd2b6c16398e5da97 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698