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 operator[](Node node); | 8 Element operator[](Node node); |
9 Selector getSelector(Send send); | 9 Selector getSelector(Send send); |
10 DartType getType(Node node); | 10 DartType getType(Node node); |
(...skipping 2590 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2601 new FunctionExpression(new Identifier(element.position()), | 2601 new FunctionExpression(new Identifier(element.position()), |
2602 new NodeList.empty(), | 2602 new NodeList.empty(), |
2603 new Block(new NodeList.empty()), | 2603 new Block(new NodeList.empty()), |
2604 null, Modifiers.EMPTY, null, null); | 2604 null, Modifiers.EMPTY, null, null); |
2605 } | 2605 } |
2606 | 2606 |
2607 isBlackListed(DartType type) { | 2607 isBlackListed(DartType type) { |
2608 LibraryElement lib = element.getLibrary(); | 2608 LibraryElement lib = element.getLibrary(); |
2609 return | 2609 return |
2610 !identical(lib, compiler.coreLibrary) && | 2610 !identical(lib, compiler.coreLibrary) && |
2611 !identical(lib, compiler.coreImplLibrary) && | |
2612 !identical(lib, compiler.jsHelperLibrary) && | 2611 !identical(lib, compiler.jsHelperLibrary) && |
2613 (identical(type.element, compiler.dynamicClass) || | 2612 (identical(type.element, compiler.dynamicClass) || |
2614 identical(type.element, compiler.boolClass) || | 2613 identical(type.element, compiler.boolClass) || |
2615 identical(type.element, compiler.numClass) || | 2614 identical(type.element, compiler.numClass) || |
2616 identical(type.element, compiler.intClass) || | 2615 identical(type.element, compiler.intClass) || |
2617 identical(type.element, compiler.doubleClass) || | 2616 identical(type.element, compiler.doubleClass) || |
2618 identical(type.element, compiler.stringClass) || | 2617 identical(type.element, compiler.stringClass) || |
2619 identical(type.element, compiler.nullClass) || | 2618 identical(type.element, compiler.nullClass) || |
2620 identical(type.element, compiler.functionClass)); | 2619 identical(type.element, compiler.functionClass)); |
2621 } | 2620 } |
(...skipping 448 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3070 return e; | 3069 return e; |
3071 } | 3070 } |
3072 | 3071 |
3073 /// Assumed to be called by [resolveRedirectingFactory]. | 3072 /// Assumed to be called by [resolveRedirectingFactory]. |
3074 Element visitReturn(Return node) { | 3073 Element visitReturn(Return node) { |
3075 Node expression = node.expression; | 3074 Node expression = node.expression; |
3076 return finishConstructorReference(visit(expression), | 3075 return finishConstructorReference(visit(expression), |
3077 expression, expression); | 3076 expression, expression); |
3078 } | 3077 } |
3079 } | 3078 } |
OLD | NEW |