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

Issue 34523007: Move String interpolation constant folding from constant propagator to canonicalizer (Closed)

Created:
7 years, 2 months ago by srdjan
Modified:
7 years, 2 months ago
CC:
reviews_dartlang.org, vm-dev_dartlang.org
Visibility:
Public.

Description

Move Stringinterpolation constant folding from constant propagator to canonicalizer. StrinIterpolateInstr cannot directlly refer to interpolation arguments but only to the array that holds them, therefore constant propagation cannot be applied. R=fschneider@google.com Committed: https://code.google.com/p/dart/source/detail?r=29118

Patch Set 1 #

Total comments: 5

Patch Set 2 : #

Patch Set 3 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+95 lines, -81 lines) Patch
M runtime/vm/flow_graph_optimizer.cc View 1 2 chunks +0 lines, -81 lines 0 comments Download
M runtime/vm/intermediate_language.h View 1 1 chunk +2 lines, -0 lines 0 comments Download
M runtime/vm/intermediate_language.cc View 1 2 2 chunks +61 lines, -0 lines 0 comments Download
A tests/language/constant_string_interpolation_test.dart View 1 1 chunk +32 lines, -0 lines 0 comments Download

Messages

Total messages: 5 (0 generated)
srdjan
7 years, 2 months ago (2013-10-22 22:29:48 UTC) #1
Florian Schneider
LGTM. https://codereview.chromium.org/34523007/diff/1/runtime/vm/intermediate_language.cc File runtime/vm/intermediate_language.cc (right): https://codereview.chromium.org/34523007/diff/1/runtime/vm/intermediate_language.cc#newcode2748 runtime/vm/intermediate_language.cc:2748: return this; Please make sure that the case ...
7 years, 2 months ago (2013-10-23 17:32:38 UTC) #2
Emily Fortuna
DBC https://codereview.chromium.org/34523007/diff/1/tests/language/constant_string_interpolation.dart File tests/language/constant_string_interpolation.dart (right): https://codereview.chromium.org/34523007/diff/1/tests/language/constant_string_interpolation.dart#newcode1 tests/language/constant_string_interpolation.dart:1: // Copyright (c) 2013, the Dart project authors. ...
7 years, 2 months ago (2013-10-23 17:35:08 UTC) #3
srdjan
Committed patchset #3 manually as r29118 (presubmit successful).
7 years, 2 months ago (2013-10-23 20:37:25 UTC) #4
srdjan
7 years, 2 months ago (2013-10-23 20:39:01 UTC) #5
Message was sent while issue was closed.
https://codereview.chromium.org/34523007/diff/1/runtime/vm/intermediate_langu...
File runtime/vm/intermediate_language.cc (right):

https://codereview.chromium.org/34523007/diff/1/runtime/vm/intermediate_langu...
runtime/vm/intermediate_language.cc:2748: return this;
On 2013/10/23 17:32:39, Florian Schneider wrote:
> Please make sure that the case of an exception is also covered in the test.

Changed the code to allow only numbers, strings, boolean and null constants.
This is the same as done in the parser and guarantees that no exception is
thrown and that toString has no side effect.

https://codereview.chromium.org/34523007/diff/1/tests/language/constant_strin...
File tests/language/constant_string_interpolation.dart (right):

https://codereview.chromium.org/34523007/diff/1/tests/language/constant_strin...
tests/language/constant_string_interpolation.dart:1: // Copyright (c) 2013, the
Dart project authors.  Please see the AUTHORS file
On 2013/10/23 17:32:39, Florian Schneider wrote:
> Can you check if test.py runs this test? At some point I remember all tests
had
> to have _test suffix so that test.py runs it.

Thanks, renamed appropriately and checked that it is run.

Powered by Google App Engine
This is Rietveld 408576698