Index: pkg/compiler/lib/src/ssa/locals_handler.dart |
diff --git a/pkg/compiler/lib/src/ssa/locals_handler.dart b/pkg/compiler/lib/src/ssa/locals_handler.dart |
index 77fe43096593cfc86296c0983261e2dd8e7cfe1f..70d9522361a406ebf74ddf8c0071daae43bfce5d 100644 |
--- a/pkg/compiler/lib/src/ssa/locals_handler.dart |
+++ b/pkg/compiler/lib/src/ssa/locals_handler.dart |
@@ -276,6 +276,10 @@ class LocalsHandler { |
new HParameterValue(parameter, new TypeMask.exact(cls, closedWorld)); |
builder.graph.explicitReceiverParameter = value; |
builder.graph.entry.addAtEntry(value); |
+ if (builder.lastAddedParameter == null) { |
+ // If this is the first parameter inserted, make sure it stays first. |
+ builder.lastAddedParameter = value; |
+ } |
} |
} |