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

Issue 1285173002: dart2js cps: Rewrite more List operations into JS array operations. (Closed)

Created:
5 years, 4 months ago by asgerf
Modified:
5 years, 4 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: Rewrite more List operations into JS array operations. - add and removeLast become push and pop. - addAll with a literal list becomes push with multiple arguments. - Concecutive push calls are merged. - elementAt() recognized as a synonym for [] (on lists). BUG= R=karlklose@google.com Committed: https://github.com/dart-lang/sdk/commit/da68a812c2c4ebf9f5db11181c715f5adc10b52c

Patch Set 1 #

Patch Set 2 : Remove unused code and fix long line #

Total comments: 6

Patch Set 3 : Comments #

Patch Set 4 : receiverIsNotNull -> optional param #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+282 lines, -4 lines) Patch
M pkg/compiler/lib/src/cps_ir/builtin_operator.dart View 1 chunk +26 lines, -0 lines 0 comments Download
M pkg/compiler/lib/src/cps_ir/cps_fragment.dart View 1 chunk +10 lines, -0 lines 0 comments Download
M pkg/compiler/lib/src/cps_ir/cps_ir_nodes.dart View 1 2 3 3 chunks +33 lines, -0 lines 0 comments Download
M pkg/compiler/lib/src/cps_ir/cps_ir_nodes_sexpr.dart View 1 chunk +7 lines, -0 lines 0 comments Download
M pkg/compiler/lib/src/cps_ir/cps_ir_tracer.dart View 2 chunks +11 lines, -0 lines 0 comments Download
M pkg/compiler/lib/src/cps_ir/shrinking_reductions.dart View 1 chunk +5 lines, -0 lines 0 comments Download
M pkg/compiler/lib/src/cps_ir/type_propagation.dart View 1 2 7 chunks +101 lines, -2 lines 2 comments Download
M pkg/compiler/lib/src/js_backend/codegen/codegen.dart View 1 2 2 chunks +16 lines, -1 line 0 comments Download
M pkg/compiler/lib/src/tree_ir/optimization/pull_into_initializers.dart View 1 chunk +11 lines, -0 lines 0 comments Download
M pkg/compiler/lib/src/tree_ir/optimization/statement_rewriter.dart View 1 chunk +15 lines, -0 lines 0 comments Download
M pkg/compiler/lib/src/tree_ir/tree_ir_builder.dart View 1 2 3 1 chunk +7 lines, -0 lines 0 comments Download
M pkg/compiler/lib/src/tree_ir/tree_ir_nodes.dart View 1 2 3 5 chunks +33 lines, -0 lines 0 comments Download
M pkg/compiler/lib/src/tree_ir/tree_ir_tracer.dart View 2 chunks +7 lines, -1 line 0 comments Download

Messages

Total messages: 8 (2 generated)
asgerf
5 years, 4 months ago (2015-08-12 12:48:06 UTC) #2
karlklose
LGTM. https://codereview.chromium.org/1285173002/diff/20001/pkg/compiler/lib/src/cps_ir/type_propagation.dart File pkg/compiler/lib/src/cps_ir/type_propagation.dart (right): https://codereview.chromium.org/1285173002/diff/20001/pkg/compiler/lib/src/cps_ir/type_propagation.dart#newcode1731 pkg/compiler/lib/src/cps_ir/type_propagation.dart:1731: previous.arguments.addAll(node.arguments); Since you will be traversing them anyway, ...
5 years, 4 months ago (2015-08-12 13:00:46 UTC) #3
asgerf
https://codereview.chromium.org/1285173002/diff/20001/pkg/compiler/lib/src/cps_ir/type_propagation.dart File pkg/compiler/lib/src/cps_ir/type_propagation.dart (right): https://codereview.chromium.org/1285173002/diff/20001/pkg/compiler/lib/src/cps_ir/type_propagation.dart#newcode1731 pkg/compiler/lib/src/cps_ir/type_propagation.dart:1731: previous.arguments.addAll(node.arguments); On 2015/08/12 13:00:46, karlklose wrote: > Since you ...
5 years, 4 months ago (2015-08-12 13:29:39 UTC) #4
asgerf
Committed patchset #4 (id:60001) manually as da68a812c2c4ebf9f5db11181c715f5adc10b52c (presubmit successful).
5 years, 4 months ago (2015-08-12 14:34:11 UTC) #5
Kevin Millikin (Google)
https://codereview.chromium.org/1285173002/diff/60001/pkg/compiler/lib/src/cps_ir/type_propagation.dart File pkg/compiler/lib/src/cps_ir/type_propagation.dart (right): https://codereview.chromium.org/1285173002/diff/60001/pkg/compiler/lib/src/cps_ir/type_propagation.dart#newcode1732 pkg/compiler/lib/src/cps_ir/type_propagation.dart:1732: previous.arguments.add(ref); This doesn't look safe. I think it can ...
5 years, 4 months ago (2015-08-14 07:56:55 UTC) #7
asgerf
5 years, 4 months ago (2015-08-14 08:47:17 UTC) #8
Message was sent while issue was closed.
https://codereview.chromium.org/1285173002/diff/60001/pkg/compiler/lib/src/cp...
File pkg/compiler/lib/src/cps_ir/type_propagation.dart (right):

https://codereview.chromium.org/1285173002/diff/60001/pkg/compiler/lib/src/cp...
pkg/compiler/lib/src/cps_ir/type_propagation.dart:1732:
previous.arguments.add(ref);
On 2015/08/14 07:56:55, Kevin Millikin (Google) wrote:
> This doesn't look safe.  I think it can lift an argument outside the scope of
> the LetPrim that binds it.

Oof! You're right.

Powered by Google App Engine
This is Rietveld 408576698