OLD | NEW |
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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 part of resolution; | 5 part of resolution; |
6 | 6 |
7 abstract class TreeElements { | 7 abstract class TreeElements { |
8 Element get currentElement; | 8 Element get currentElement; |
9 Set<Node> get superUses; | 9 Set<Node> get superUses; |
10 | 10 |
(...skipping 3931 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3942 return | 3942 return |
3943 !identical(lib, compiler.coreLibrary) && | 3943 !identical(lib, compiler.coreLibrary) && |
3944 !identical(lib, compiler.jsHelperLibrary) && | 3944 !identical(lib, compiler.jsHelperLibrary) && |
3945 !identical(lib, compiler.interceptorsLibrary) && | 3945 !identical(lib, compiler.interceptorsLibrary) && |
3946 (identical(type, compiler.types.dynamicType) || | 3946 (identical(type, compiler.types.dynamicType) || |
3947 identical(type.element, compiler.boolClass) || | 3947 identical(type.element, compiler.boolClass) || |
3948 identical(type.element, compiler.numClass) || | 3948 identical(type.element, compiler.numClass) || |
3949 identical(type.element, compiler.intClass) || | 3949 identical(type.element, compiler.intClass) || |
3950 identical(type.element, compiler.doubleClass) || | 3950 identical(type.element, compiler.doubleClass) || |
3951 identical(type.element, compiler.stringClass) || | 3951 identical(type.element, compiler.stringClass) || |
3952 identical(type.element, compiler.nullClass) || | 3952 identical(type.element, compiler.nullClass)); |
3953 identical(type.element, compiler.functionClass)); | |
3954 } | 3953 } |
3955 } | 3954 } |
3956 | 3955 |
3957 class ClassSupertypeResolver extends CommonResolverVisitor { | 3956 class ClassSupertypeResolver extends CommonResolverVisitor { |
3958 Scope context; | 3957 Scope context; |
3959 ClassElement classElement; | 3958 ClassElement classElement; |
3960 | 3959 |
3961 ClassSupertypeResolver(Compiler compiler, ClassElement cls) | 3960 ClassSupertypeResolver(Compiler compiler, ClassElement cls) |
3962 : context = Scope.buildEnclosingScope(cls), | 3961 : context = Scope.buildEnclosingScope(cls), |
3963 this.classElement = cls, | 3962 this.classElement = cls, |
(...skipping 556 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4520 return finishConstructorReference(visit(expression), | 4519 return finishConstructorReference(visit(expression), |
4521 expression, expression); | 4520 expression, expression); |
4522 } | 4521 } |
4523 } | 4522 } |
4524 | 4523 |
4525 /// Looks up [name] in [scope] and unwraps the result. | 4524 /// Looks up [name] in [scope] and unwraps the result. |
4526 Element lookupInScope(Compiler compiler, Node node, | 4525 Element lookupInScope(Compiler compiler, Node node, |
4527 Scope scope, SourceString name) { | 4526 Scope scope, SourceString name) { |
4528 return Elements.unwrap(scope.lookup(name), compiler, node); | 4527 return Elements.unwrap(scope.lookup(name), compiler, node); |
4529 } | 4528 } |
OLD | NEW |