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

Unified Diff: sdk/lib/_internal/compiler/implementation/js/nodes.dart

Issue 661953003: Don't run through iterable twice. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/_internal/compiler/implementation/js/nodes.dart
diff --git a/sdk/lib/_internal/compiler/implementation/js/nodes.dart b/sdk/lib/_internal/compiler/implementation/js/nodes.dart
index 3f753139a52a244459434ada2a8de21bc3a8864b..23ca6d09d315aceaf12c9e936c3557f37a2ad6b6 100644
--- a/sdk/lib/_internal/compiler/implementation/js/nodes.dart
+++ b/sdk/lib/_internal/compiler/implementation/js/nodes.dart
@@ -941,8 +941,10 @@ class ArrayInitializer extends Expression {
ArrayInitializer(this.length, this.elements);
- factory ArrayInitializer.from(Iterable<Expression> expressions) =>
- new ArrayInitializer(expressions.length, _convert(expressions));
+ factory ArrayInitializer.from(Iterable<Expression> expressions) {
+ List<ArrayElement> elements = _convert(expressions);
+ return new ArrayInitializer(elements.length, elements);
+ }
accept(NodeVisitor visitor) => visitor.visitArrayInitializer(this);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698