OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. |
| 4 |
| 5 foo(t0) { |
| 6 var a = t0, b = baz(), c = bar(); |
| 7 if (t0 == 'foo') { |
| 8 // Force a SSA swapping problem where dart2js used to use 't0' as |
| 9 // a temporary variable. |
| 10 var tmp = c; |
| 11 c = b; |
| 12 b = tmp; |
| 13 } |
| 14 |
| 15 Expect.equals('foo', a); |
| 16 Expect.equals('foo', t0); |
| 17 Expect.equals('bar', b); |
| 18 Expect.equals('baz', c); |
| 19 } |
| 20 |
| 21 bar() => 'bar'; |
| 22 baz() => 'baz'; |
| 23 |
| 24 main() { |
| 25 foo('foo'); |
| 26 } |
OLD | NEW |