| Index: sdk/lib/_internal/compiler/implementation/ssa/optimize.dart
|
| diff --git a/sdk/lib/_internal/compiler/implementation/ssa/optimize.dart b/sdk/lib/_internal/compiler/implementation/ssa/optimize.dart
|
| index ce291f22e1685b73ec61edb9b7f60d258fddc13b..f8ef54e8c134f8f613b17c7e6f0e5c1da1cb5b30 100644
|
| --- a/sdk/lib/_internal/compiler/implementation/ssa/optimize.dart
|
| +++ b/sdk/lib/_internal/compiler/implementation/ssa/optimize.dart
|
| @@ -596,8 +596,14 @@ class SsaConstantFolder extends HBaseVisitor implements OptimizationPhase {
|
| HInstruction visitTypeConversion(HTypeConversion node) {
|
| HInstruction value = node.inputs[0];
|
| DartType type = node.typeExpression;
|
| - if (type != null && (!type.isRaw || type.kind == TypeKind.TYPE_VARIABLE)) {
|
| - return node;
|
| + if (type != null) {
|
| + if (!type.isRaw || type.kind == TypeKind.TYPE_VARIABLE) {
|
| + return node;
|
| + }
|
| + if (type.kind == TypeKind.FUNCTION) {
|
| + // TODO(johnniwinther): Optimize function type conversions.
|
| + return node;
|
| + }
|
| }
|
| HType convertedType = node.instructionType;
|
| if (convertedType.isUnknown()) return node;
|
|
|