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

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

Issue 2314703002: Split World usage into open, inference, and closed world. (Closed)
Patch Set: Updated cf. comments Created 4 years, 2 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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 } 69 }
70 70
71 class RelatedTypesChecker extends TraversalVisitor<DartType, dynamic> { 71 class RelatedTypesChecker extends TraversalVisitor<DartType, dynamic> {
72 final Compiler compiler; 72 final Compiler compiler;
73 final ResolvedAst resolvedAst; 73 final ResolvedAst resolvedAst;
74 74
75 RelatedTypesChecker(this.compiler, ResolvedAst resolvedAst) 75 RelatedTypesChecker(this.compiler, ResolvedAst resolvedAst)
76 : this.resolvedAst = resolvedAst, 76 : this.resolvedAst = resolvedAst,
77 super(resolvedAst.elements); 77 super(resolvedAst.elements);
78 78
79 ClassWorld get world => compiler.world; 79 ClassWorld get world => compiler.closedWorld;
80 80
81 CoreClasses get coreClasses => compiler.coreClasses; 81 CoreClasses get coreClasses => compiler.coreClasses;
82 82
83 CoreTypes get coreTypes => compiler.coreTypes; 83 CoreTypes get coreTypes => compiler.coreTypes;
84 84
85 DiagnosticReporter get reporter => compiler.reporter; 85 DiagnosticReporter get reporter => compiler.reporter;
86 86
87 InterfaceType get thisType => resolvedAst.element.enclosingClass.thisType; 87 InterfaceType get thisType => resolvedAst.element.enclosingClass.thisType;
88 88
89 /// Returns `true` if there exists no common subtype of [left] and [right]. 89 /// Returns `true` if there exists no common subtype of [left] and [right].
(...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after
429 ClassElement findClass(DartType type) => type.accept(this, null); 429 ClassElement findClass(DartType type) => type.accept(this, null);
430 430
431 @override 431 @override
432 ClassElement visitType(DartType type, _) => null; 432 ClassElement visitType(DartType type, _) => null;
433 433
434 @override 434 @override
435 ClassElement visitInterfaceType(InterfaceType type, _) { 435 ClassElement visitInterfaceType(InterfaceType type, _) {
436 return type.element; 436 return type.element;
437 } 437 }
438 } 438 }
OLDNEW
« no previous file with comments | « tests/compiler/dart2js/patch_test.dart ('k') | tests/compiler/dart2js/serialization/model_test_helper.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698