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

Unified Diff: lib/compiler/implementation/elements/elements.dart

Issue 10908068: Better tracking of provided types at call sites (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Addressed review comments Created 8 years, 3 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
Index: lib/compiler/implementation/elements/elements.dart
diff --git a/lib/compiler/implementation/elements/elements.dart b/lib/compiler/implementation/elements/elements.dart
index 61fe59aa980548d3547f7374c519d610b0ead379..58ae435cc5e9c51a95f877703dc2b81c78e83ed2 100644
--- a/lib/compiler/implementation/elements/elements.dart
+++ b/lib/compiler/implementation/elements/elements.dart
@@ -845,12 +845,15 @@ class FunctionSignature {
this.optionalParameterCount,
this.returnType);
- void forEachParameter(void function(Element parameter)) {
+ void forEachRequiredParameter(void function(Element parameter)) {
for (Link<Element> link = requiredParameters;
!link.isEmpty();
link = link.tail) {
function(link.head);
}
+ }
+
+ void forEachOptionalParameter(void function(Element parameter)) {
for (Link<Element> link = optionalParameters;
!link.isEmpty();
link = link.tail) {
@@ -858,6 +861,11 @@ class FunctionSignature {
}
}
+ void forEachParameter(void function(Element parameter)) {
+ forEachRequiredParameter(function);
+ forEachOptionalParameter(function);
+ }
+
int get parameterCount => requiredParameterCount + optionalParameterCount;
}

Powered by Google App Engine
This is Rietveld 408576698