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

Unified Diff: sdk/lib/core/iterable.dart

Issue 181543004: Optimize VM JSON parser for memory use. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Typo in type. Created 6 years, 10 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
« runtime/lib/convert_patch.dart ('K') | « runtime/lib/convert_patch.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/core/iterable.dart
diff --git a/sdk/lib/core/iterable.dart b/sdk/lib/core/iterable.dart
index 8ea9c99f825f1a6bb03048fa0d7f0fb54acc7464..8eb91bdea0be59383bc4fa0e3d34aa6f8421572e 100644
--- a/sdk/lib/core/iterable.dart
+++ b/sdk/lib/core/iterable.dart
@@ -44,9 +44,8 @@ abstract class Iterable<E> {
* As an Iterable, [:new Iterable.generate(n, generator)):] is equivalent to
* [:const [0, ..., n - 1].map(generator):]
*/
- factory Iterable.generate(int count, E generator(int index)) {
- return new _GeneratorIterable<E>(count, generator);
- }
+ const factory Iterable.generate(int count, E generator(int index)) =
+ _GeneratorIterable<E>;
/**
* Returns an Iterator that iterates over this Iterable object.
@@ -291,7 +290,7 @@ class _GeneratorIterable<E> extends IterableBase<E>
implements EfficientLength {
final int _count;
final _Generator<E> _generator;
- _GeneratorIterable(this._count, this._generator);
+ const _GeneratorIterable(this._count, this._generator);
Iterator<E> get iterator => new _GeneratorIterator(_count, _generator);
int get length => _count;
}
« runtime/lib/convert_patch.dart ('K') | « runtime/lib/convert_patch.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698