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

Side by Side Diff: sdk/lib/_internal/compiler/implementation/elements/modelx.dart

Issue 185053005: Revert "Constrain type annotations with deferred types." (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library elements.modelx; 5 library elements.modelx;
6 6
7 import 'elements.dart'; 7 import 'elements.dart';
8 import '../tree/tree.dart'; 8 import '../tree/tree.dart';
9 import '../util/util.dart'; 9 import '../util/util.dart';
10 import '../resolution/resolution.dart'; 10 import '../resolution/resolution.dart';
(...skipping 998 matching lines...) Expand 10 before | Expand all | Expand 10 after
1009 } 1009 }
1010 1010
1011 accept(ElementVisitor visitor) => visitor.visitLibraryElement(this); 1011 accept(ElementVisitor visitor) => visitor.visitLibraryElement(this);
1012 } 1012 }
1013 1013
1014 class PrefixElementX extends ElementX implements PrefixElement { 1014 class PrefixElementX extends ElementX implements PrefixElement {
1015 Token firstPosition; 1015 Token firstPosition;
1016 1016
1017 final ImportScope importScope = new ImportScope(); 1017 final ImportScope importScope = new ImportScope();
1018 1018
1019 bool isDeferred = false;
1020
1021 PrefixElementX(String prefix, Element enclosing, this.firstPosition) 1019 PrefixElementX(String prefix, Element enclosing, this.firstPosition)
1022 : super(prefix, ElementKind.PREFIX, enclosing); 1020 : super(prefix, ElementKind.PREFIX, enclosing);
1023 1021
1024 Element lookupLocalMember(String memberName) => importScope[memberName]; 1022 Element lookupLocalMember(String memberName) => importScope[memberName];
1025 1023
1026 DartType computeType(Compiler compiler) => compiler.types.dynamicType; 1024 DartType computeType(Compiler compiler) => compiler.types.dynamicType;
1027 1025
1028 Token position() => firstPosition; 1026 Token position() => firstPosition;
1029 1027
1030 void addImport(Element element, Import import, DiagnosticListener listener) { 1028 void addImport(Element element, Import import, DiagnosticListener listener) {
1031 importScope.addImport(this, element, import, listener); 1029 importScope.addImport(this, element, import, listener);
1032 } 1030 }
1033 1031
1034 accept(ElementVisitor visitor) => visitor.visitPrefixElement(this); 1032 accept(ElementVisitor visitor) => visitor.visitPrefixElement(this);
1035
1036 void markAsDeferred() {
1037 isDeferred = true;
1038 }
1039 } 1033 }
1040 1034
1041 class TypedefElementX extends ElementX implements TypedefElement { 1035 class TypedefElementX extends ElementX implements TypedefElement {
1042 Typedef cachedNode; 1036 Typedef cachedNode;
1043 1037
1044 /** 1038 /**
1045 * The type of this typedef in which the type arguments are the type 1039 * The type of this typedef in which the type arguments are the type
1046 * variables. 1040 * variables.
1047 * 1041 *
1048 * This resembles the [ClassElement.thisType] though a typedef has no notion 1042 * This resembles the [ClassElement.thisType] though a typedef has no notion
(...skipping 1497 matching lines...) Expand 10 before | Expand all | Expand 10 after
2546 final Metadata metadata; 2540 final Metadata metadata;
2547 2541
2548 ParameterMetadataAnnotation(Metadata this.metadata); 2542 ParameterMetadataAnnotation(Metadata this.metadata);
2549 2543
2550 Node parseNode(DiagnosticListener listener) => metadata.expression; 2544 Node parseNode(DiagnosticListener listener) => metadata.expression;
2551 2545
2552 Token get beginToken => metadata.getBeginToken(); 2546 Token get beginToken => metadata.getBeginToken();
2553 2547
2554 Token get endToken => metadata.getEndToken(); 2548 Token get endToken => metadata.getEndToken();
2555 } 2549 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698