Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(178)

Side by Side Diff: tests/language/regress_21016_test.dart

Issue 598493003: Give up tracing of a function if one of its closurizations escapes tracing. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2014, 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 // Test that we give up on tracing a function if one of its closurizations
6 // escapes tracing.
7
8 class A {
9 var _boo = 22;
10 get boo {
11 return _boo;
12 return;
13 }
14 }
15
16 class B {
17 var _bar = 42;
18 get boo {
19 return _bar;
20 return;
21 }
22 }
23
24 class Holder {
25 tearMe(x) => x.boo;
26 }
27
28 var list = [];
29
30 main () {
31 var holder = new Holder();
32 var hide = ((X) => X)(holder.tearMe);
33 hide(new A());
34 list.add(holder.tearMe);
35 var x = list[0];
36 x(new B());
37 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698