| Index: pkg/compiler/lib/src/cps_ir/inline.dart
|
| diff --git a/pkg/compiler/lib/src/cps_ir/inline.dart b/pkg/compiler/lib/src/cps_ir/inline.dart
|
| index cc046eec2c56c6588041c26cee5f3c652ae5b072..2771aefc89cef8aa6176d703f5beb7e88d28c4b2 100644
|
| --- a/pkg/compiler/lib/src/cps_ir/inline.dart
|
| +++ b/pkg/compiler/lib/src/cps_ir/inline.dart
|
| @@ -372,6 +372,13 @@ class InliningVisitor extends TrampolineRecursiveVisitor {
|
| return null;
|
| }
|
|
|
| + // Don't inline methods that never return. They are usually helper functions
|
| + // that throw an exception.
|
| + if (invoke.type.isEmpty && !invoke.type.isNullable) {
|
| + // TODO(sra): It would be ok to inline if doing so was shrinking.
|
| + return null;
|
| + }
|
| +
|
| Reference<Primitive> dartReceiver = invoke.dartReceiverReference;
|
| TypeMask abstractReceiver =
|
| dartReceiver == null ? null : abstractType(dartReceiver);
|
|
|