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

Unified Diff: tests/language/gvn_interceptor_test.dart

Issue 10801008: Disable GVN for interceptors and fields. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 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 | « tests/language/gvn_field_access_test.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/language/gvn_interceptor_test.dart
diff --git a/tests/language/bind_test.dart b/tests/language/gvn_interceptor_test.dart
similarity index 54%
copy from tests/language/bind_test.dart
copy to tests/language/gvn_interceptor_test.dart
index e73f68e5514cb26527208fa3b2d1df8f3a145fe4..9e75f20f25acce73f379c1cb65aa2b0dd1de9ba4 100644
--- a/tests/language/bind_test.dart
+++ b/tests/language/gvn_interceptor_test.dart
@@ -2,13 +2,14 @@
// 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.
-class Bound {
- run() {
- return 42;
+foo(a, index) {
+ if (a.length < index) {
+ for (int i = a.length; i <= index; i++) a.add(i);
}
+ // dart2js was reusing the a.length from above.
+ return a[a.length - 1];
}
void main() {
- var runner = new Bound().run;
- Expect.equals(42, runner());
+ Expect.equals(3, foo([0], 3));
}
« no previous file with comments | « tests/language/gvn_field_access_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698