| Index: sdk/lib/_internal/compiler/implementation/types/simple_types_inferrer.dart
|
| ===================================================================
|
| --- sdk/lib/_internal/compiler/implementation/types/simple_types_inferrer.dart (revision 26173)
|
| +++ sdk/lib/_internal/compiler/implementation/types/simple_types_inferrer.dart (working copy)
|
| @@ -859,6 +859,9 @@
|
|
|
| bool recordType(Element analyzedElement, TypeMask type) {
|
| if (isNativeElement(analyzedElement)) return false;
|
| + if (!compiler.backend.canBeUsedForGlobalOptimizations(analyzedElement)) {
|
| + return false;
|
| + }
|
| assert(type != null);
|
| assert(analyzedElement.isField()
|
| || analyzedElement.isParameter()
|
| @@ -879,6 +882,9 @@
|
| */
|
| bool recordReturnType(Element analyzedElement, TypeMask returnType) {
|
| if (isNativeElement(analyzedElement)) return false;
|
| + if (!compiler.backend.canBeUsedForGlobalOptimizations(analyzedElement)) {
|
| + return false;
|
| + }
|
| assert(analyzedElement.implementation == analyzedElement);
|
| TypeMask existing = typeInformationOf(analyzedElement).returnType;
|
| if (optimismState == OPTIMISTIC
|
| @@ -1111,8 +1117,8 @@
|
| }
|
|
|
| bool updateParameterType(Element parameter) {
|
| - FunctionTypeInformation functionInfo =
|
| - typeInformationOf(parameter.enclosingElement);
|
| + Element function = parameter.enclosingElement;
|
| + FunctionTypeInformation functionInfo = typeInformationOf(function);
|
| if (functionInfo.canBeClosurized) return false;
|
| if (!isNotClosure(parameter.enclosingElement)) return false;
|
|
|
|
|