| Index: lib/compiler/implementation/ssa/builder.dart
|
| diff --git a/lib/compiler/implementation/ssa/builder.dart b/lib/compiler/implementation/ssa/builder.dart
|
| index 9ec35abf63a242c6d2ed1528a8e8896d3dabe96c..93c73bde46864d57c085c98836b4e1ce92d7010c 100644
|
| --- a/lib/compiler/implementation/ssa/builder.dart
|
| +++ b/lib/compiler/implementation/ssa/builder.dart
|
| @@ -138,6 +138,7 @@ class SsaBuilderTask extends CompilerTask {
|
| // Loop tracking information.
|
| final Set<FunctionElement> functionsCalledInLoop;
|
| final Map<SourceString, Selector> selectorsCalledInLoop;
|
| + final JavaScriptBackend backend;
|
|
|
| String get name() => 'SSA builder';
|
|
|
| @@ -147,6 +148,7 @@ class SsaBuilderTask extends CompilerTask {
|
| emitter = backend.emitter,
|
| functionsCalledInLoop = new Set<FunctionElement>(),
|
| selectorsCalledInLoop = new Map<SourceString, Selector>(),
|
| + backend = backend,
|
| super(backend.compiler);
|
|
|
| HGraph build(WorkItem work) {
|
| @@ -171,6 +173,20 @@ class SsaBuilderTask extends CompilerTask {
|
| inLoop = selector !== null && selector.applies(element, compiler);
|
| }
|
| graph.calledInLoop = inLoop;
|
| +
|
| + // If there is an estimate of the parameter types assume these types when
|
| + // compiling.
|
| + List<HType> parameterTypes =
|
| + backend.optimisticParameterTypesWithRecompilationOnTypeChange(
|
| + element);
|
| + if (parameterTypes != null) {
|
| + FunctionSignature signature = element.computeSignature(compiler);
|
| + int i = 0;
|
| + signature.forEachParameter((Element param) {
|
| + builder.parameters[param].guaranteedType = parameterTypes[i++];
|
| + });
|
| + }
|
| +
|
| if (compiler.tracer.enabled) {
|
| String name;
|
| if (element.enclosingElement !== null &&
|
|
|