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

Unified Diff: pkg/compiler/lib/src/resolution/send_resolver.dart

Issue 1115183002: Add ConstantConstructor to ConstantExpression system. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Updated cf. comments. Created 5 years, 7 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 | « pkg/compiler/lib/src/resolution/members.dart ('k') | pkg/compiler/lib/src/use_unused_api.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/resolution/send_resolver.dart
diff --git a/pkg/compiler/lib/src/resolution/send_resolver.dart b/pkg/compiler/lib/src/resolution/send_resolver.dart
index 4c6110f45336cbdda68492f7a983551a6cbca205..7790028d5caeefd74d6fbbd877368ae4794de25c 100644
--- a/pkg/compiler/lib/src/resolution/send_resolver.dart
+++ b/pkg/compiler/lib/src/resolution/send_resolver.dart
@@ -748,16 +748,15 @@ abstract class DeclarationResolverMixin {
return new RequiredParameterStructure(
definitions, node, element, index);
} else {
- ConstantExpression defaultValue;
- if (element.initializer != null) {
- defaultValue = elements.getConstant(element.initializer);
- }
+ // TODO(johnniwinther): Should we differentiate between implicit (null)
+ // and explicit values? What about optional parameters on redirecting
+ // factories?
if (isNamed) {
return new NamedParameterStructure(
- definitions, node, element, defaultValue);
+ definitions, node, element, element.constant);
} else {
return new OptionalParameterStructure(
- definitions, node, element, defaultValue, index);
+ definitions, node, element, element.constant, index);
}
}
}
« no previous file with comments | « pkg/compiler/lib/src/resolution/members.dart ('k') | pkg/compiler/lib/src/use_unused_api.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698