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

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

Issue 12388043: Revert revision 19282. Some tests fail. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 10 months 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 | tests/language/language_dart2js.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/_internal/compiler/implementation/ssa/builder.dart
===================================================================
--- sdk/lib/_internal/compiler/implementation/ssa/builder.dart (revision 19281)
+++ sdk/lib/_internal/compiler/implementation/ssa/builder.dart (working copy)
@@ -1144,8 +1144,7 @@
Link<Node> arguments,
List<FunctionElement> constructors,
Map<Element, HInstruction> fieldValues,
- FunctionElement inlinedFromElement,
- Node callNode) {
+ FunctionElement inlinedFromElement) {
compiler.withCurrentElement(constructor, () {
assert(invariant(constructor, constructor.isImplementation));
constructors.addLast(constructor);
@@ -1165,27 +1164,6 @@
element: constructor);
}
- ClassElement superclass = constructor.getEnclosingClass();
- if (compiler.world.needsRti(superclass)) {
- // If [superclass] needs rti, we have to give a value to its
- // type parameters. Those values are in the [supertype]
- // declaration of [subclass].
- ClassElement subclass = inlinedFromElement.getEnclosingClass();
- DartType supertype = subclass.supertype;
- Link<DartType> typeVariable = superclass.typeVariables;
- supertype.typeArguments.forEach((DartType argument) {
- localsHandler.directLocals[typeVariable.head.element] =
- analyzeTypeArgument(argument, callNode);
- typeVariable = typeVariable.tail;
- });
- // Also add null to non-provided type variables.
- while (!typeVariable.isEmpty) {
- localsHandler.directLocals[typeVariable.head.element] =
- graph.addConstantNull(constantSystem);
- typeVariable = typeVariable.tail;
- }
- }
-
inlinedFrom(constructor, () {
buildFieldInitializers(constructor.enclosingElement.implementation,
fieldValues);
@@ -1268,7 +1246,7 @@
Selector selector = elements.getSelector(call);
Link<Node> arguments = call.arguments;
inlineSuperOrRedirect(target, selector, arguments, constructors,
- fieldValues, constructor, call);
+ fieldValues, constructor);
foundSuperOrRedirect = true;
} else {
// A field initializer.
@@ -1303,8 +1281,7 @@
const Link<Node>(),
constructors,
fieldValues,
- constructor,
- functionNode);
+ constructor);
}
}
}
@@ -3127,10 +3104,11 @@
member = closureClass.methodElement;
member = member.getOutermostEnclosingMemberOrTopLevel();
}
- if (member.isConstructor()) {
+ if (member.isFactoryConstructor()) {
// The type variable is stored in a parameter of the method.
return localsHandler.readLocal(type.element);
- } else if (member.isInstanceMember()) {
+ } else if (member.isInstanceMember() ||
+ member.isGenerativeConstructor()) {
// The type variable is stored on the object. Generate code to extract
// the type arguments from the object, substitute them as an instance
// of the type we are testing against (if necessary), and extract the
« no previous file with comments | « no previous file | tests/language/language_dart2js.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698