OLD | NEW |
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 '../compiler.dart' show | 7 import '../compiler.dart' show |
8 Compiler; | 8 Compiler; |
9 import '../constants/constant_constructors.dart'; | 9 import '../constants/constant_constructors.dart'; |
10 import '../constants/constructors.dart'; | 10 import '../constants/constructors.dart'; |
(...skipping 2345 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2356 | 2356 |
2357 bool get isObject { | 2357 bool get isObject { |
2358 assert(invariant(this, isResolved, | 2358 assert(invariant(this, isResolved, |
2359 message: "isObject has not been computed for $this.")); | 2359 message: "isObject has not been computed for $this.")); |
2360 return supertype == null; | 2360 return supertype == null; |
2361 } | 2361 } |
2362 | 2362 |
2363 void ensureResolved(Compiler compiler) { | 2363 void ensureResolved(Compiler compiler) { |
2364 if (resolutionState == STATE_NOT_STARTED) { | 2364 if (resolutionState == STATE_NOT_STARTED) { |
2365 compiler.resolver.resolveClass(this); | 2365 compiler.resolver.resolveClass(this); |
| 2366 compiler.world.registerClass(this); |
2366 } | 2367 } |
2367 } | 2368 } |
2368 | 2369 |
2369 void setDefaultConstructor(FunctionElement constructor, Compiler compiler); | 2370 void setDefaultConstructor(FunctionElement constructor, Compiler compiler); |
2370 | 2371 |
2371 void addBackendMember(Element member) { | 2372 void addBackendMember(Element member) { |
2372 // TODO(ngeoffray): Deprecate this method. | 2373 // TODO(ngeoffray): Deprecate this method. |
2373 assert(member.isGenerativeConstructorBody); | 2374 assert(member.isGenerativeConstructorBody); |
2374 backendMembers = backendMembers.prepend(member); | 2375 backendMembers = backendMembers.prepend(member); |
2375 } | 2376 } |
(...skipping 538 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2914 AstElement get definingElement; | 2915 AstElement get definingElement; |
2915 | 2916 |
2916 bool get hasResolvedAst => definingElement.hasTreeElements; | 2917 bool get hasResolvedAst => definingElement.hasTreeElements; |
2917 | 2918 |
2918 ResolvedAst get resolvedAst { | 2919 ResolvedAst get resolvedAst { |
2919 return new ResolvedAst(declaration, | 2920 return new ResolvedAst(declaration, |
2920 definingElement.node, definingElement.treeElements); | 2921 definingElement.node, definingElement.treeElements); |
2921 } | 2922 } |
2922 | 2923 |
2923 } | 2924 } |
OLD | NEW |