OLD | NEW |
(Empty) | |
| 1 dart_library.library('language/cha_deopt3_test', null, /* Imports */[ |
| 2 'dart_sdk', |
| 3 'expect' |
| 4 ], function load__cha_deopt3_test(exports, dart_sdk, expect) { |
| 5 'use strict'; |
| 6 const core = dart_sdk.core; |
| 7 const _interceptors = dart_sdk._interceptors; |
| 8 const dart = dart_sdk.dart; |
| 9 const dartx = dart_sdk.dartx; |
| 10 const expect$ = expect.expect; |
| 11 const cha_deopt3_test = Object.create(null); |
| 12 const cha_deopt3_lib = Object.create(null); |
| 13 const cha_deopt3_deferred_lib = Object.create(null); |
| 14 let JSArrayOfObject = () => (JSArrayOfObject = dart.constFn(_interceptors.JSAr
ray$(core.Object)))(); |
| 15 let dynamicTodynamic = () => (dynamicTodynamic = dart.constFn(dart.definiteFun
ctionType(dart.dynamic, [dart.dynamic])))(); |
| 16 let VoidTodynamic = () => (VoidTodynamic = dart.constFn(dart.definiteFunctionT
ype(dart.dynamic, [])))(); |
| 17 cha_deopt3_test.loaded = false; |
| 18 cha_deopt3_test.main = function() { |
| 19 for (let i = 0; i < 2000; i++) |
| 20 cha_deopt3_test.bla(); |
| 21 expect$.Expect.equals(1, cha_deopt3_test.bla()); |
| 22 loadLibrary().then(dart.dynamic)(dart.fn(_ => { |
| 23 cha_deopt3_test.loaded = true; |
| 24 expect$.Expect.equals(1, cha_deopt3_test.bla()); |
| 25 }, dynamicTodynamic())); |
| 26 }; |
| 27 dart.fn(cha_deopt3_test.main, VoidTodynamic()); |
| 28 cha_deopt3_test.make_array = function() { |
| 29 try { |
| 30 if (dart.test(cha_deopt3_test.loaded)) { |
| 31 return [new cha_deopt3_lib.A(), new cha_deopt3_lib.B(), new cha_deopt3_l
ib.C(), new cha_deopt3_lib.D(), new cha_deopt3_lib.E(), cha_deopt3_deferred_lib.
make_u()]; |
| 32 } else { |
| 33 return JSArrayOfObject().of([new cha_deopt3_lib.A(), new cha_deopt3_lib.
B(), new cha_deopt3_lib.C(), new cha_deopt3_lib.D(), new cha_deopt3_lib.E(), new
cha_deopt3_lib.T()]); |
| 34 } |
| 35 } catch (e) { |
| 36 } |
| 37 |
| 38 }; |
| 39 dart.fn(cha_deopt3_test.make_array, VoidTodynamic()); |
| 40 cha_deopt3_test.bla = function() { |
| 41 let count = 0; |
| 42 for (let x of core.Iterable._check(cha_deopt3_test.make_array())) { |
| 43 if (cha_deopt3_lib.T.is(x)) count++; |
| 44 } |
| 45 return count; |
| 46 }; |
| 47 dart.fn(cha_deopt3_test.bla, VoidTodynamic()); |
| 48 cha_deopt3_lib.A = class A extends core.Object {}; |
| 49 cha_deopt3_lib.B = class B extends core.Object {}; |
| 50 cha_deopt3_lib.C = class C extends core.Object {}; |
| 51 cha_deopt3_lib.D = class D extends core.Object {}; |
| 52 cha_deopt3_lib.E = class E extends core.Object {}; |
| 53 cha_deopt3_lib.T = class T extends core.Object {}; |
| 54 cha_deopt3_deferred_lib.U = class U extends core.Object {}; |
| 55 cha_deopt3_deferred_lib.U[dart.implements] = () => [cha_deopt3_lib.T]; |
| 56 cha_deopt3_deferred_lib.make_u = function() { |
| 57 return new cha_deopt3_deferred_lib.U(); |
| 58 }; |
| 59 dart.fn(cha_deopt3_deferred_lib.make_u, VoidTodynamic()); |
| 60 // Exports: |
| 61 exports.cha_deopt3_test = cha_deopt3_test; |
| 62 exports.cha_deopt3_lib = cha_deopt3_lib; |
| 63 exports.cha_deopt3_deferred_lib = cha_deopt3_deferred_lib; |
| 64 }); |
OLD | NEW |