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

Unified Diff: test/codegen/dir/html_input_d.dart

Issue 973433003: Initial cut for a development server (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Created 5 years, 10 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 | « test/codegen/dir/html_input_b.dart ('k') | test/codegen/expect/dir/html_input_b.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/codegen/dir/html_input_d.dart
diff --git a/test/codegen/dir/html_input_d.dart b/test/codegen/dir/html_input_d.dart
index a3bd8be6f3e0e6fabde4367480807aff2f0e980a..e917cc2dab1d5739de961133dd4ec0fef3536afc 100644
--- a/test/codegen/dir/html_input_d.dart
+++ b/test/codegen/dir/html_input_d.dart
@@ -4,11 +4,14 @@
library html_input_d;
-int fib(int n) => _fib(n, new Map<int, int>());
-
-int _fib(int n, Map<int, int> seen) {
- if (n == 0 || n == 1) return 1;
- if (seen[n] != null) return seen[n];
- seen[n] = _fib(n - 1, seen) + _fib(n - 2, seen);
- return seen[n];
-}
+int fib(int n) => n == 0 || n == 1 ? 1 : fib(n - 1) + fib(n - 2);
+
+// TODO(sigmund): uncomment once core.Map is supported.
+//int fib(int n) => _fib(n, new Map<int, int>());
+
+//int _fib(int n, Map<int, int> seen) {
+// if (n == 0 || n == 1) return 1;
+// if (seen[n] != null) return seen[n];
+// seen[n] = _fib(n - 1, seen) + _fib(n - 2, seen);
+// return seen[n];
+//}
« no previous file with comments | « test/codegen/dir/html_input_b.dart ('k') | test/codegen/expect/dir/html_input_b.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698