| 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 ccf7f1eff5a6886227b34725750bf9213d7c50db..3a0b393a4a648092bf5a21f57e02fa79063bf51b 100644
|
| --- a/pkg/compiler/lib/src/ssa/optimize.dart
|
| +++ b/pkg/compiler/lib/src/ssa/optimize.dart
|
| @@ -482,7 +482,7 @@ class SsaInstructionSimplifier extends HBaseVisitor
|
| // [:noSuchMethod:] we just ignore it.
|
| &&
|
| node.selector.applies(element)) {
|
| - MethodElement method = element;
|
| + FunctionEntity method = element;
|
|
|
| if (_nativeData.isNativeMember(method)) {
|
| HInstruction folded = tryInlineNativeMethod(node, method);
|
| @@ -490,11 +490,9 @@ class SsaInstructionSimplifier extends HBaseVisitor
|
| } else {
|
| // TODO(ngeoffray): If the method has optional parameters,
|
| // we should pass the default values.
|
| - ResolutionFunctionType type = method.type;
|
| - int optionalParameterCount =
|
| - type.optionalParameterTypes.length + type.namedParameters.length;
|
| - if (optionalParameterCount == 0 ||
|
| - type.parameterTypes.length + optionalParameterCount ==
|
| + ParameterStructure parameters = method.parameterStructure;
|
| + if (parameters.optionalParameters == 0 ||
|
| + parameters.requiredParameters + parameters.optionalParameters ==
|
| node.selector.argumentCount) {
|
| node.element = method;
|
| }
|
| @@ -1025,14 +1023,16 @@ class SsaInstructionSimplifier extends HBaseVisitor
|
| }
|
|
|
| HInstruction receiver = node.getDartReceiver(_closedWorld);
|
| - FieldElement field =
|
| + FieldEntity field =
|
| findConcreteFieldForDynamicAccess(receiver, node.selector);
|
| if (field == null || !field.isAssignable) return node;
|
| // Use `node.inputs.last` in case the call follows the interceptor calling
|
| // convention, but is not a call on an interceptor.
|
| HInstruction value = node.inputs.last;
|
| if (_options.enableTypeAssertions) {
|
| - ResolutionDartType type = field.type;
|
| + // TODO(johnniwinther): Support field entities.
|
| + FieldElement element = field;
|
| + DartType type = element.type;
|
| if (!type.treatAsRaw ||
|
| type.isTypeVariable ||
|
| type.unaliased.isFunctionType) {
|
|
|