| 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 closure; | 7 import '../closure.dart' as closure; |
| 8 import '../common.dart'; | 8 import '../common.dart'; |
| 9 import '../common/names.dart' show | 9 import '../common/names.dart' show |
| 10 Names, | 10 Names, |
| (...skipping 3792 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3803 | 3803 |
| 3804 DartType unaliasType(DartType type) => type.unaliased; | 3804 DartType unaliasType(DartType type) => type.unaliased; |
| 3805 | 3805 |
| 3806 TypeMask getTypeMaskForForeign(NativeBehavior behavior) { | 3806 TypeMask getTypeMaskForForeign(NativeBehavior behavior) { |
| 3807 if (behavior == null) { | 3807 if (behavior == null) { |
| 3808 return _backend.dynamicType; | 3808 return _backend.dynamicType; |
| 3809 } | 3809 } |
| 3810 return TypeMaskFactory.fromNativeBehavior(behavior, _compiler); | 3810 return TypeMaskFactory.fromNativeBehavior(behavior, _compiler); |
| 3811 } | 3811 } |
| 3812 | 3812 |
| 3813 bool isArrayType(TypeMask type) { |
| 3814 return type.satisfies(_backend.helpers.jsArrayClass, _compiler.world); |
| 3815 } |
| 3816 |
| 3813 TypeMask getTypeMaskForNativeFunction(FunctionElement function) { | 3817 TypeMask getTypeMaskForNativeFunction(FunctionElement function) { |
| 3814 return _compiler.typesTask.getGuaranteedReturnTypeOfElement(function); | 3818 return _compiler.typesTask.getGuaranteedReturnTypeOfElement(function); |
| 3815 } | 3819 } |
| 3816 | 3820 |
| 3817 FieldElement locateSingleField(Selector selector, TypeMask type) { | 3821 FieldElement locateSingleField(Selector selector, TypeMask type) { |
| 3818 return _compiler.world.locateSingleField(selector, type); | 3822 return _compiler.world.locateSingleField(selector, type); |
| 3819 } | 3823 } |
| 3820 | 3824 |
| 3821 Element get closureConverter { | 3825 Element get closureConverter { |
| 3822 return _backend.helpers.closureConverter; | 3826 return _backend.helpers.closureConverter; |
| 3823 } | 3827 } |
| 3824 | 3828 |
| 3825 void addNativeMethod(FunctionElement function) { | 3829 void addNativeMethod(FunctionElement function) { |
| 3826 _backend.emitter.nativeEmitter.nativeMethods.add(function); | 3830 _backend.emitter.nativeEmitter.nativeMethods.add(function); |
| 3827 } | 3831 } |
| 3828 } | 3832 } |
| OLD | NEW |