Chromium Code Reviews| Index: pkg/compiler/lib/src/ssa/builder.dart |
| diff --git a/pkg/compiler/lib/src/ssa/builder.dart b/pkg/compiler/lib/src/ssa/builder.dart |
| index 9e17d7a9a503202de4c087bd2b3aba3d73dcb598..43c665183d4fed9d9287198b6606d3e1d3499a51 100644 |
| --- a/pkg/compiler/lib/src/ssa/builder.dart |
| +++ b/pkg/compiler/lib/src/ssa/builder.dart |
| @@ -747,10 +747,15 @@ class SsaBuilder extends ast.Visitor |
| visit(initializer); |
| HInstruction value = pop(); |
| value = potentiallyCheckOrTrustType(value, variable.type); |
| - ast.SendSet sendSet = node.definitions.nodes.head; |
| - closeAndGotoExit(new HReturn(value, |
| - sourceInformationBuilder.buildReturn(sendSet.assignmentOperator))); |
| - return closeFunction(); |
| + ast.Node sendSet; |
| + var iterator = node.definitions.nodes.iterator; |
| + while (iterator.current is! ast.SendSet) { |
| + iterator.moveNext(); |
|
Johnni Winther
2016/11/02 10:41:31
To find the right node you need to check `if (iter
Emily Fortuna
2016/11/02 18:09:21
Thanks for helping me understand how this works. I
|
| + } |
| + |
| + closeAndGotoExit(new HReturn(value, sourceInformationBuilder.buildReturn( |
| + iterator.current.assignmentOperator))); |
| + return closeFunction(); // token or source |
| } |
| /** |