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

Side by Side Diff: pkg/compiler/lib/src/elements/modelx.dart

Issue 1856953003: Test closed world model after deserialization. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Updated cf. comments. Created 4 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 unified diff | Download patch
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 '../common.dart'; 7 import '../common.dart';
8 import '../common/resolution.dart' show 8 import '../common/resolution.dart' show
9 Resolution, 9 Resolution,
10 Parsing; 10 Parsing;
11 import '../compiler.dart' show 11 import '../compiler.dart' show
12 Compiler; 12 Compiler;
13 import '../constants/constant_constructors.dart'; 13 import '../constants/constant_constructors.dart';
14 import '../constants/constructors.dart'; 14 import '../constants/constructors.dart';
15 import '../constants/expressions.dart'; 15 import '../constants/expressions.dart';
16 import '../core_types.dart' show
17 CoreClasses;
18 import '../dart_types.dart'; 16 import '../dart_types.dart';
19 import '../diagnostics/messages.dart' show 17 import '../diagnostics/messages.dart' show
20 MessageTemplate; 18 MessageTemplate;
21 import '../ordered_typeset.dart' show 19 import '../ordered_typeset.dart' show
22 OrderedTypeSet; 20 OrderedTypeSet;
23 import '../resolution/class_members.dart' show 21 import '../resolution/class_members.dart' show
24 ClassMemberMixin; 22 ClassMemberMixin;
25 import '../resolution/scope.dart' show 23 import '../resolution/scope.dart' show
26 ClassScope, 24 ClassScope,
27 LibraryScope, 25 LibraryScope,
(...skipping 2666 matching lines...) Expand 10 before | Expand all | Expand 10 after
2694 ClassElement get superclass { 2692 ClassElement get superclass {
2695 assert(invariant(this, supertypeLoadState == STATE_DONE, 2693 assert(invariant(this, supertypeLoadState == STATE_DONE,
2696 message: "Superclass has not been computed for $this.")); 2694 message: "Superclass has not been computed for $this."));
2697 return supertype == null ? null : supertype.element; 2695 return supertype == null ? null : supertype.element;
2698 } 2696 }
2699 2697
2700 void forEachBackendMember(void f(Element member)) { 2698 void forEachBackendMember(void f(Element member)) {
2701 backendMembers.forEach(f); 2699 backendMembers.forEach(f);
2702 } 2700 }
2703 2701
2704 bool implementsFunction(CoreClasses coreClasses) {
2705 return asInstanceOf(coreClasses.functionClass) != null ||
2706 callType != null;
2707 }
2708
2709 // TODO(johnniwinther): Remove these when issue 18630 is fixed. 2702 // TODO(johnniwinther): Remove these when issue 18630 is fixed.
2710 ClassElement get patch => super.patch; 2703 ClassElement get patch => super.patch;
2711 ClassElement get origin => super.origin; 2704 ClassElement get origin => super.origin;
2712 2705
2713 // A class declaration is defined by the declaration element. 2706 // A class declaration is defined by the declaration element.
2714 AstElement get definingElement => declaration; 2707 AstElement get definingElement => declaration;
2715 } 2708 }
2716 2709
2717 abstract class ClassElementX extends BaseClassElementX { 2710 abstract class ClassElementX extends BaseClassElementX {
2718 Link<Element> localMembersReversed = const Link<Element>(); 2711 Link<Element> localMembersReversed = const Link<Element>();
(...skipping 477 matching lines...) Expand 10 before | Expand all | Expand 10 after
3196 AstElement get definingElement; 3189 AstElement get definingElement;
3197 3190
3198 bool get hasResolvedAst => definingElement.hasTreeElements; 3191 bool get hasResolvedAst => definingElement.hasTreeElements;
3199 3192
3200 ResolvedAst get resolvedAst { 3193 ResolvedAst get resolvedAst {
3201 return new ResolvedAst(declaration, 3194 return new ResolvedAst(declaration,
3202 definingElement.node, definingElement.treeElements); 3195 definingElement.node, definingElement.treeElements);
3203 } 3196 }
3204 3197
3205 } 3198 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/elements/common.dart ('k') | pkg/compiler/lib/src/serialization/element_serialization.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698