Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit 8467186

Browse files
johnniwinthercommit-bot@chromium.org
authored andcommitted
[kernel] Initial migration of package kernel wave 1
This CL completes the migration of the first wave of interdependent libraries in package:kernel, including ast.dart. In order to ensure non-nullability on AST properties, the Transformer has been split in 2 variants: Transformer which doesn't support removal of nodes and RemovingTransformer which supports removal where allowed by the context using 'removal sentinels'. Start reviewing Transformer and RemovingTransformer in visitors.dart since many of the changes are caused by the changes here. Included in the migration are the mixin_deduplication.dart and unreachable_code_elimination.dart since these needed porting to the RemovingTransformer which was aided by opting in the libraries which only depended on ast.dart. TEST=existing Change-Id: I9e63b985bd24896c25edd4ee51e37770187bcc17 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/184786 Commit-Queue: Johnni Winther <[email protected]> Reviewed-by: Jens Johansen <[email protected]>
1 parent 07ddd00 commit 8467186

40 files changed

+5216
-1938
lines changed

pkg/compiler/lib/src/ir/constants.dart

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,11 +203,21 @@ class ConstantReference extends ir.TreeNode {
203203
throw new UnsupportedError("ConstantReference.accept");
204204
}
205205

206+
@override
207+
R accept1<R, A>(ir.TreeVisitor1<R, A> v, A arg) {
208+
throw new UnsupportedError("ConstantReference.accept");
209+
}
210+
206211
@override
207212
transformChildren(ir.Transformer v) {
208213
throw new UnsupportedError("ConstantReference.transformChildren");
209214
}
210215

216+
@override
217+
transformOrRemoveChildren(ir.RemovingTransformer v) {
218+
throw new UnsupportedError("ConstantReference.transformOrRemoveChildren");
219+
}
220+
211221
@override
212222
int get hashCode => 13 * constant.hashCode;
213223

0 commit comments

Comments
 (0)