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

Unified Diff: sdk/lib/_internal/compiler/implementation/compile_time_constants.dart

Issue 11412086: Make 'where' lazy. (Closed) Base URL: https://dart.googlecode.com/svn/experimental/lib_v2/dart
Patch Set: FilteredIterable/Iterator -> WhereIterable/Iterator. Created 8 years, 1 month 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: sdk/lib/_internal/compiler/implementation/compile_time_constants.dart
diff --git a/sdk/lib/_internal/compiler/implementation/compile_time_constants.dart b/sdk/lib/_internal/compiler/implementation/compile_time_constants.dart
index 7864e07c26e177f47dc844dc27fa97ef74f08843..1bf46d93812965cfaec283b945b4c6a6c0c185dc 100644
--- a/sdk/lib/_internal/compiler/implementation/compile_time_constants.dart
+++ b/sdk/lib/_internal/compiler/implementation/compile_time_constants.dart
@@ -184,11 +184,11 @@ class ConstantHandler extends CompilerTask {
}
/**
- * Returns a [List] of static non final fields that need to be initialized.
- * The list must be evaluated in order since the fields might depend on each
- * other.
+ * Returns an [Iterable] of static non final fields that need to be
+ * initialized. The fields list must be evaluated in order since they might
+ * depend on each other.
*/
- List<VariableElement> getStaticNonFinalFieldsForEmission() {
+ Iterable<VariableElement> getStaticNonFinalFieldsForEmission() {
return initialVariableValues.keys.where((element) {
return element.kind == ElementKind.FIELD
&& !element.isInstanceMember()
@@ -197,11 +197,11 @@ class ConstantHandler extends CompilerTask {
}
/**
- * Returns a [List] of static const fields that need to be initialized. The
- * list must be evaluated in order since the fields might depend on each
+ * Returns an [Iterable] of static const fields that need to be initialized.
+ * The fields must be evaluated in order since they might depend on each
* other.
*/
- List<VariableElement> getStaticFinalFieldsForEmission() {
+ Iterable<VariableElement> getStaticFinalFieldsForEmission() {
return initialVariableValues.keys.where((element) {
return element.kind == ElementKind.FIELD
&& !element.isInstanceMember()

Powered by Google App Engine
This is Rietveld 408576698