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

Unified Diff: tests/standalone/slowpath_safepoints_test.dart

Issue 375693004: Don't assign safepoint at the definition to the definition's live-range. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 5 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 | « runtime/vm/locations.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/standalone/slowpath_safepoints_test.dart
diff --git a/tests/standalone/slowpath_safepoints_test.dart b/tests/standalone/slowpath_safepoints_test.dart
new file mode 100644
index 0000000000000000000000000000000000000000..254ad7605b05db2a42e8089e537cb4dedf189dd0
--- /dev/null
+++ b/tests/standalone/slowpath_safepoints_test.dart
@@ -0,0 +1,49 @@
+// 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 safepoints associated with slowpaths don't mark non-existing values
+// alive.
+// VMOptions=--optimization-counter-threshold=5 --no-inline_alloc --gc_at_instance_allocation=_Double
+
+class C {
+ final next;
+ C(this.next);
+}
+
+
+noop(a1, a2, a3, a4, a5, a6, a7, a8, a9) => 0;
+
+crash(f, i) {
+ final obj1 = new C(null);
+ final obj2 = new C(obj1);
+ final obj3 = new C(obj2);
+ final obj4 = new C(obj3);
+ final obj5 = new C(obj4);
+ final obj6 = new C(obj5);
+ final obj7 = new C(obj6);
+ final obj8 = new C(obj7);
+ final obj9 = new C(obj8);
+
+ f(obj1, obj2, obj3, obj4, obj5, obj6, obj7, obj8, obj9);
+ f(obj1, obj2, obj3, obj4, obj5, obj6, obj7, obj8, obj9);
+
+ final d1 = (i + 0).toDouble();
+ final d2 = (i + 1).toDouble();
+ final d3 = (i + 2).toDouble();
+ final d4 = (i + 3).toDouble();
+ final d5 = (i + 4).toDouble();
+ final d6 = (i + 5).toDouble();
+ final d7 = (i + 6).toDouble();
+ final d8 = (i + 7).toDouble();
+ final d9 = (i + 8).toDouble();
+
+ f(d1, d2, d3, d4, d5, d6, d7, d8, d9);
+ f(d1, d2, d3, d4, d5, d6, d7, d8, d9);
+}
+
+main() {
+ for (var i = 0; i < 10; i++) {
+ print(i);
+ crash(noop, 10);
+ }
+}
« no previous file with comments | « runtime/vm/locations.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698