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

Unified Diff: site/try/poi/scope_information_visitor.dart

Issue 1056133008: Fix other tests in 'try' after elementvisitor changes (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 8 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 | « site/try/poi/poi.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: site/try/poi/scope_information_visitor.dart
diff --git a/site/try/poi/scope_information_visitor.dart b/site/try/poi/scope_information_visitor.dart
index 9db89694521ffac8b9f1b85d7d88a4c6915daef8..fa4572de70b39c58d121f620fca77bf224435ae2 100644
--- a/site/try/poi/scope_information_visitor.dart
+++ b/site/try/poi/scope_information_visitor.dart
@@ -11,7 +11,7 @@ import 'package:compiler/src/elements/modelx.dart' show
FieldElementX;
import 'package:compiler/src/elements/visitor.dart' show
- ElementVisitor;
+ BaseElementVisitor;
import 'package:compiler/src/dart2jslib.dart' show
Compiler;
@@ -34,7 +34,7 @@ import 'package:compiler/src/dart_types.dart' show
* calling the [serialize] method on each element. Some elements need special
* treatment, as their enclosing scope must also be serialized.
*/
-class ScopeInformationVisitor extends ElementVisitor/* <void> */ {
+class ScopeInformationVisitor extends BaseElementVisitor/* <void> */ {
// TODO(ahe): Include function parameters and local variables.
final Compiler compiler;
@@ -54,11 +54,11 @@ class ScopeInformationVisitor extends ElementVisitor/* <void> */ {
StringBuffer get indented => buffer..write(indentation);
- void visitElement(Element e) {
+ void visitElement(Element e, _) {
serialize(e, omitEnclosing: false);
}
- void visitLibraryElement(LibraryElement e) {
+ void visitLibraryElement(LibraryElement e, _) {
bool isFirst = true;
forEach(Element member) {
if (!isFirst) {
@@ -103,7 +103,7 @@ class ScopeInformationVisitor extends ElementVisitor/* <void> */ {
});
}
- void visitClassElement(ClassElement e) {
+ void visitClassElement(ClassElement e, _) {
currentClass = e;
serializeClassSide(e, isStatic: true);
}
@@ -168,7 +168,7 @@ class ScopeInformationVisitor extends ElementVisitor/* <void> */ {
});
}
- void visitScopeContainerElement(ScopeContainerElement e) {
+ void visitScopeContainerElement(ScopeContainerElement e, _) {
bool isFirst = true;
serialize(e, omitEnclosing: false, serializeMembers: () {
localMembersSorted(e).forEach((Element member) {
@@ -183,11 +183,11 @@ class ScopeInformationVisitor extends ElementVisitor/* <void> */ {
});
}
- void visitCompilationUnitElement(CompilationUnitElement e) {
- e.enclosingElement.accept(this);
+ void visitCompilationUnitElement(CompilationUnitElement e, _) {
+ e.enclosingElement.accept(this, _);
}
- void visitAbstractFieldElement(AbstractFieldElement e) {
+ void visitAbstractFieldElement(AbstractFieldElement e, _) {
throw new UnsupportedError('AbstractFieldElement cannot be serialized.');
}
@@ -273,7 +273,7 @@ class ScopeInformationVisitor extends ElementVisitor/* <void> */ {
if (serializeEnclosing != null) {
serializeEnclosing();
} else {
- element.enclosingElement.accept(this);
+ element.enclosingElement.accept(this, null);
}
}
indentationLevel--;
« no previous file with comments | « site/try/poi/poi.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698