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

Issue 2781443003: Fix #28120, strong mode allows field overrides (Closed)

Created:
3 years, 8 months ago by Jennifer Messerly
Modified:
3 years, 8 months ago
Reviewers:
Leaf, vsm
CC:
dev-compiler+reviews_dartlang.org, Bill Hesse
Target Ref:
refs/heads/master
Visibility:
Public.

Description

Fix #28120, strong mode allows field overrides Fix #28119, DDC supports field overrides without @virtual Fix #28801, devirtualize private fields in DDC where possible Fix #28589, stop supporting @virtual in strong mode R=leafp@google.com, vsm@google.com Committed: https://github.com/dart-lang/sdk/commit/1c504f89452d52f902a8c3591bde0f172452de21

Patch Set 1 #

Patch Set 2 : add doc comments #

Total comments: 10

Patch Set 3 : fix extensible class check #

Patch Set 4 : refactor #

Total comments: 3

Patch Set 5 : fix #

Unified diffs Side-by-side diffs Delta from patch set Stats (+394 lines, -197 lines) Patch
M pkg/analyzer/lib/src/dart/element/element.dart View 1 2 3 4 3 chunks +1 line, -26 lines 0 comments Download
M pkg/analyzer/test/generated/compile_time_error_code_test.dart View 1 2 3 4 3 chunks +6 lines, -12 lines 0 comments Download
M pkg/analyzer/test/src/context/context_test.dart View 1 2 3 4 1 chunk +1 line, -2 lines 0 comments Download
M pkg/analyzer/test/src/task/strong/checker_test.dart View 1 2 3 4 11 chunks +32 lines, -32 lines 0 comments Download
M pkg/analyzer/test/src/task/strong/inferred_type_test.dart View 1 2 3 4 3 chunks +3 lines, -3 lines 0 comments Download
D pkg/dev_compiler/lib/src/compiler/class_property_model.dart View 1 2 3 4 1 chunk +0 lines, -95 lines 0 comments Download
M pkg/dev_compiler/lib/src/compiler/code_generator.dart View 1 2 3 4 12 chunks +14 lines, -12 lines 0 comments Download
M pkg/dev_compiler/lib/src/compiler/element_helpers.dart View 1 2 3 4 2 chunks +19 lines, -1 line 0 comments Download
M pkg/dev_compiler/lib/src/compiler/nullable_type_inference.dart View 1 2 3 4 3 chunks +5 lines, -1 line 0 comments Download
A pkg/dev_compiler/lib/src/compiler/property_model.dart View 1 2 3 4 1 chunk +238 lines, -0 lines 0 comments Download
M pkg/dev_compiler/test/browser/language_tests.js View 1 2 3 4 3 chunks +2 lines, -1 line 0 comments Download
M pkg/dev_compiler/test/codegen_expected/BenchmarkBase.js View 1 2 3 4 2 chunks +8 lines, -1 line 0 comments Download
M pkg/dev_compiler/test/codegen_expected/closure.js View 1 2 3 4 2 chunks +32 lines, -4 lines 0 comments Download
M pkg/dev_compiler/test/codegen_expected/sunflower/sunflower.js View 1 2 3 4 3 chunks +32 lines, -4 lines 0 comments Download
M pkg/dev_compiler/test/codegen_expected/sunflower/sunflower.js.map View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M pkg/dev_compiler/test/not_yet_strong_tests.dart View 1 2 3 4 2 chunks +0 lines, -2 lines 0 comments Download

Messages

Total messages: 19 (4 generated)
Jennifer Messerly
Leaf: could you review strong mode (and DDC if desired?) Vijay: could you review DDC ...
3 years, 8 months ago (2017-03-27 21:59:52 UTC) #4
Jennifer Messerly
https://codereview.chromium.org/2781443003/diff/20001/pkg/dev_compiler/lib/src/compiler/property_model.dart File pkg/dev_compiler/lib/src/compiler/property_model.dart (right): https://codereview.chromium.org/2781443003/diff/20001/pkg/dev_compiler/lib/src/compiler/property_model.dart#newcode75 pkg/dev_compiler/lib/src/compiler/property_model.dart:75: if (type.isPublic && type.library == library) { this should ...
3 years, 8 months ago (2017-03-27 22:05:58 UTC) #5
vsm
nice! https://codereview.chromium.org/2781443003/diff/20001/pkg/dev_compiler/lib/src/compiler/element_helpers.dart File pkg/dev_compiler/lib/src/compiler/element_helpers.dart (right): https://codereview.chromium.org/2781443003/diff/20001/pkg/dev_compiler/lib/src/compiler/element_helpers.dart#newcode153 pkg/dev_compiler/lib/src/compiler/element_helpers.dart:153: for (var mixinType in cls.mixins.reversed) { I think ...
3 years, 8 months ago (2017-03-27 22:31:27 UTC) #6
Jennifer Messerly
https://codereview.chromium.org/2781443003/diff/20001/pkg/dev_compiler/lib/src/compiler/element_helpers.dart File pkg/dev_compiler/lib/src/compiler/element_helpers.dart (right): https://codereview.chromium.org/2781443003/diff/20001/pkg/dev_compiler/lib/src/compiler/element_helpers.dart#newcode153 pkg/dev_compiler/lib/src/compiler/element_helpers.dart:153: for (var mixinType in cls.mixins.reversed) { On 2017/03/27 22:31:27, ...
3 years, 8 months ago (2017-03-27 23:16:28 UTC) #7
Leaf
analyzer changes lgtm https://codereview.chromium.org/2781443003/diff/20001/pkg/dev_compiler/lib/src/compiler/property_model.dart File pkg/dev_compiler/lib/src/compiler/property_model.dart (right): https://codereview.chromium.org/2781443003/diff/20001/pkg/dev_compiler/lib/src/compiler/property_model.dart#newcode19 pkg/dev_compiler/lib/src/compiler/property_model.dart:19: /// if those fields should be ...
3 years, 8 months ago (2017-03-27 23:26:19 UTC) #8
Jennifer Messerly
PTAL Vijay! Same logic but I think it makes more sense now? Also should be ...
3 years, 8 months ago (2017-03-28 04:36:16 UTC) #9
Jennifer Messerly
On 2017/03/28 04:36:16, Jennifer Messerly wrote: > PTAL Vijay! Same logic but I think it ...
3 years, 8 months ago (2017-03-28 04:39:47 UTC) #10
vsm
https://codereview.chromium.org/2781443003/diff/40001/pkg/dev_compiler/lib/src/compiler/property_model.dart File pkg/dev_compiler/lib/src/compiler/property_model.dart (right): https://codereview.chromium.org/2781443003/diff/40001/pkg/dev_compiler/lib/src/compiler/property_model.dart#newcode117 pkg/dev_compiler/lib/src/compiler/property_model.dart:117: if (cls.library != library) return; I don't think this ...
3 years, 8 months ago (2017-03-28 13:28:33 UTC) #11
Jennifer Messerly
https://codereview.chromium.org/2781443003/diff/40001/pkg/dev_compiler/lib/src/compiler/property_model.dart File pkg/dev_compiler/lib/src/compiler/property_model.dart (right): https://codereview.chromium.org/2781443003/diff/40001/pkg/dev_compiler/lib/src/compiler/property_model.dart#newcode117 pkg/dev_compiler/lib/src/compiler/property_model.dart:117: if (cls.library != library) return; On 2017/03/28 13:28:32, vsm ...
3 years, 8 months ago (2017-03-28 16:48:23 UTC) #12
vsm
https://codereview.chromium.org/2781443003/diff/40001/pkg/dev_compiler/lib/src/compiler/property_model.dart File pkg/dev_compiler/lib/src/compiler/property_model.dart (right): https://codereview.chromium.org/2781443003/diff/40001/pkg/dev_compiler/lib/src/compiler/property_model.dart#newcode117 pkg/dev_compiler/lib/src/compiler/property_model.dart:117: if (cls.library != library) return; On 2017/03/28 16:48:22, Jennifer ...
3 years, 8 months ago (2017-03-28 17:12:33 UTC) #13
Jennifer Messerly
Vijay: I uploaded that (very tiny) change if you would like to take another look.
3 years, 8 months ago (2017-03-28 17:12:39 UTC) #14
vsm
lgtm (though see my other comment on using build unit)
3 years, 8 months ago (2017-03-28 17:15:40 UTC) #15
Jennifer Messerly
On 2017/03/28 17:15:40, vsm wrote: > lgtm (though see my other comment on using build ...
3 years, 8 months ago (2017-03-28 17:21:42 UTC) #16
Jennifer Messerly
Committed patchset #5 (id:50001) manually as 1c504f89452d52f902a8c3591bde0f172452de21 (presubmit successful).
3 years, 8 months ago (2017-03-28 17:26:49 UTC) #18
vsm
3 years, 8 months ago (2017-03-28 17:30:00 UTC) #19
Message was sent while issue was closed.
On 2017/03/28 17:21:42, Jennifer Messerly wrote:
> On 2017/03/28 17:15:40, vsm wrote:
> > lgtm (though see my other comment on using build unit)
> 
> yeah, I don't really wanna flow that in here because it's not something we use
> for Dart analysis anywhere else to my knowledge & it doesn't store the info in
> such a way that would permit fast lookups anyway.
> 
> if it ever becomes a problem we could do:
> 
>     var libraryCycle = type.library.libraryCycle.toSet();
> 
> that would enable fast bailout of things not in the cycle checks.

Oh, yeah - forgot that was being computed.  That would be cleaner (and usually a
lot smaller) than the build unit.  :-)

Powered by Google App Engine
This is Rietveld 408576698