| Index: sdk/lib/_internal/compiler/implementation/ssa/builder.dart
|
| ===================================================================
|
| --- sdk/lib/_internal/compiler/implementation/ssa/builder.dart (revision 31184)
|
| +++ sdk/lib/_internal/compiler/implementation/ssa/builder.dart (working copy)
|
| @@ -1317,7 +1317,11 @@
|
| function, selector, providedArguments, currentNode);
|
| enterInlinedMethod(function, currentNode, compiledArguments);
|
| inlinedFrom(function, () {
|
| - doInline(function);
|
| + if (!isReachable) {
|
| + emitReturn(graph.addConstantNull(compiler), null);
|
| + } else {
|
| + doInline(function);
|
| + }
|
| });
|
| leaveInlinedMethod();
|
| }
|
| @@ -1330,6 +1334,8 @@
|
| return false;
|
| }
|
|
|
| + void emitReturn(HInstruction value, N node);
|
| +
|
| void doInline(FunctionElement function);
|
|
|
| inlinedFrom(Element element, f()) {
|
| @@ -3989,6 +3995,11 @@
|
| typeInfoSetterElement,
|
| <HInstruction>[newObject, typeInfo],
|
| backend.dynamicType);
|
| +
|
| + // The new object will now be referenced through the
|
| + // `setRuntimeTypeInfo` call. We therefore set the type of that
|
| + // instruction to be of the object's type.
|
| + assert(stack.last is HInvokeStatic || stack.last == newObject);
|
| stack.last.instructionType = newObject.instructionType;
|
| return pop();
|
| }
|
| @@ -4864,8 +4875,6 @@
|
| emitReturn(value, node);
|
| }
|
|
|
| - void emitReturn(HInstruction value, Node node);
|
| -
|
| visitThrow(Throw node) {
|
| visitThrowExpression(node.expression);
|
| if (isReachable) {
|
|
|