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

Unified Diff: tests/language/gvn_field_access_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 | « lib/compiler/implementation/ssa/nodes.dart ('k') | tests/language/gvn_interceptor_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/language/gvn_field_access_test.dart
diff --git a/tests/language/bind_test.dart b/tests/language/gvn_field_access_test.dart
similarity index 51%
copy from tests/language/bind_test.dart
copy to tests/language/gvn_field_access_test.dart
index e73f68e5514cb26527208fa3b2d1df8f3a145fe4..79359f2279d511550925dac859c60fb953fce079 100644
--- a/tests/language/bind_test.dart
+++ b/tests/language/gvn_field_access_test.dart
@@ -2,13 +2,18 @@
// 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;
+class A {
+ var y = 0;
+ foo(x) {
+ var t = this.y;
+ if (t < x) {
+ for (int i = this.y; i < x; i++) y++;
+ }
+ // dart2js was reusing the 't' from above.
+ return this.y;
}
}
void main() {
- var runner = new Bound().run;
- Expect.equals(42, runner());
+ Expect.equals(3, new A().foo(3));
}
« no previous file with comments | « lib/compiler/implementation/ssa/nodes.dart ('k') | tests/language/gvn_interceptor_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698