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

Unified 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: Change test to pass the analyzer. 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sdk/lib/_internal/compiler/implementation/inferrer/type_graph_inferrer.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/language/regress_21016_test.dart
diff --git a/tests/language/regress_21016_test.dart b/tests/language/regress_21016_test.dart
new file mode 100644
index 0000000000000000000000000000000000000000..1d9d071e4c8224628a48c2498d01575eec347fb1
--- /dev/null
+++ b/tests/language/regress_21016_test.dart
@@ -0,0 +1,37 @@
+// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// Test that we give up on tracing a function if one of its closurizations
+// escapes tracing.
+
+class A {
+ var _boo = 22;
+ get boo {
+ return _boo;
+ return 1;
+ }
+}
+
+class B {
+ var _bar = 42;
+ get boo {
+ return _bar;
+ return 1;
+ }
+}
+
+class Holder {
+ tearMe(x) => x.boo;
+}
+
+var list = [];
+
+main () {
+ var holder = new Holder();
+ var hide = ((X) => X)(holder.tearMe);
+ hide(new A());
+ list.add(holder.tearMe);
+ var x = list[0];
+ x(new B());
+}
« no previous file with comments | « sdk/lib/_internal/compiler/implementation/inferrer/type_graph_inferrer.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698