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

Issue 1856953003: Test closed world model after deserialization. (Closed)

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

Description

Test closed world model after deserialization. We still need better tracking of native/foreign elements. R=sigmund@google.com Committed: https://github.com/dart-lang/sdk/commit/ee2fc29142835fa93dcd875ee948ccdb53ffe13e

Patch Set 1 #

Patch Set 2 : Remove handling of native instantiations #

Patch Set 3 : Improve test precision #

Total comments: 8

Patch Set 4 : Updated cf. comments. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+305 lines, -37 lines) Patch
M pkg/compiler/lib/src/common/resolution.dart View 1 2 3 1 chunk +3 lines, -1 line 0 comments Download
M pkg/compiler/lib/src/compiler.dart View 1 2 3 4 chunks +4 lines, -4 lines 0 comments Download
M pkg/compiler/lib/src/elements/common.dart View 2 chunks +8 lines, -0 lines 0 comments Download
M pkg/compiler/lib/src/elements/modelx.dart View 2 chunks +0 lines, -7 lines 0 comments Download
M pkg/compiler/lib/src/serialization/element_serialization.dart View 1 chunk +4 lines, -1 line 0 comments Download
M pkg/compiler/lib/src/serialization/equivalence.dart View 1 2 3 1 chunk +0 lines, -1 line 0 comments Download
M pkg/compiler/lib/src/serialization/keys.dart View 1 1 chunk +1 line, -0 lines 0 comments Download
M pkg/compiler/lib/src/serialization/modelz.dart View 5 chunks +8 lines, -6 lines 0 comments Download
M pkg/compiler/lib/src/universe/class_set.dart View 1 chunk +2 lines, -0 lines 0 comments Download
M tests/compiler/dart2js/serialization_analysis_test.dart View 1 chunk +4 lines, -0 lines 0 comments Download
M tests/compiler/dart2js/serialization_impact_test.dart View 1 2 3 3 chunks +14 lines, -7 lines 0 comments Download
A tests/compiler/dart2js/serialization_model_test.dart View 1 2 3 1 chunk +224 lines, -0 lines 0 comments Download
M tests/compiler/dart2js/serialization_test.dart View 1 2 3 2 chunks +33 lines, -10 lines 0 comments Download

Messages

Total messages: 7 (3 generated)
Johnni Winther
4 years, 8 months ago (2016-04-05 14:34:16 UTC) #3
Siggi Cherem (dart-lang)
lgtm https://codereview.chromium.org/1856953003/diff/40001/pkg/compiler/lib/src/common/resolution.dart File pkg/compiler/lib/src/common/resolution.dart (right): https://codereview.chromium.org/1856953003/diff/40001/pkg/compiler/lib/src/common/resolution.dart#newcode189 pkg/compiler/lib/src/common/resolution.dart:189: /// If set to `true` resolution caches will ...
4 years, 8 months ago (2016-04-05 15:19:30 UTC) #4
Johnni Winther
Committed patchset #4 (id:60001) manually as ee2fc29142835fa93dcd875ee948ccdb53ffe13e (presubmit successful).
4 years, 8 months ago (2016-04-06 09:30:27 UTC) #6
Johnni Winther
4 years, 8 months ago (2016-04-20 10:12:36 UTC) #7
Message was sent while issue was closed.
https://codereview.chromium.org/1856953003/diff/40001/pkg/compiler/lib/src/co...
File pkg/compiler/lib/src/common/resolution.dart (right):

https://codereview.chromium.org/1856953003/diff/40001/pkg/compiler/lib/src/co...
pkg/compiler/lib/src/common/resolution.dart:189: /// If set to `true` resolution
caches will not be cleared. Use the only for
On 2016/04/05 15:19:30, Siggi Cherem (dart-lang) wrote:
> the only => only

Done.

https://codereview.chromium.org/1856953003/diff/40001/pkg/compiler/lib/src/co...
pkg/compiler/lib/src/common/resolution.dart:191: bool retainCaches;
On 2016/04/05 15:19:30, Siggi Cherem (dart-lang) wrote:
> since Dart doesn't have annotations for testing, I often name these kind of
> variables with a testing name. For example: retainCachesForTesting.

Done.

https://codereview.chromium.org/1856953003/diff/40001/tests/compiler/dart2js/...
File tests/compiler/dart2js/serialization_model_test.dart (right):

https://codereview.chromium.org/1856953003/diff/40001/tests/compiler/dart2js/...
tests/compiler/dart2js/serialization_model_test.dart:173: for
(ClassHierarchyNode other in b.directSubclasses) {
On 2016/04/05 15:19:30, Siggi Cherem (dart-lang) wrote:
> what do we need to do to guarantee that directSubclasses are always
> serialized/deserialized in the same order? If we already do, let's change our
> tests to also verify that (if anything the logic here should get simpler).
> 
> (my motivation: having stability is going to be really important to get good
> caching behavior when we are working on top of build systems like make and
> bazel, it also makes it easier for users to inspect by hand what was the
effect
> from a small change in their program)

Adding a TODO. [ClassHierarchyNode.directSubclasses] must be deterministic
across serialization (for the instantiated classes at least)

https://codereview.chromium.org/1856953003/diff/40001/tests/compiler/dart2js/...
tests/compiler/dart2js/serialization_model_test.dart:201: for (var element2 in
remaining) {
On 2016/04/05 15:19:30, Siggi Cherem (dart-lang) wrote:
> (a) seems that there is a lot in common between this and the other equivalent
> tests you had from the other change? Can they be merged?
> 
> (b) I know this is just for tests, so this is low priority, but I wonder if we
> can avoid the quadratic cost here. Some ideas:
>  - convert each set to a list and sort it first, then compare by walking both
> lists in parallel
>  - map each element to a canonical object, create a map containing those
> mappings, use the mapped sets to compare (then operations like set.difference
> would work)

(a) Done.
(b) Added as a TODO.

Powered by Google App Engine
This is Rietveld 408576698