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

Unified Diff: sdk/lib/_internal/compiler/implementation/ssa/codegen.dart

Issue 11783009: Big merge from experimental to bleeding edge. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 11 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: sdk/lib/_internal/compiler/implementation/ssa/codegen.dart
diff --git a/sdk/lib/_internal/compiler/implementation/ssa/codegen.dart b/sdk/lib/_internal/compiler/implementation/ssa/codegen.dart
index 6af28ded2a96b2bbe26014d0d2ec9968eca58878..3d2dcf1226b30988b6ba52c0d5819f0c43445474 100644
--- a/sdk/lib/_internal/compiler/implementation/ssa/codegen.dart
+++ b/sdk/lib/_internal/compiler/implementation/ssa/codegen.dart
@@ -127,7 +127,11 @@ class OrderedSet<T> {
void forEach(f) => map.keys.forEach(f);
- T get first => map.keys.iterator().next();
+ T get first {
+ var iterator = map.keys.iterator;
+ if (!iterator.moveNext()) throw new StateError("No elements");
+ return iterator.current;
+ }
get length => map.length;
}
@@ -1143,7 +1147,7 @@ abstract class SsaCodeGenerator implements HVisitor, HBlockInformationVisitor {
* Sequentialize a list of conceptually parallel copies. Parallel
* copies may contain cycles, that this method breaks.
*/
- void sequentializeCopies(List<Copy> copies,
+ void sequentializeCopies(Iterable<Copy> copies,
String tempName,
void doAssignment(String target, String source)) {
// Map to keep track of the current location (ie the variable that
@@ -1226,7 +1230,7 @@ abstract class SsaCodeGenerator implements HVisitor, HBlockInformationVisitor {
if (handler == null) return;
// Map the instructions to strings.
- List<Copy> copies = handler.copies.map((Copy copy) {
+ Iterable<Copy> copies = handler.copies.mappedBy((Copy copy) {
return new Copy(variableNames.getName(copy.source),
variableNames.getName(copy.destination));
});

Powered by Google App Engine
This is Rietveld 408576698