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

Issue 1195573003: dart2js cps: Refactor and optimize string concatenations. (Closed)

Created:
5 years, 6 months ago by asgerf
Modified:
5 years, 6 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 and optimize string concatenations. The ConcatenateStrings IR node has been removed. It was a leftover from dart2dart. Expressions inside string interpolations are now stringified explicitly and we concatenate strings with a pure StringConcat operator. ConstantExpressions have also been removed from the IR. They were also an artifact from dart2dart and were complicating the optimizer. BUG= R=kmillikin@google.com Committed: https://github.com/dart-lang/sdk/commit/ac75893964144d5712d1da8417c27c232750ec37 Reverted: https://github.com/dart-lang/sdk/commit/988b65336b3194cd539781195a9b8be24b3bbdc3 Committed: https://github.com/dart-lang/sdk/commit/04c5c61a1033e5e050d353da5d295d246d26ffcb

Patch Set 1 #

Patch Set 2 : Remove renegade linebreak #

Total comments: 28

Patch Set 3 : Use for-in #

Patch Set 4 : Fix tests and constant folding of strings #

Patch Set 5 : Revert doc comment change #

Unified diffs Side-by-side diffs Delta from patch set Stats (+284 lines, -365 lines) Patch
M pkg/compiler/lib/src/constants/expressions.dart View 1 chunk +0 lines, -9 lines 0 comments Download
M pkg/compiler/lib/src/cps_ir/builtin_operator.dart View 1 2 4 1 chunk +7 lines, -0 lines 0 comments Download
M pkg/compiler/lib/src/cps_ir/cps_ir_builder.dart View 1 2 3 6 chunks +26 lines, -36 lines 0 comments Download
M pkg/compiler/lib/src/cps_ir/cps_ir_builder_task.dart View 1 2 3 12 chunks +54 lines, -47 lines 0 comments Download
M pkg/compiler/lib/src/cps_ir/cps_ir_nodes.dart View 1 2 3 4 chunks +1 line, -22 lines 0 comments Download
M pkg/compiler/lib/src/cps_ir/cps_ir_nodes_sexpr.dart View 1 2 3 1 chunk +0 lines, -6 lines 0 comments Download
M pkg/compiler/lib/src/cps_ir/cps_ir_tracer.dart View 1 2 3 2 chunks +0 lines, -11 lines 0 comments Download
M pkg/compiler/lib/src/cps_ir/shrinking_reductions.dart View 1 2 3 1 chunk +0 lines, -5 lines 0 comments Download
M pkg/compiler/lib/src/cps_ir/type_propagation.dart View 1 2 3 14 chunks +182 lines, -142 lines 0 comments Download
M pkg/compiler/lib/src/js_backend/codegen/codegen.dart View 1 2 3 2 chunks +3 lines, -25 lines 0 comments Download
M pkg/compiler/lib/src/js_backend/codegen/glue.dart View 1 2 3 1 chunk +0 lines, -4 lines 0 comments Download
M pkg/compiler/lib/src/js_backend/codegen/unsugar.dart View 1 chunk +3 lines, -9 lines 0 comments Download
M pkg/compiler/lib/src/tree_ir/optimization/statement_rewriter.dart View 1 2 3 1 chunk +0 lines, -5 lines 0 comments Download
M pkg/compiler/lib/src/tree_ir/tree_ir_builder.dart View 1 2 3 2 chunks +1 line, -7 lines 0 comments Download
M pkg/compiler/lib/src/tree_ir/tree_ir_nodes.dart View 1 2 3 5 chunks +2 lines, -28 lines 0 comments Download
M pkg/compiler/lib/src/tree_ir/tree_ir_tracer.dart View 1 2 3 1 chunk +0 lines, -5 lines 0 comments Download
M tests/compiler/dart2js/js_backend_cps_ir_basic_test.dart View 1 2 3 1 chunk +3 lines, -3 lines 0 comments Download
M tests/compiler/dart2js_extra/dart2js_extra.status View 1 2 3 2 chunks +1 line, -1 line 0 comments Download
M tests/html/html.status View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 11 (1 generated)
asgerf
5 years, 6 months ago (2015-06-18 14:57:55 UTC) #2
karlklose
https://codereview.chromium.org/1195573003/diff/20001/pkg/compiler/lib/src/cps_ir/builtin_operator.dart File pkg/compiler/lib/src/cps_ir/builtin_operator.dart (right): https://codereview.chromium.org/1195573003/diff/20001/pkg/compiler/lib/src/cps_ir/builtin_operator.dart#newcode45 pkg/compiler/lib/src/cps_ir/builtin_operator.dart:45: StringConcat, I would prefer not to abbreviate the enum ...
5 years, 6 months ago (2015-06-19 08:33:45 UTC) #3
asgerf
https://codereview.chromium.org/1195573003/diff/20001/pkg/compiler/lib/src/cps_ir/builtin_operator.dart File pkg/compiler/lib/src/cps_ir/builtin_operator.dart (right): https://codereview.chromium.org/1195573003/diff/20001/pkg/compiler/lib/src/cps_ir/builtin_operator.dart#newcode45 pkg/compiler/lib/src/cps_ir/builtin_operator.dart:45: StringConcat, On 2015/06/19 08:33:44, karlklose wrote: > I would ...
5 years, 6 months ago (2015-06-19 11:04:34 UTC) #4
Kevin Millikin (Google)
It looks fine to me. I'm very happy to be rid of the distinction between ...
5 years, 6 months ago (2015-06-19 11:36:13 UTC) #5
asgerf
https://codereview.chromium.org/1195573003/diff/20001/pkg/compiler/lib/src/cps_ir/cps_ir_builder_task.dart File pkg/compiler/lib/src/cps_ir/cps_ir_builder_task.dart (right): https://codereview.chromium.org/1195573003/diff/20001/pkg/compiler/lib/src/cps_ir/cps_ir_builder_task.dart#newcode1482 pkg/compiler/lib/src/cps_ir/cps_ir_builder_task.dart:1482: Iterator<ast.Node> it = node.parts.iterator; On 2015/06/19 11:36:13, Kevin Millikin ...
5 years, 6 months ago (2015-06-19 12:00:52 UTC) #6
Kevin Millikin (Google)
LGTM.
5 years, 6 months ago (2015-06-22 15:39:35 UTC) #7
asgerf
Committed patchset #3 (id:40001) manually as ac75893964144d5712d1da8417c27c232750ec37 (presubmit successful).
5 years, 6 months ago (2015-06-22 16:08:51 UTC) #8
asgerf
PTAL at type_propagation.dart. I botched up my offline tests and a couple of bugs went ...
5 years, 6 months ago (2015-06-23 11:05:03 UTC) #9
Kevin Millikin (Google)
LGTM.
5 years, 6 months ago (2015-06-23 11:15:53 UTC) #10
asgerf
5 years, 6 months ago (2015-06-23 11:18:05 UTC) #11
Message was sent while issue was closed.
Committed patchset #5 (id:80001) manually as
04c5c61a1033e5e050d353da5d295d246d26ffcb (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698