| 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 import 'dart:math' as math; | 5 import 'dart:math' as math; |
| 6 import 'dart:collection' show Queue; | 6 import 'dart:collection' show Queue; |
| 7 import '../common.dart'; | 7 import '../common.dart'; |
| 8 import '../common/codegen.dart' show CodegenRegistry, CodegenWorkItem; | 8 import '../common/codegen.dart' show CodegenRegistry, CodegenWorkItem; |
| 9 import '../common/tasks.dart' show CompilerTask; | 9 import '../common/tasks.dart' show CompilerTask; |
| 10 import '../constants/constant_system.dart'; | 10 import '../constants/constant_system.dart'; |
| (...skipping 1871 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1882 use(node.receiver); | 1882 use(node.receiver); |
| 1883 push(js | 1883 push(js |
| 1884 .propertyCall( | 1884 .propertyCall( |
| 1885 pop(), _namer.invocationName(call), visitArguments(node.inputs)) | 1885 pop(), _namer.invocationName(call), visitArguments(node.inputs)) |
| 1886 .withSourceInformation(node.sourceInformation)); | 1886 .withSourceInformation(node.sourceInformation)); |
| 1887 _registry.registerDynamicUse(new DynamicUse(call, null)); | 1887 _registry.registerDynamicUse(new DynamicUse(call, null)); |
| 1888 } | 1888 } |
| 1889 | 1889 |
| 1890 visitInvokeStatic(HInvokeStatic node) { | 1890 visitInvokeStatic(HInvokeStatic node) { |
| 1891 MemberEntity element = node.element; | 1891 MemberEntity element = node.element; |
| 1892 List<DartType> instantiatedTypes = node.instantiatedTypes; | 1892 node.instantiatedTypes?.forEach(_registry.registerInstantiation); |
| 1893 | |
| 1894 if (instantiatedTypes != null && !instantiatedTypes.isEmpty) { | |
| 1895 instantiatedTypes.forEach((type) { | |
| 1896 _registry.registerInstantiation(type); | |
| 1897 }); | |
| 1898 } | |
| 1899 | 1893 |
| 1900 List<js.Expression> arguments = visitArguments(node.inputs, start: 0); | 1894 List<js.Expression> arguments = visitArguments(node.inputs, start: 0); |
| 1901 | 1895 |
| 1902 if (element == _commonElements.checkConcurrentModificationError) { | 1896 if (element == _commonElements.checkConcurrentModificationError) { |
| 1903 // Manually inline the [checkConcurrentModificationError] function. This | 1897 // Manually inline the [checkConcurrentModificationError] function. This |
| 1904 // function is only called from a for-loop update. Ideally we would just | 1898 // function is only called from a for-loop update. Ideally we would just |
| 1905 // generate the conditionalcontrol flow in the builder but it adds basic | 1899 // generate the conditionalcontrol flow in the builder but it adds basic |
| 1906 // blocks in the loop update that interfere with other optimizations and | 1900 // blocks in the loop update that interfere with other optimizations and |
| 1907 // confuses loop recognition. | 1901 // confuses loop recognition. |
| 1908 | 1902 |
| (...skipping 1132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3041 return _closedWorld.anyStrictSubclassOf(cls, (ClassEntity subclass) { | 3035 return _closedWorld.anyStrictSubclassOf(cls, (ClassEntity subclass) { |
| 3042 return !_rtiSubstitutions.isTrivialSubstitution(subclass, cls); | 3036 return !_rtiSubstitutions.isTrivialSubstitution(subclass, cls); |
| 3043 }); | 3037 }); |
| 3044 } | 3038 } |
| 3045 | 3039 |
| 3046 @override | 3040 @override |
| 3047 void visitRef(HRef node) { | 3041 void visitRef(HRef node) { |
| 3048 visit(node.value); | 3042 visit(node.value); |
| 3049 } | 3043 } |
| 3050 } | 3044 } |
| OLD | NEW |