| Index: lib/compiler/implementation/ssa/builder.dart
|
| diff --git a/lib/compiler/implementation/ssa/builder.dart b/lib/compiler/implementation/ssa/builder.dart
|
| index 8d6c163875223f6a40e72eb8db446ab1be043565..ff5ef6c54f38d5597927afec2797ba9951f4c6a7 100644
|
| --- a/lib/compiler/implementation/ssa/builder.dart
|
| +++ b/lib/compiler/implementation/ssa/builder.dart
|
| @@ -171,6 +171,7 @@ class SsaBuilderTask extends CompilerTask {
|
| graph = builder.buildLazyInitializer(work.element);
|
| }
|
| assert(graph.isValid());
|
| +<<<<<<< HEAD
|
| if (kind !== ElementKind.FIELD) {
|
| bool inLoop = functionsCalledInLoop.contains(element);
|
| if (!inLoop) {
|
| @@ -195,6 +196,40 @@ class SsaBuilderTask extends CompilerTask {
|
| }
|
| backend.registerParameterTypesOptimization(element, parameterTypes);
|
| }
|
| +=======
|
| + bool inLoop = functionsCalledInLoop.contains(element);
|
| + if (!inLoop) {
|
| + Selector selector = selectorsCalledInLoop[element.name];
|
| + inLoop = selector !== null && selector.applies(element, compiler);
|
| + }
|
| + graph.calledInLoop = inLoop;
|
| +
|
| + // If there is an estimate of the parameter types assume these types when
|
| + // compiling.
|
| + OptionalParameterTypes defaultValueTypes = null;
|
| + FunctionSignature signature = element.computeSignature(compiler);
|
| + if (signature.optionalParameterCount > 0) {
|
| + defaultValueTypes =
|
| + new OptionalParameterTypes(signature.optionalParameterCount);
|
| + int index = 0;
|
| + signature.forEachOptionalParameter((Element parameter) {
|
| + Constant defaultValue = compiler.compileVariable(parameter);
|
| + HType type = HGraph.mapConstantTypeToSsaType(defaultValue);
|
| + defaultValueTypes.update(index, parameter.name, type);
|
| + index++;
|
| + });
|
| + }
|
| + HTypeList parameterTypes =
|
| + backend.optimisticParameterTypes(element, defaultValueTypes);
|
| + if (!parameterTypes.allUnknown) {
|
| + int i = 0;
|
| + signature.forEachParameter((Element param) {
|
| + builder.parameters[param].guaranteedType = parameterTypes[i++];
|
| + });
|
| + }
|
| + backend.registerParameterTypesOptimization(
|
| + element, parameterTypes, defaultValueTypes);
|
| +>>>>>>> Better tracking of provided types at call sites
|
|
|
| if (compiler.tracer.enabled) {
|
| String name;
|
|
|