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

Unified Diff: dart/frog/leg/elements/elements.dart

Issue 9646030: Find diagnostic locations for use in new compiler API. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: rebased Created 8 years, 9 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 | « dart/frog/leg/compiler.dart ('k') | dart/frog/leg/frog_leg.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dart/frog/leg/elements/elements.dart
diff --git a/dart/frog/leg/elements/elements.dart b/dart/frog/leg/elements/elements.dart
index c434eabe707b38f038bcfe72aa82245fb6fee360..de957054af0e4f5f73c7e2aaa303058345463aa4 100644
--- a/dart/frog/leg/elements/elements.dart
+++ b/dart/frog/leg/elements/elements.dart
@@ -598,24 +598,7 @@ class SynthesizedConstructorElement extends FunctionElement {
: super(enclosing.name, ElementKind.GENERATIVE_CONSTRUCTOR,
null, enclosing);
- FunctionType computeType(Compiler compiler) {
- if (type != null) return type;
- Type returnType = compiler.types.voidType;
- type = new FunctionType(returnType, const EmptyLink<Type>(), this);
- return type;
- }
-
- Node parseNode(DiagnosticListener listener) {
- if (cachedNode != null) return cachedNode;
- cachedNode = new FunctionExpression(
- new Identifier(enclosingElement.position()),
- new NodeList.empty(),
- new Block(new NodeList.empty()),
- null, null, null, null);
- return cachedNode;
- }
-
- Token position() => null;
+ Token position() => enclosing.position();
}
class ClassElement extends ContainerElement {
@@ -631,7 +614,6 @@ class ClassElement extends ContainerElement {
// backendMembers are members that have been added by the backend to simplify
// compilation. They don't have any user-side counter-part.
Link<Element> backendMembers = const EmptyLink<Element>();
- SynthesizedConstructorElement synthesizedConstructor;
Link<Type> allSupertypes;
@@ -702,18 +684,6 @@ class ClassElement extends ContainerElement {
return result;
}
- bool canHaveDefaultConstructor() => constructors.length == 0;
-
- SynthesizedConstructorElement getSynthesizedConstructor() {
- // TODO(ahe): Get rid of this method. Add the
- // SynthesizedConstructorElement to [constructors] if empty when
- // [resolve] is called.
- if (synthesizedConstructor === null && canHaveDefaultConstructor()) {
- synthesizedConstructor = new SynthesizedConstructorElement(this);
- }
- return synthesizedConstructor;
- }
-
/**
* Returns the super class, if any.
*
« no previous file with comments | « dart/frog/leg/compiler.dart ('k') | dart/frog/leg/frog_leg.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698