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

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

Issue 16549004: Add type arguments to constants. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comments. Created 7 years, 6 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
Index: sdk/lib/_internal/compiler/implementation/ssa/builder.dart
diff --git a/sdk/lib/_internal/compiler/implementation/ssa/builder.dart b/sdk/lib/_internal/compiler/implementation/ssa/builder.dart
index 0a616fc3df16b0f4c1583d3a343c8a4251c0417c..a3d7b7b3ab63510c263f2d15a90daac50845ee89 100644
--- a/sdk/lib/_internal/compiler/implementation/ssa/builder.dart
+++ b/sdk/lib/_internal/compiler/implementation/ssa/builder.dart
@@ -3410,18 +3410,7 @@ class SsaBuilder extends ResolvedVisitor implements Visitor {
bool isRedirected = functionElement.isRedirectingFactory;
DartType expectedType = type;
if (isRedirected) {
- FunctionExpression functionNode = functionElement.parseNode(compiler);
- if (functionNode.isRedirectingFactory) {
- // Lookup the type used in the redirection.
- Return redirectionNode = functionNode.body;
- TreeElements treeElements =
- compiler.enqueuer.resolution.getCachedElements(
- functionElement.declaration);
- ClassElement targetClass = functionElement.getEnclosingClass();
- type = treeElements.getType(redirectionNode.expression)
- .subst(type.typeArguments, targetClass.typeVariables);
- }
- functionElement = functionElement.redirectionTarget;
+ type = functionElement.computeTargetType(compiler, type);
}
var inputs = <HInstruction>[];
@@ -3676,7 +3665,6 @@ class SsaBuilder extends ResolvedVisitor implements Visitor {
generateRuntimeError(node.send, message.toString());
}
} else if (node.isConst()) {
- // TODO(karlklose): add type representation
ConstantHandler handler = compiler.constantHandler;
Constant constant = handler.compileNodeWithDefinitions(node, elements);
stack.add(graph.addConstant(constant, compiler));

Powered by Google App Engine
This is Rietveld 408576698