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

Unified Diff: pkg/compiler/lib/src/resolution/registry.dart

Issue 2123073003: remove dependency on compiler from resolution (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: respond to comments Created 4 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/compiler/lib/src/resolution/members.dart ('k') | pkg/compiler/lib/src/resolution/resolution.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/resolution/registry.dart
diff --git a/pkg/compiler/lib/src/resolution/registry.dart b/pkg/compiler/lib/src/resolution/registry.dart
index e52b185806e9a9ab8026a9025ab75af452da5ba4..753d9a75c1c048a115b95c37cc956f9fde2d7436 100644
--- a/pkg/compiler/lib/src/resolution/registry.dart
+++ b/pkg/compiler/lib/src/resolution/registry.dart
@@ -8,7 +8,7 @@ import '../common.dart';
import '../common/backend_api.dart'
show Backend, ForeignResolver, NativeRegistry;
import '../common/resolution.dart'
- show Feature, ListLiteralUse, MapLiteralUse, ResolutionImpact;
+ show Feature, ListLiteralUse, MapLiteralUse, ResolutionImpact, Target;
import '../common/registry.dart' show Registry;
import '../compiler.dart' show Compiler;
import '../constants/expressions.dart';
@@ -160,20 +160,17 @@ class _ResolutionWorldImpact extends ResolutionImpact
/// [Backend], [World] and [Enqueuer].
// TODO(johnniwinther): Split this into an interface and implementation class.
class ResolutionRegistry extends Registry {
- final Compiler compiler;
+ final Target target;
final TreeElementMapping mapping;
final _ResolutionWorldImpact worldImpact;
- ResolutionRegistry(Compiler compiler, TreeElementMapping mapping)
- : this.compiler = compiler,
- this.mapping = mapping,
+ ResolutionRegistry(this.target, TreeElementMapping mapping)
+ : this.mapping = mapping,
this.worldImpact =
new _ResolutionWorldImpact(mapping.analyzedElement.toString());
bool get isForResolution => true;
- Backend get backend => compiler.backend;
-
String toString() => 'ResolutionRegistry for ${mapping.analyzedElement}';
//////////////////////////////////////////////////////////////////////////////
@@ -364,7 +361,7 @@ class ResolutionRegistry extends Registry {
void registerForeignCall(Node node, Element element,
CallStructure callStructure, ResolverVisitor visitor) {
- var nativeData = backend.resolveForeignCall(node, element, callStructure,
+ var nativeData = target.resolveForeignCall(node, element, callStructure,
new ForeignResolutionResolver(visitor, this));
if (nativeData != null) {
// Split impact from resolution result.
@@ -390,7 +387,7 @@ class ResolutionRegistry extends Registry {
}
ClassElement defaultSuperclass(ClassElement element) {
- return backend.defaultSuperclass(element);
+ return target.defaultSuperclass(element);
}
void registerInstantiation(InterfaceType type) {
« no previous file with comments | « pkg/compiler/lib/src/resolution/members.dart ('k') | pkg/compiler/lib/src/resolution/resolution.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698