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

Side by Side Diff: tests/compiler/dart2js/related_types.dart

Issue 2363773005: Move closed world reasoning methods from ClassWorld to ClosedWorld. (Closed)
Patch Set: Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library related_types; 5 library related_types;
6 6
7 import 'package:compiler/src/commandline_options.dart'; 7 import 'package:compiler/src/commandline_options.dart';
8 import 'package:compiler/src/compiler.dart'; 8 import 'package:compiler/src/compiler.dart';
9 import 'package:compiler/src/core_types.dart'; 9 import 'package:compiler/src/core_types.dart';
10 import 'package:compiler/src/dart_types.dart'; 10 import 'package:compiler/src/dart_types.dart';
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 } 70 }
71 71
72 class RelatedTypesChecker extends TraversalVisitor<DartType, dynamic> { 72 class RelatedTypesChecker extends TraversalVisitor<DartType, dynamic> {
73 final Compiler compiler; 73 final Compiler compiler;
74 final ResolvedAst resolvedAst; 74 final ResolvedAst resolvedAst;
75 75
76 RelatedTypesChecker(this.compiler, ResolvedAst resolvedAst) 76 RelatedTypesChecker(this.compiler, ResolvedAst resolvedAst)
77 : this.resolvedAst = resolvedAst, 77 : this.resolvedAst = resolvedAst,
78 super(resolvedAst.elements); 78 super(resolvedAst.elements);
79 79
80 ClassWorld get world => compiler.closedWorld; 80 ClosedWorld get world => compiler.closedWorld;
81 81
82 CoreClasses get coreClasses => compiler.coreClasses; 82 CoreClasses get coreClasses => compiler.coreClasses;
83 83
84 CoreTypes get coreTypes => compiler.coreTypes; 84 CoreTypes get coreTypes => compiler.coreTypes;
85 85
86 DiagnosticReporter get reporter => compiler.reporter; 86 DiagnosticReporter get reporter => compiler.reporter;
87 87
88 InterfaceType get thisType => resolvedAst.element.enclosingClass.thisType; 88 InterfaceType get thisType => resolvedAst.element.enclosingClass.thisType;
89 89
90 /// Returns `true` if there exists no common subtype of [left] and [right]. 90 /// Returns `true` if there exists no common subtype of [left] and [right].
(...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after
411 ClassElement findClass(DartType type) => type.accept(this, null); 411 ClassElement findClass(DartType type) => type.accept(this, null);
412 412
413 @override 413 @override
414 ClassElement visitType(DartType type, _) => null; 414 ClassElement visitType(DartType type, _) => null;
415 415
416 @override 416 @override
417 ClassElement visitInterfaceType(InterfaceType type, _) { 417 ClassElement visitInterfaceType(InterfaceType type, _) {
418 return type.element; 418 return type.element;
419 } 419 }
420 } 420 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698