| 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 library js_backend.backend; | 5 library js_backend.backend; |
| 6 | 6 |
| 7 import 'dart:async' show Future; | 7 import 'dart:async' show Future; |
| 8 | 8 |
| 9 import 'package:js_runtime/shared/embedded_names.dart' as embeddedNames; | 9 import 'package:js_runtime/shared/embedded_names.dart' as embeddedNames; |
| 10 | 10 |
| (...skipping 942 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 953 reporter.reportErrorMessage( | 953 reporter.reportErrorMessage( |
| 954 node, MessageKind.WRONG_ARGUMENT_FOR_JS_INTERCEPTOR_CONSTANT); | 954 node, MessageKind.WRONG_ARGUMENT_FOR_JS_INTERCEPTOR_CONSTANT); |
| 955 } | 955 } |
| 956 // No native behavior for this call. | 956 // No native behavior for this call. |
| 957 return null; | 957 return null; |
| 958 } | 958 } |
| 959 | 959 |
| 960 bool isComplexNoSuchMethod(FunctionElement element) => | 960 bool isComplexNoSuchMethod(FunctionElement element) => |
| 961 noSuchMethodRegistry.isComplex(element); | 961 noSuchMethodRegistry.isComplex(element); |
| 962 | 962 |
| 963 bool methodNeedsRti(FunctionElement function) { | |
| 964 return rtiNeed.methodNeedsRti(function); | |
| 965 } | |
| 966 | |
| 967 CodegenEnqueuer get codegenEnqueuer => compiler.enqueuer.codegen; | 963 CodegenEnqueuer get codegenEnqueuer => compiler.enqueuer.codegen; |
| 968 | 964 |
| 969 /// Creates an [Enqueuer] for code generation specific to this backend. | 965 /// Creates an [Enqueuer] for code generation specific to this backend. |
| 970 CodegenEnqueuer createCodegenEnqueuer(CompilerTask task, Compiler compiler) { | 966 CodegenEnqueuer createCodegenEnqueuer(CompilerTask task, Compiler compiler) { |
| 971 return new CodegenEnqueuer( | 967 return new CodegenEnqueuer( |
| 972 task, this, compiler.options, const TreeShakingEnqueuerStrategy()); | 968 task, this, compiler.options, const TreeShakingEnqueuerStrategy()); |
| 973 } | 969 } |
| 974 | 970 |
| 975 WorldImpact codegen(CodegenWorkItem work) { | 971 WorldImpact codegen(CodegenWorkItem work) { |
| 976 Element element = work.element; | 972 Element element = work.element; |
| (...skipping 678 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1655 return _backend.defaultSuperclass(element); | 1651 return _backend.defaultSuperclass(element); |
| 1656 } | 1652 } |
| 1657 | 1653 |
| 1658 @override | 1654 @override |
| 1659 bool isNativeClass(ClassEntity element) => | 1655 bool isNativeClass(ClassEntity element) => |
| 1660 _backend.nativeData.isNativeClass(element); | 1656 _backend.nativeData.isNativeClass(element); |
| 1661 | 1657 |
| 1662 @override | 1658 @override |
| 1663 bool isForeign(Element element) => _backend.isForeign(element); | 1659 bool isForeign(Element element) => _backend.isForeign(element); |
| 1664 } | 1660 } |
| OLD | NEW |