Fix invalid locations problem for inline super constructors.

This is a quick fix for issue 5184.

R=ahe@google.com
BUG=5184

Review URL: https://codereview.chromium.org//10989017

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12853 260f80e4-7a28-3924-810f-c04153c831b5
This commit is contained in:
podivilov@google.com
2012-09-25 17:15:07 +00:00
parent 8b9d9b7990
commit 4df4a765e7
+6 -2
View File
@@ -1166,8 +1166,10 @@ class SsaBuilder extends ResolvedVisitor implements Visitor {
FunctionElement target = elements[call];
Selector selector = elements.getSelector(call);
Link<Node> arguments = call.arguments;
sourceElementStack.add(target);
inlineSuperOrRedirect(target, selector, arguments, constructors,
fieldValues);
sourceElementStack.removeLast();
foundSuperOrRedirect = true;
} else {
// A field initializer.
@@ -1196,11 +1198,13 @@ class SsaBuilder extends ResolvedVisitor implements Visitor {
if (target === null) {
compiler.internalError("no default constructor available");
}
sourceElementStack.add(target.implementation);
inlineSuperOrRedirect(target.implementation,
selector,
const EmptyLink<Node>(),
constructors,
fieldValues);
sourceElementStack.removeLast();
}
}
}
@@ -2297,8 +2301,8 @@ class SsaBuilder extends ResolvedVisitor implements Visitor {
typeInfo = pop();
}
if (type.element.isTypeVariable()) {
// TODO(karlklose): We currently answer true to any is check
// involving a type variable -- both is T and is !T -- until
// TODO(karlklose): We currently answer true to any is check
// involving a type variable -- both is T and is !T -- until
// we have a proper implementation of reified generics.
stack.add(graph.addConstantBool(true, constantSystem));
} else {