| OLD | NEW |
| 1 // Expectation for test: | 1 // Expectation for test: |
| 2 // class Foo { | 2 // class Foo { |
| 3 // get getter { | 3 // get getter { |
| 4 // print('getter'); | 4 // print('getter'); |
| 5 // return (x) => x; | 5 // return (x) { try { return x; } finally { } }; // Inhibit inlining. |
| 6 // } | 6 // } |
| 7 // } | 7 // } |
| 8 // main(x) { | 8 // main(x) { |
| 9 // // Getter may or may not be inlined. |
| 9 // var notTearOff = new Foo().getter; | 10 // var notTearOff = new Foo().getter; |
| 11 // // Closure is not inlined. |
| 10 // print(notTearOff(123)); | 12 // print(notTearOff(123)); |
| 11 // } | 13 // } |
| 12 | 14 |
| 13 function(x) { | 15 function(x) { |
| 14 V.Foo$(); | 16 P.print(V.Foo$().get$getter().call$1(123)); |
| 15 P.print("getter"); | |
| 16 P.print(new V.Foo_getter_closure().call$1(123)); | |
| 17 } | 17 } |
| OLD | NEW |