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

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

Issue 11188059: Disable argument type optimization for named parameters. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Update co19 status Created 8 years, 2 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
« no previous file with comments | « no previous file | dart/tests/co19/co19-dart2js.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dart/lib/compiler/implementation/ssa/builder.dart
diff --git a/dart/lib/compiler/implementation/ssa/builder.dart b/dart/lib/compiler/implementation/ssa/builder.dart
index bfa4f7da9f40c82044fa81bcb8f073725b8d185b..f9941b951a3fbfa93e048bd4cd59c53fbc14b421 100644
--- a/dart/lib/compiler/implementation/ssa/builder.dart
+++ b/dart/lib/compiler/implementation/ssa/builder.dart
@@ -219,18 +219,22 @@ class SsaBuilderTask extends CompilerTask {
defaultValueTypes.update(index, parameter.name, type);
index++;
});
+ } else {
+ // TODO(ahe): I have disabled type optimizations for
+ // optional arguments as the types are stored in the wrong
+ // order.
+ HTypeList parameterTypes =
+ backend.optimisticParameterTypes(element.declaration,
+ defaultValueTypes);
+ if (!parameterTypes.allUnknown) {
+ int i = 0;
+ signature.forEachParameter((Element param) {
+ builder.parameters[param].guaranteedType = parameterTypes[i++];
+ });
+ }
+ backend.registerParameterTypesOptimization(
+ element.declaration, parameterTypes, defaultValueTypes);
}
- HTypeList parameterTypes =
- backend.optimisticParameterTypes(element.declaration,
- defaultValueTypes);
- if (!parameterTypes.allUnknown) {
- int i = 0;
- signature.orderedForEachParameter((Element param) {
- builder.parameters[param].guaranteedType = parameterTypes[i++];
- });
- }
- backend.registerParameterTypesOptimization(
- element.declaration, parameterTypes, defaultValueTypes);
}
if (compiler.tracer.enabled) {
« no previous file with comments | « no previous file | dart/tests/co19/co19-dart2js.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698