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

Unified Diff: tests/language/no_such_method_dispatcher_test.dart

Issue 17571010: Reland: Optimizing noSuchMethod invocation with no arguments. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 6 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
« runtime/vm/code_generator.cc ('K') | « runtime/vm/resolver.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/language/no_such_method_dispatcher_test.dart
===================================================================
--- tests/language/no_such_method_dispatcher_test.dart (revision 24285)
+++ tests/language/no_such_method_dispatcher_test.dart (working copy)
@@ -10,14 +10,22 @@
noSuchMethod(m) {
return 123;
}
+ bar(x) => x + 1;
}
class B extends A { }
main() {
+ var a = new A();
+ for (var i = 0; i < 5000; ++i) Expect.equals(123, a.foo());
srdjan 2013/06/24 16:23:27 That may not trigger optimization. Safer and faste
Florian Schneider 2013/06/24 17:19:15 Done.
+ Expect.throws(() => (a.foo)());
+ Expect.equals("123", (a.foo).toString());
+
var b = new B();
- for (var i = 0; i < 5000; ++i) Expect.equals(123, b.foo());
- Expect.throws(() => (b.foo)());
- Expect.equals("123", (b.foo).toString());
+ for (var i = 0; i < 5000; ++i) {
srdjan 2013/06/24 16:23:27 ditto.
Florian Schneider 2013/06/24 17:19:15 Done.
+ Expect.equals(2, b.bar(1));
+ Expect.equals(123, b.bar());
+ Expect.equals(2, b.bar(1));
+ }
}
« runtime/vm/code_generator.cc ('K') | « runtime/vm/resolver.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698