Chromium Code Reviews| 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 1cd2255ddc3b30cfbbc2a6efd1319821010383c1..349d214f9b11c5dce89fc49f6f08ad65dad0795e 100644 |
| --- a/sdk/lib/_internal/compiler/implementation/ssa/builder.dart |
| +++ b/sdk/lib/_internal/compiler/implementation/ssa/builder.dart |
| @@ -3380,18 +3380,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>[]; |
| @@ -3646,10 +3635,14 @@ 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)); |
| + if (constant is ConstructedConstant) { |
| + ConstructedConstant constructed = constant; |
| + compiler.enqueuer.codegen.registerInstantiatedType(constructed.type, |
|
ngeoffray
2013/06/17 09:15:03
Isn't this already done by the constant_handler?
|
| + elements); |
| + } |
| if (isSymbolConstructor) { |
| ConstructedConstant symbol = constant; |
| StringConstant stringConstant = symbol.fields.single; |