Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(42)

Unified Diff: dart/sdk/lib/_internal/compiler/implementation/ssa/builder.dart

Issue 11364212: Track the origin element of inlined arguments to super constructor. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | dart/tests/language/inline_super_part.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
}
}
}
« no previous file with comments | « no previous file | dart/tests/language/inline_super_part.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698