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

Issue 1994613004: Handle use of constant constructors with default values. (Closed)

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

Description

Handle use of constant constructors with default values. R=sigmund@google.com Committed: https://github.com/dart-lang/sdk/commit/b3f8cd31a0192517ac73def58bed87f132dccdef

Patch Set 1 #

Total comments: 4

Patch Set 2 : Updated cf. comment #

Unified diffs Side-by-side diffs Delta from patch set Stats (+111 lines, -22 lines) Patch
M pkg/compiler/lib/src/closure.dart View 2 chunks +6 lines, -0 lines 0 comments Download
M pkg/compiler/lib/src/compile_time_constants.dart View 1 5 chunks +12 lines, -5 lines 0 comments Download
M pkg/compiler/lib/src/elements/elements.dart View 1 2 chunks +6 lines, -0 lines 0 comments Download
M pkg/compiler/lib/src/elements/modelx.dart View 1 3 chunks +9 lines, -0 lines 0 comments Download
M pkg/compiler/lib/src/resolution/resolution.dart View 1 1 chunk +8 lines, -5 lines 0 comments Download
M pkg/compiler/lib/src/serialization/modelz.dart View 1 6 chunks +16 lines, -1 line 0 comments Download
M tests/compiler/dart2js/serialization/analysis_test.dart View 1 1 chunk +14 lines, -8 lines 0 comments Download
M tests/compiler/dart2js/serialization/compilation_test.dart View 1 1 chunk +1 line, -1 line 0 comments Download
M tests/compiler/dart2js/serialization/equivalence_test.dart View 1 1 chunk +5 lines, -0 lines 0 comments Download
M tests/compiler/dart2js/serialization/helper.dart View 1 4 chunks +12 lines, -2 lines 0 comments Download
M tests/compiler/dart2js/serialization/test_data.dart View 1 1 chunk +22 lines, -0 lines 0 comments Download

Messages

Total messages: 8 (2 generated)
Johnni Winther
4 years, 7 months ago (2016-05-19 12:42:41 UTC) #2
Siggi Cherem (dart-lang)
question below, otherwise lgtm https://codereview.chromium.org/1994613004/diff/1/pkg/compiler/lib/src/compile_time_constants.dart File pkg/compiler/lib/src/compile_time_constants.dart (right): https://codereview.chromium.org/1994613004/diff/1/pkg/compiler/lib/src/compile_time_constants.dart#newcode192 pkg/compiler/lib/src/compile_time_constants.dart:192: evaluate(element.constant); could this add more ...
4 years, 7 months ago (2016-05-19 16:46:45 UTC) #3
Johnni Winther
Committed patchset #2 (id:20001) manually as b3f8cd31a0192517ac73def58bed87f132dccdef (presubmit successful).
4 years, 7 months ago (2016-05-20 09:40:41 UTC) #5
Johnni Winther
https://codereview.chromium.org/1994613004/diff/1/pkg/compiler/lib/src/compile_time_constants.dart File pkg/compiler/lib/src/compile_time_constants.dart (right): https://codereview.chromium.org/1994613004/diff/1/pkg/compiler/lib/src/compile_time_constants.dart#newcode192 pkg/compiler/lib/src/compile_time_constants.dart:192: evaluate(element.constant); On 2016/05/19 16:46:45, Siggi Cherem (dart-lang) wrote: > ...
4 years, 7 months ago (2016-05-20 11:02:13 UTC) #6
Siggi Cherem (dart-lang)
https://codereview.chromium.org/1994613004/diff/1/pkg/compiler/lib/src/compile_time_constants.dart File pkg/compiler/lib/src/compile_time_constants.dart (right): https://codereview.chromium.org/1994613004/diff/1/pkg/compiler/lib/src/compile_time_constants.dart#newcode192 pkg/compiler/lib/src/compile_time_constants.dart:192: evaluate(element.constant); On 2016/05/20 11:02:13, Johnni Winther wrote: > On ...
4 years, 7 months ago (2016-05-20 21:08:02 UTC) #7
Johnni Winther
4 years, 7 months ago (2016-05-23 07:54:41 UTC) #8
Message was sent while issue was closed.
https://codereview.chromium.org/1994613004/diff/1/pkg/compiler/lib/src/compil...
File pkg/compiler/lib/src/compile_time_constants.dart (right):

https://codereview.chromium.org/1994613004/diff/1/pkg/compiler/lib/src/compil...
pkg/compiler/lib/src/compile_time_constants.dart:192:
evaluate(element.constant);
On 2016/05/20 21:08:02, Siggi Cherem (dart-lang) wrote:
> On 2016/05/20 11:02:13, Johnni Winther wrote:
> > On 2016/05/19 16:46:45, Siggi Cherem (dart-lang) wrote:
> > > could this add more evaluations than what we had in the past? (I mean, can
> > this
> > > do something similar to the issue we discovered with deferred libraries a
> > couple
> > > weeks ago?)
> > 
> > I'll put it behind a test for deserialization.
> 
> Not sure I follow why it is needed then. I would expect that we should have no
> semantic difference depending on where the element comes from.
> 
> Or are we guaranteed that evaluation already happened here for non-serialized
> constants? Can we assert that the expression has already been evaluated in
that
> case?

Yes. Will add an assertion.
 
> Overall, I'd like to get to a point that, other than the loader, nothing else
in
> the compiler needs to know whether an element or constant came from sources or
> deserialization.

Me too. I just want to tackle this issue on its own.

Powered by Google App Engine
This is Rietveld 408576698