Index: dart/sdk/lib/_internal/compiler/implementation/ssa/builder.dart |
diff --git a/dart/sdk/lib/_internal/compiler/implementation/ssa/builder.dart b/dart/sdk/lib/_internal/compiler/implementation/ssa/builder.dart |
index 8e6f6cbd07a9310068e60e43dd5e08abdc6004c6..53c7412186c7ee6ccc7e99044e0d9d8fb4f1393a 100644 |
--- a/dart/sdk/lib/_internal/compiler/implementation/ssa/builder.dart |
+++ b/dart/sdk/lib/_internal/compiler/implementation/ssa/builder.dart |
@@ -1143,6 +1143,15 @@ class SsaBuilder extends ResolvedVisitor implements Visitor { |
return true; |
} |
+ inlinedFrom(Element element, f()) { |
+ return compiler.withCurrentElement(element, () { |
+ sourceElementStack.add(element); |
+ var result = f(); |
+ sourceElementStack.removeLast(); |
+ return result; |
+ }); |
+ } |
+ |
/** |
* Documentation wanted -- johnniwinther |
* |
@@ -1153,16 +1162,19 @@ class SsaBuilder extends ResolvedVisitor implements Visitor { |
Selector selector, |
Link<Node> arguments, |
List<FunctionElement> constructors, |
- Map<Element, HInstruction> fieldValues) { |
+ Map<Element, HInstruction> fieldValues, |
+ FunctionElement inlinedFromElement) { |
compiler.withCurrentElement(constructor, () { |
assert(invariant(constructor, constructor.isImplementation)); |
constructors.addLast(constructor); |
List<HInstruction> compiledArguments = new List<HInstruction>(); |
- bool succeeded = addStaticSendArgumentsToList(selector, |
- arguments, |
- constructor, |
- compiledArguments); |
+ bool succeeded = |
+ inlinedFrom(inlinedFromElement, |
+ () => addStaticSendArgumentsToList(selector, |
+ arguments, |
+ constructor, |
+ compiledArguments)); |
if (!succeeded) { |
// Non-matching super and redirects are compile-time errors and thus |
// checked by the resolver. |
@@ -1247,7 +1259,7 @@ class SsaBuilder extends ResolvedVisitor implements Visitor { |
Selector selector = elements.getSelector(call); |
Link<Node> arguments = call.arguments; |
inlineSuperOrRedirect(target, selector, arguments, constructors, |
- fieldValues); |
+ fieldValues, constructor); |
foundSuperOrRedirect = true; |
} else { |
// A field initializer. |
@@ -1281,7 +1293,8 @@ class SsaBuilder extends ResolvedVisitor implements Visitor { |
selector, |
const Link<Node>(), |
constructors, |
- fieldValues); |
+ fieldValues, |
+ constructor); |
} |
} |
} |