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

Side by Side Diff: test/codegen/expect/html_input_d/html_input_d.js

Issue 949383003: use js_ast instead of strings to generate JS (Closed) Base URL: git@github.com:dart-lang/dart-dev-compiler.git@master
Patch Set: add redirecting ctor test Created 5 years, 9 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 unified diff | Download patch
OLDNEW
1 var html_input_d; 1 var html_input_d;
2 (function (html_input_d) { 2 (function(html_input_d) {
3 'use strict'; 3 'use strict';
4 // Function fib: (int) → int 4 // Function fib: (int) → int
5 function fib(n) { return _fib(n, new core.Map()); } 5 function fib(n) {
6 6 return _fib(n, new core.Map());
7 }
7 // Function _fib: (int, Map<int, int>) → int 8 // Function _fib: (int, Map<int, int>) → int
8 function _fib(n, seen) { 9 function _fib(n, seen) {
9 if (dart.notNull(n === 0) || dart.notNull(n === 1)) return 1; 10 if (dart.notNull(n === 0) || dart.notNull(n === 1))
10 if (seen.get(n) !== null) return seen.get(n); 11 return 1;
12 if (seen.get(n) !== null)
13 return seen.get(n);
11 seen.set(n, _fib(n - 1, seen) + _fib(n - 2, seen)); 14 seen.set(n, _fib(n - 1, seen) + _fib(n - 2, seen));
12 return seen.get(n); 15 return seen.get(n);
13 } 16 }
14
15 // Exports: 17 // Exports:
16 html_input_d.fib = fib; 18 html_input_d.fib = fib;
17 })(html_input_d || (html_input_d = {})); 19 })(html_input_d || (html_input_d = {}));
OLDNEW
« no previous file with comments | « test/codegen/expect/html_input_c/html_input_c.js ('k') | test/codegen/expect/html_input_e/html_input_e.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698