OLD | NEW |
(Empty) | |
| 1 dart_library.library('language/liveness_test', null, /* Imports */[ |
| 2 'dart_sdk', |
| 3 'expect' |
| 4 ], function load__liveness_test(exports, dart_sdk, expect) { |
| 5 'use strict'; |
| 6 const core = dart_sdk.core; |
| 7 const dart = dart_sdk.dart; |
| 8 const dartx = dart_sdk.dartx; |
| 9 const expect$ = expect.expect; |
| 10 const liveness_test = Object.create(null); |
| 11 let dynamicTodynamic = () => (dynamicTodynamic = dart.constFn(dart.definiteFun
ctionType(dart.dynamic, [dart.dynamic])))(); |
| 12 let VoidTodynamic = () => (VoidTodynamic = dart.constFn(dart.definiteFunctionT
ype(dart.dynamic, [])))(); |
| 13 liveness_test.foo = function(x) { |
| 14 let y = x; |
| 15 for (let i = 0; i < 10; i++) { |
| 16 x = dart.dsend(x, '+', 1); |
| 17 } |
| 18 return y; |
| 19 }; |
| 20 dart.fn(liveness_test.foo, dynamicTodynamic()); |
| 21 liveness_test.main = function() { |
| 22 expect$.Expect.equals(499, liveness_test.foo(499)); |
| 23 }; |
| 24 dart.fn(liveness_test.main, VoidTodynamic()); |
| 25 // Exports: |
| 26 exports.liveness_test = liveness_test; |
| 27 }); |
OLD | NEW |