OLD | NEW |
1 dart_library.library('DeltaBlue', null, /* Imports */[ | 1 dart_library.library('DeltaBlue', null, /* Imports */[ |
2 'dart_sdk' | 2 'dart_sdk' |
3 ], function(exports, dart_sdk) { | 3 ], function(exports, dart_sdk) { |
4 'use strict'; | 4 'use strict'; |
5 const core = dart_sdk.core; | 5 const core = dart_sdk.core; |
6 const dart = dart_sdk.dart; | 6 const dart = dart_sdk.dart; |
7 const dartx = dart_sdk.dartx; | 7 const dartx = dart_sdk.dartx; |
8 const DeltaBlue$ = Object.create(null); | 8 const DeltaBlue$ = Object.create(null); |
9 const BenchmarkBase$ = Object.create(null); | 9 const BenchmarkBase$ = Object.create(null); |
10 DeltaBlue$.main = function() { | 10 DeltaBlue$.main = function() { |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
74 super.BenchmarkBase("DeltaBlue"); | 74 super.BenchmarkBase("DeltaBlue"); |
75 } | 75 } |
76 run() { | 76 run() { |
77 DeltaBlue$.chainTest(100); | 77 DeltaBlue$.chainTest(100); |
78 DeltaBlue$.projectionTest(100); | 78 DeltaBlue$.projectionTest(100); |
79 } | 79 } |
80 }; | 80 }; |
81 dart.setSignature(DeltaBlue$.DeltaBlue, { | 81 dart.setSignature(DeltaBlue$.DeltaBlue, { |
82 constructors: () => ({DeltaBlue: [DeltaBlue$.DeltaBlue, []]}) | 82 constructors: () => ({DeltaBlue: [DeltaBlue$.DeltaBlue, []]}) |
83 }); | 83 }); |
| 84 let const$; |
84 DeltaBlue$.Strength = class Strength extends core.Object { | 85 DeltaBlue$.Strength = class Strength extends core.Object { |
85 Strength(value, name) { | 86 Strength(value, name) { |
86 this.value = value; | 87 this.value = value; |
87 this.name = name; | 88 this.name = name; |
88 } | 89 } |
89 nextWeaker() { | 90 nextWeaker() { |
90 return dart.const(dart.list([DeltaBlue$.STRONG_PREFERRED, DeltaBlue$.PREFE
RRED, DeltaBlue$.STRONG_DEFAULT, DeltaBlue$.NORMAL, DeltaBlue$.WEAK_DEFAULT, Del
taBlue$.WEAKEST], DeltaBlue$.Strength))[dartx.get](this.value); | 91 return (const$ || (const$ = dart.const(dart.list([DeltaBlue$.STRONG_PREFER
RED, DeltaBlue$.PREFERRED, DeltaBlue$.STRONG_DEFAULT, DeltaBlue$.NORMAL, DeltaBl
ue$.WEAK_DEFAULT, DeltaBlue$.WEAKEST], DeltaBlue$.Strength))))[dartx.get](this.v
alue); |
91 } | 92 } |
92 static stronger(s1, s2) { | 93 static stronger(s1, s2) { |
93 return dart.notNull(s1.value) < dart.notNull(s2.value); | 94 return dart.notNull(s1.value) < dart.notNull(s2.value); |
94 } | 95 } |
95 static weaker(s1, s2) { | 96 static weaker(s1, s2) { |
96 return dart.notNull(s1.value) > dart.notNull(s2.value); | 97 return dart.notNull(s1.value) > dart.notNull(s2.value); |
97 } | 98 } |
98 static weakest(s1, s2) { | 99 static weakest(s1, s2) { |
99 return dart.notNull(DeltaBlue$.Strength.weaker(s1, s2)) ? s1 : s2; | 100 return dart.notNull(DeltaBlue$.Strength.weaker(s1, s2)) ? s1 : s2; |
100 } | 101 } |
(...skipping 496 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
597 statics: () => ({ | 598 statics: () => ({ |
598 equals: [dart.void, [dart.dynamic, dart.dynamic]], | 599 equals: [dart.void, [dart.dynamic, dart.dynamic]], |
599 listEquals: [dart.void, [core.List, core.List]] | 600 listEquals: [dart.void, [core.List, core.List]] |
600 }), | 601 }), |
601 names: ['equals', 'listEquals'] | 602 names: ['equals', 'listEquals'] |
602 }); | 603 }); |
603 // Exports: | 604 // Exports: |
604 exports.DeltaBlue = DeltaBlue$; | 605 exports.DeltaBlue = DeltaBlue$; |
605 exports.BenchmarkBase = BenchmarkBase$; | 606 exports.BenchmarkBase = BenchmarkBase$; |
606 }); | 607 }); |
OLD | NEW |