| Index: pkg/compiler/lib/src/ssa/optimize.dart
|
| diff --git a/pkg/compiler/lib/src/ssa/optimize.dart b/pkg/compiler/lib/src/ssa/optimize.dart
|
| index bf6e754e4d9866dc9329f9ceca51de5699879bbd..22c120f65186d580e39627ea6089c82c0f3fec3f 100644
|
| --- a/pkg/compiler/lib/src/ssa/optimize.dart
|
| +++ b/pkg/compiler/lib/src/ssa/optimize.dart
|
| @@ -9,7 +9,7 @@ import '../compiler.dart' show Compiler;
|
| import '../constants/constant_system.dart';
|
| import '../constants/values.dart';
|
| import '../common_elements.dart' show CommonElements;
|
| -import '../elements/elements.dart' show ClassElement, MethodElement;
|
| +import '../elements/elements.dart' show ClassElement;
|
| import '../elements/entities.dart';
|
| import '../elements/resolution_types.dart';
|
| import '../elements/types.dart';
|
| @@ -531,7 +531,7 @@ class SsaInstructionSimplifier extends HBaseVisitor
|
| }
|
|
|
| HInstruction tryInlineNativeMethod(
|
| - HInvokeDynamicMethod node, MethodElement method) {
|
| + HInvokeDynamicMethod node, FunctionEntity method) {
|
| // Enable direct calls to a native method only if we don't run in checked
|
| // mode, where the Dart version may have type annotations on parameters and
|
| // return type that it should check.
|
| @@ -544,11 +544,7 @@ class SsaInstructionSimplifier extends HBaseVisitor
|
|
|
| if (!node.isInterceptedCall) return null;
|
|
|
| - // TODO(sra): Check for legacy methods with bodies in the native strings.
|
| - // foo() native 'return something';
|
| - // They should not be used.
|
| -
|
| - ResolutionFunctionType type = method.type;
|
| + FunctionType type = _closedWorld.elementEnvironment.getFunctionType(method);
|
| if (type.namedParameters.isNotEmpty) return null;
|
|
|
| // Return types on native methods don't need to be checked, since the
|
| @@ -567,7 +563,7 @@ class SsaInstructionSimplifier extends HBaseVisitor
|
| canInline = false;
|
| } else {
|
| int inputPosition = 1; // Skip receiver.
|
| - void checkParameterType(ResolutionDartType type) {
|
| + void checkParameterType(DartType type) {
|
| if (inputPosition++ < inputs.length && canInline) {
|
| if (type.unaliased.isFunctionType) {
|
| canInline = false;
|
|
|