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

Issue 2443953002: Introduce isAbstractlyInstantiated to avoid exact masks of abstract classes. (Closed)

Created:
4 years, 1 month ago by Johnni Winther
Modified:
4 years, 1 month ago
CC:
reviews_dartlang.org
Target Ref:
refs/heads/master
Visibility:
Public.

Description

Introduce isAbstractlyInstantiated to avoid exact masks of abstract classes. Classes can be instantiated directly, abstractly or indirectly: When [cls] is directly instantiated: This means that at runtime instances of exactly [cls] are assumed to exist. When [cls] is abstractly instantiated: This means that at runtime instances of [cls] or unknown subclasses of [cls] are assumed to exist. This is used to mark native and/or reflectable classes as instantiated. For native classes we do not know the exact class that instantiates [cls] so [cls] here represents the root of the subclasses. For reflectable classes we need event abstract classes to be 'live' even though they cannot themselves be instantiated. When [cls] is indirectly instantiated: This means that a subclass of [cls] is directly or abstractly instantiated. R=sigmund@google.com Committed: https://github.com/dart-lang/sdk/commit/b0ecbef3cc976c5b60eafa807a1d9a626658f9b1

Patch Set 1 #

Patch Set 2 : Cleanup. #

Patch Set 3 : Cleanup #2 #

Total comments: 8

Patch Set 4 : Updated cf. comments. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+387 lines, -60 lines) Patch
M pkg/compiler/lib/src/inferrer/simple_types_inferrer.dart View 1 chunk +1 line, -3 lines 0 comments Download
M pkg/compiler/lib/src/types/union_type_mask.dart View 1 2 chunks +3 lines, -1 line 0 comments Download
M pkg/compiler/lib/src/universe/class_set.dart View 1 2 3 11 chunks +75 lines, -29 lines 0 comments Download
M pkg/compiler/lib/src/universe/world_builder.dart View 6 chunks +22 lines, -4 lines 0 comments Download
M pkg/compiler/lib/src/world.dart View 1 2 3 16 chunks +57 lines, -15 lines 0 comments Download
M tests/compiler/dart2js/class_set_test.dart View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M tests/compiler/dart2js/jsinterop/world_test.dart View 4 chunks +14 lines, -5 lines 0 comments Download
M tests/compiler/dart2js/world_test.dart View 1 2 3 5 chunks +214 lines, -2 lines 0 comments Download

Messages

Total messages: 7 (3 generated)
Johnni Winther
4 years, 1 month ago (2016-10-24 14:26:10 UTC) #3
Siggi Cherem (dart-lang)
lgtm https://codereview.chromium.org/2443953002/diff/40001/pkg/compiler/lib/src/universe/class_set.dart File pkg/compiler/lib/src/universe/class_set.dart (right): https://codereview.chromium.org/2443953002/diff/40001/pkg/compiler/lib/src/universe/class_set.dart#newcode123 pkg/compiler/lib/src/universe/class_set.dart:123: /// `true` if [cls] has been abstractly instantiated. ...
4 years, 1 month ago (2016-10-27 13:22:08 UTC) #4
Johnni Winther
Committed patchset #4 (id:50001) manually as b0ecbef3cc976c5b60eafa807a1d9a626658f9b1 (presubmit successful).
4 years, 1 month ago (2016-10-28 06:46:11 UTC) #6
Johnni Winther
4 years, 1 month ago (2016-11-01 11:26:35 UTC) #7
Message was sent while issue was closed.
https://codereview.chromium.org/2443953002/diff/40001/pkg/compiler/lib/src/un...
File pkg/compiler/lib/src/universe/class_set.dart (right):

https://codereview.chromium.org/2443953002/diff/40001/pkg/compiler/lib/src/un...
pkg/compiler/lib/src/universe/class_set.dart:123: /// `true` if [cls] has been
abstractly instantiated.
On 2016/10/27 13:22:07, Siggi Cherem (dart-lang) wrote:
> it would be good to add here the definition of "abstractly instantiated" too,
or
> add a reference to World.isAbstractlyInstantiated(cls)

Done.

https://codereview.chromium.org/2443953002/diff/40001/pkg/compiler/lib/src/un...
pkg/compiler/lib/src/universe/class_set.dart:124: ///
On 2016/10/27 13:22:07, Siggi Cherem (dart-lang) wrote:
> nit: delete line

Done.

https://codereview.chromium.org/2443953002/diff/40001/pkg/compiler/lib/src/un...
pkg/compiler/lib/src/universe/class_set.dart:137: bool get isRootInstantiated =>
On 2016/10/27 13:22:07, Siggi Cherem (dart-lang) wrote:
> I'm trying to think of other names for this - root-instantiated makes me think
> of indirectly-instantiated too. Tough concept to name :)
> 
> An idea: "explicitlyInstantiated"?

isExplicitlyInstantiated it is!

https://codereview.chromium.org/2443953002/diff/40001/pkg/compiler/lib/src/un...
pkg/compiler/lib/src/universe/class_set.dart:480: if
(subtypeNode.isDirectlyInstantiated ||
On 2016/10/27 13:22:07, Siggi Cherem (dart-lang) wrote:
> can we use isRootInstantiated here too?

Done.

Powered by Google App Engine
This is Rietveld 408576698