| Index: pkg/compiler/lib/src/ssa/builder.dart
|
| diff --git a/pkg/compiler/lib/src/ssa/builder.dart b/pkg/compiler/lib/src/ssa/builder.dart
|
| index fb979aaeab98cbd9be949c15c5a9159847f2f8dd..a9084c8e4b1fc7ab0883433f7fcf3912edca085d 100644
|
| --- a/pkg/compiler/lib/src/ssa/builder.dart
|
| +++ b/pkg/compiler/lib/src/ssa/builder.dart
|
| @@ -1533,12 +1533,19 @@ class SsaBuilder extends ast.Visitor
|
| return inliningStack.isEmpty || inliningStack.last.allFunctionsCalledOnce;
|
| }
|
|
|
| - bool isCalledOnce(Element element) {
|
| - if (!allInlinedFunctionsCalledOnce) return false;
|
| + bool isFunctionCalledOnce(Element element) {
|
| + if (element is ConstructorBodyElement) {
|
| + // ConstructorBodyElements are not in the type inference graph.
|
| + return false;
|
| + }
|
| TypesInferrer inferrer = compiler.typesTask.typesInferrer;
|
| return inferrer.isCalledOnce(element);
|
| }
|
|
|
| + bool isCalledOnce(Element element) {
|
| + return allInlinedFunctionsCalledOnce && isFunctionCalledOnce(element);
|
| + }
|
| +
|
| inlinedFrom(Element element, f()) {
|
| assert(element is FunctionElement || element is VariableElement);
|
| return reporter.withCurrentElement(element, () {
|
| @@ -8526,11 +8533,10 @@ class SsaBuilder extends ast.Visitor
|
| ast.Node _,
|
| List<HInstruction> compiledArguments,
|
| {InterfaceType instanceType}) {
|
| - TypesInferrer inferrer = compiler.typesTask.typesInferrer;
|
| AstInliningState state = new AstInliningState(
|
| function, returnLocal, returnType, elements, stack, localsHandler,
|
| inTryStatement,
|
| - allInlinedFunctionsCalledOnce && inferrer.isCalledOnce(function));
|
| + allInlinedFunctionsCalledOnce && isFunctionCalledOnce(function));
|
| inliningStack.add(state);
|
|
|
| // Setting up the state of the (AST) builder is performed even when the
|
|
|