mirror of
https://github.com/dart-lang/sdk
synced 2024-09-05 08:24:39 +00:00
[dart2js] Add methods to closed world for call graph generation.
Change-Id: I22240a93e785eea0505d3594fbc41306890e24ba Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/260241 Reviewed-by: Mayank Patke <fishythefish@google.com> Commit-Queue: Nate Biggs <natebiggs@google.com>
This commit is contained in:
parent
e96a0f6c98
commit
a263aeee33
|
@ -475,6 +475,9 @@ class JsClosedWorld implements JClosedWorld {
|
|||
return includesClosureCallInDomain(selector, receiver, abstractValueDomain);
|
||||
}
|
||||
|
||||
@override
|
||||
Selector getSelector(ir.Expression node) => elementMap.getSelector(node);
|
||||
|
||||
@override
|
||||
AbstractValue computeReceiverType(Selector selector, AbstractValue receiver) {
|
||||
_ensureFunctionSet();
|
||||
|
|
|
@ -82,6 +82,7 @@ abstract class JClosedWorld implements interfaces.JClosedWorld {
|
|||
@override
|
||||
AnnotationsData get annotationsData;
|
||||
|
||||
@override
|
||||
ClosureData get closureDataLookup;
|
||||
|
||||
OutputUnitData get outputUnitData;
|
||||
|
|
|
@ -2,6 +2,8 @@
|
|||
// for details. All rights reserved. Use of this source code is governed by a
|
||||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
import 'closure.dart';
|
||||
import 'package:kernel/ast.dart' as ir;
|
||||
import 'common/elements.dart';
|
||||
import 'elements/entities.dart';
|
||||
import 'elements/types.dart';
|
||||
|
@ -29,6 +31,8 @@ abstract class JClosedWorld implements World {
|
|||
|
||||
AnnotationsData get annotationsData;
|
||||
|
||||
ClosureData get closureDataLookup;
|
||||
|
||||
Iterable<MemberEntity> get liveInstanceMembers;
|
||||
|
||||
bool isUsedAsMixin(ClassEntity cls);
|
||||
|
@ -39,6 +43,8 @@ abstract class JClosedWorld implements World {
|
|||
Selector selector, AbstractValue? receiver);
|
||||
|
||||
bool fieldNeverChanges(MemberEntity element);
|
||||
|
||||
Selector getSelector(ir.Expression node);
|
||||
}
|
||||
|
||||
// TODO(48820): Move back to `world.dart` when migrated.
|
||||
|
|
Loading…
Reference in a new issue