| 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));
|
| });
|
|
|