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

Unified Diff: pkg/compiler/lib/src/resolution/variables.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/typedefs.dart ('k') | pkg/compiler/lib/src/source_file_provider.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/resolution/variables.dart
diff --git a/pkg/compiler/lib/src/resolution/variables.dart b/pkg/compiler/lib/src/resolution/variables.dart
index c5609a8398c3ff8d449c91a4cf8c436c7c904786..28d53720878c9fe44329fb97866fefeab8f6031c 100644
--- a/pkg/compiler/lib/src/resolution/variables.dart
+++ b/pkg/compiler/lib/src/resolution/variables.dart
@@ -5,7 +5,7 @@
library dart2js.resolution.variables;
import '../common.dart';
-import '../compiler.dart' show Compiler;
+import '../common/resolution.dart';
import '../elements/modelx.dart' show LocalVariableElementX, VariableList;
import '../tree/tree.dart';
import '../universe/use.dart' show TypeUse;
@@ -22,8 +22,8 @@ class VariableDefinitionsVisitor extends CommonResolverVisitor<Identifier> {
VariableList variables;
VariableDefinitionsVisitor(
- Compiler compiler, this.definitions, this.resolver, this.variables)
- : super(compiler) {}
+ Resolution resolution, this.definitions, this.resolver, this.variables)
+ : super(resolution);
ResolutionRegistry get registry => resolver.registry;
@@ -45,7 +45,7 @@ class VariableDefinitionsVisitor extends CommonResolverVisitor<Identifier> {
// The variable is initialized to null.
// TODO(johnniwinther): Register a feature instead.
registry.registerTypeUse(
- new TypeUse.instantiation(compiler.coreTypes.nullType));
+ new TypeUse.instantiation(resolution.coreTypes.nullType));
if (definitions.modifiers.isConst) {
if (resolver.inLoopVariable) {
reporter.reportErrorMessage(node, MessageKind.CONST_LOOP_VARIABLE);
@@ -68,9 +68,9 @@ class VariableDefinitionsVisitor extends CommonResolverVisitor<Identifier> {
resolver.defineLocalVariable(link.head, element);
resolver.addToScope(element);
if (definitions.modifiers.isConst) {
- compiler.enqueuer.resolution.addDeferredAction(element, () {
+ addDeferredAction(element, () {
element.constant =
- compiler.resolver.constantCompiler.compileConstant(element);
+ resolution.resolver.constantCompiler.compileConstant(element);
});
}
}
« no previous file with comments | « pkg/compiler/lib/src/resolution/typedefs.dart ('k') | pkg/compiler/lib/src/source_file_provider.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698