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

Unified Diff: tests/compiler/dart2js/mock_compiler.dart

Issue 10837095: Refactor scope handling. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 4 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 | « lib/compiler/implementation/resolver.dart ('k') | tests/compiler/dart2js/resolver_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/compiler/dart2js/mock_compiler.dart
diff --git a/tests/compiler/dart2js/mock_compiler.dart b/tests/compiler/dart2js/mock_compiler.dart
index e1379387f7cab1210f845aa121724f9ada3f9a4a..8694ef6b7ec80141f3c4964de7b108c03bd480fc 100644
--- a/tests/compiler/dart2js/mock_compiler.dart
+++ b/tests/compiler/dart2js/mock_compiler.dart
@@ -124,11 +124,11 @@ class MockCompiler extends Compiler {
TreeElementMapping resolveNodeStatement(Node tree, Element element) {
ResolverVisitor visitor = new ResolverVisitor(this, element);
- if (visitor.context is TopScope) {
- visitor.context = new BlockScope(visitor.context);
+ if (visitor.scope is TopScope) {
+ visitor.scope = new BlockScope(visitor.scope);
}
visitor.visit(tree);
- visitor.context = new TopScope(element.getLibrary());
+ visitor.scope = new TopScope(element.getLibrary());
// Resolve the type annotations encountered in the code.
while (!resolver.toResolve.isEmpty()) {
resolver.toResolve.removeFirst().ensureResolved(this);
@@ -140,7 +140,7 @@ class MockCompiler extends Compiler {
Element mockElement =
new Element(buildSourceString(''), ElementKind.FUNCTION, mainApp);
ResolverVisitor visitor = new ResolverVisitor(this, mockElement);
- visitor.context = new BlockScope(visitor.context);
+ visitor.scope = new BlockScope(visitor.scope);
return visitor;
}
« no previous file with comments | « lib/compiler/implementation/resolver.dart ('k') | tests/compiler/dart2js/resolver_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698