Chromium Code Reviews| Index: test/codegen/expect/cascade.js |
| diff --git a/test/codegen/expect/cascade.js b/test/codegen/expect/cascade.js |
| index 2e32cc535c5aa360857b231e225c8a3b89ddbb7a..01f1f7d8c457210cf978fb8acd48591c43fff05b 100644 |
| --- a/test/codegen/expect/cascade.js |
| +++ b/test/codegen/expect/cascade.js |
| @@ -13,10 +13,9 @@ var cascade; |
| core.print("hi"); |
| a = null; |
| }; |
| - ((_) => { |
| - dart.dinvoke(_, 'x'); |
| - dart.dinvoke(_, 'x'); |
| - })(a); |
| + let _ = a; |
|
Leaf
2015/04/08 04:08:34
That's really nice.
Jennifer Messerly
2015/04/08 16:35:46
yeah, there were a few "emergent" cases like this
|
| + dart.dinvoke(_, 'x'); |
| + dart.dinvoke(_, 'x'); |
| core.print(a); |
| } |
| // Function test_closure_without_mutate: () → void |
| @@ -32,34 +31,35 @@ var cascade; |
| // Function test_mutate_inside_cascade: () → void |
| function test_mutate_inside_cascade() { |
| let a = null; |
| - a = ((_) => { |
| - _.x = a = null; |
| - _.x = a = null; |
| - return _; |
| - })(new A()); |
| + let _ = new A(); |
| + _.x = a = null; |
| + _.x = a = null; |
| + a = _; |
| core.print(a); |
| } |
| // Function test_mutate_outside_cascade: () → void |
| function test_mutate_outside_cascade() { |
| let a = null, b = null; |
| a = new A(); |
| - dart.dput(a, 'x', b = null); |
| - dart.dput(a, 'x', b = null); |
| + a.x = b = null; |
| + a.x = b = null; |
| a = null; |
| core.print(a); |
| } |
| // Function test_VariableDeclaration_single: () → void |
| function test_VariableDeclaration_single() { |
| let a = new core.List.from([]); |
| - dart.dput(a, 'length', 2); |
| - a.add(42); |
| + a[core.$length] = 2; |
| + a[core.$add](42); |
| core.print(a); |
| } |
| // Function test_VariableDeclaration_last: () → void |
| function test_VariableDeclaration_last() { |
| - let a = 42, b = new core.List.from([]); |
| - dart.dput(b, 'length', 2); |
| - b.add(a); |
| + let a = 42, b = ((_) => { |
|
Jennifer Messerly
2015/04/07 22:00:29
this is the one case that's now worse (multiple va
|
| + _[core.$length] = 2; |
| + _[core.$add](a); |
| + return _; |
| + })(new core.List.from([])); |
| core.print(b); |
| } |
| // Function test_VariableDeclaration_first: () → void |