| 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 dart_backend; | 5 part of dart_backend; |
| 6 | 6 |
| 7 // TODO(ahe): This class is simply wrong. This backend should use | 7 // TODO(ahe): This class is simply wrong. This backend should use |
| 8 // elements when it can, not AST nodes. Perhaps a [Map<Element, | 8 // elements when it can, not AST nodes. Perhaps a [Map<Element, |
| 9 // TreeElements>] is what is needed. | 9 // TreeElements>] is what is needed. |
| 10 class ElementAst { | 10 class ElementAst { |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 | 42 |
| 43 DartResolutionCallbacks resolutionCallbacks; | 43 DartResolutionCallbacks resolutionCallbacks; |
| 44 | 44 |
| 45 final Set<ClassElement> usedTypeLiterals = new Set<ClassElement>(); | 45 final Set<ClassElement> usedTypeLiterals = new Set<ClassElement>(); |
| 46 | 46 |
| 47 /// The set of visible platform classes that are implemented by instantiated | 47 /// The set of visible platform classes that are implemented by instantiated |
| 48 /// user classes. | 48 /// user classes. |
| 49 final Set<ClassElement> _userImplementedPlatformClasses = | 49 final Set<ClassElement> _userImplementedPlatformClasses = |
| 50 new Set<ClassElement>(); | 50 new Set<ClassElement>(); |
| 51 | 51 |
| 52 bool get canHandleCompilationFailed => false; |
| 53 |
| 52 /** | 54 /** |
| 53 * Tells whether it is safe to remove type declarations from variables, | 55 * Tells whether it is safe to remove type declarations from variables, |
| 54 * functions parameters. It becomes not safe if: | 56 * functions parameters. It becomes not safe if: |
| 55 * 1) TypeError is used somewhere in the code, | 57 * 1) TypeError is used somewhere in the code, |
| 56 * 2) The code has typedefs in right hand side of IS checks, | 58 * 2) The code has typedefs in right hand side of IS checks, |
| 57 * 3) The code has classes which extend typedefs, have type arguments typedefs | 59 * 3) The code has classes which extend typedefs, have type arguments typedefs |
| 58 * or type variable bounds typedefs. | 60 * or type variable bounds typedefs. |
| 59 * These restrictions can be less strict. | 61 * These restrictions can be less strict. |
| 60 */ | 62 */ |
| 61 bool isSafeToRemoveTypeDeclarations( | 63 bool isSafeToRemoveTypeDeclarations( |
| (...skipping 480 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 542 } | 544 } |
| 543 | 545 |
| 544 void traceGraph(String title, var irObject) { | 546 void traceGraph(String title, var irObject) { |
| 545 compiler.tracer.traceGraph(title, irObject); | 547 compiler.tracer.traceGraph(title, irObject); |
| 546 } | 548 } |
| 547 | 549 |
| 548 DartTypes get dartTypes => compiler.types; | 550 DartTypes get dartTypes => compiler.types; |
| 549 | 551 |
| 550 InternalErrorFunction get internalError => compiler.internalError; | 552 InternalErrorFunction get internalError => compiler.internalError; |
| 551 } | 553 } |
| OLD | NEW |