| 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 dart2js.ir_builder_task; | 5 library dart2js.ir_builder_task; |
| 6 | 6 |
| 7 import '../closure.dart' as closurelib; | 7 import '../closure.dart' as closurelib; |
| 8 import '../closure.dart' hide ClosureScope; | 8 import '../closure.dart' hide ClosureScope; |
| 9 import '../constants/expressions.dart'; | 9 import '../constants/expressions.dart'; |
| 10 import '../dart_types.dart'; | 10 import '../dart_types.dart'; |
| (...skipping 2039 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2050 | 2050 |
| 2051 /// Returns [true], if the analysis could not determine that the type | 2051 /// Returns [true], if the analysis could not determine that the type |
| 2052 /// arguments for the class [cls] are never used in the program. | 2052 /// arguments for the class [cls] are never used in the program. |
| 2053 bool requiresRuntimeTypesFor(ClassElement cls) { | 2053 bool requiresRuntimeTypesFor(ClassElement cls) { |
| 2054 return cls.typeVariables.isNotEmpty && _backend.classNeedsRti(cls); | 2054 return cls.typeVariables.isNotEmpty && _backend.classNeedsRti(cls); |
| 2055 } | 2055 } |
| 2056 | 2056 |
| 2057 FunctionElement get throwTypeErrorHelper => _backend.getThrowTypeError(); | 2057 FunctionElement get throwTypeErrorHelper => _backend.getThrowTypeError(); |
| 2058 | 2058 |
| 2059 ClassElement get nullClass => _compiler.nullClass; | 2059 ClassElement get nullClass => _compiler.nullClass; |
| 2060 |
| 2061 DartType unaliasType(DartType type) => type.unalias(_compiler); |
| 2060 } | 2062 } |
| 2061 | 2063 |
| 2062 /// IR builder specific to the JavaScript backend, coupled to the [JsIrBuilder]. | 2064 /// IR builder specific to the JavaScript backend, coupled to the [JsIrBuilder]. |
| 2063 class JsIrBuilderVisitor extends IrBuilderVisitor { | 2065 class JsIrBuilderVisitor extends IrBuilderVisitor { |
| 2064 /// Promote the type of [irBuilder] to [JsIrBuilder]. | 2066 /// Promote the type of [irBuilder] to [JsIrBuilder]. |
| 2065 JsIrBuilder get irBuilder => super.irBuilder; | 2067 JsIrBuilder get irBuilder => super.irBuilder; |
| 2066 | 2068 |
| 2067 JavaScriptBackend get backend => compiler.backend; | 2069 JavaScriptBackend get backend => compiler.backend; |
| 2068 | 2070 |
| 2069 /// Result of closure conversion for the current body of code. | 2071 /// Result of closure conversion for the current body of code. |
| (...skipping 790 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2860 } | 2862 } |
| 2861 | 2863 |
| 2862 processSetStatic(ir.SetStatic node) { | 2864 processSetStatic(ir.SetStatic node) { |
| 2863 node.body = replacementFor(node.body); | 2865 node.body = replacementFor(node.body); |
| 2864 } | 2866 } |
| 2865 | 2867 |
| 2866 processContinuation(ir.Continuation node) { | 2868 processContinuation(ir.Continuation node) { |
| 2867 node.body = replacementFor(node.body); | 2869 node.body = replacementFor(node.body); |
| 2868 } | 2870 } |
| 2869 } | 2871 } |
| OLD | NEW |