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

Side by Side Diff: lib/runtime/dart/math.js

Issue 1047203002: compute interfaces lazily (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Created 5 years, 8 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
« no previous file with comments | « lib/runtime/dart/isolate.js ('k') | lib/runtime/dart/typed_data.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 var math; 1 var math;
2 (function(exports) { 2 (function(exports) {
3 'use strict'; 3 'use strict';
4 class _JenkinsSmiHash extends core.Object { 4 class _JenkinsSmiHash extends core.Object {
5 static combine(hash, value) { 5 static combine(hash, value) {
6 hash = 536870911 & dart.notNull(hash) + dart.notNull(value); 6 hash = 536870911 & dart.notNull(hash) + dart.notNull(value);
7 hash = 536870911 & dart.notNull(hash) + ((524287 & dart.notNull(hash)) << 10); 7 hash = 536870911 & dart.notNull(hash) + ((524287 & dart.notNull(hash)) << 10);
8 return dart.notNull(hash) ^ dart.notNull(hash) >> 6; 8 return dart.notNull(hash) ^ dart.notNull(hash) >> 6;
9 } 9 }
10 static finish(hash) { 10 static finish(hash) {
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 } 183 }
184 get height() { 184 get height() {
185 return this[_height]; 185 return this[_height];
186 } 186 }
187 set height(height) { 187 set height(height) {
188 if (height['<'](0)) 188 if (height['<'](0))
189 height = dart.as(_clampToZero(height), T); 189 height = dart.as(_clampToZero(height), T);
190 this[_height] = height; 190 this[_height] = height;
191 } 191 }
192 } 192 }
193 MutableRectangle[dart.implements] = [Rectangle$(T)]; 193 MutableRectangle[dart.implements] = () => [Rectangle$(T)];
194 dart.defineNamedConstructor(MutableRectangle, 'fromPoints'); 194 dart.defineNamedConstructor(MutableRectangle, 'fromPoints');
195 return MutableRectangle; 195 return MutableRectangle;
196 }); 196 });
197 let MutableRectangle = MutableRectangle$(dart.dynamic); 197 let MutableRectangle = MutableRectangle$(dart.dynamic);
198 // Function _clampToZero: (num) → num 198 // Function _clampToZero: (num) → num
199 function _clampToZero(value) { 199 function _clampToZero(value) {
200 dart.assert(dart.notNull(value) < 0); 200 dart.assert(dart.notNull(value) < 0);
201 return -dart.notNull(value) * 0; 201 return -dart.notNull(value) * 0;
202 } 202 }
203 let E = 2.718281828459045; 203 let E = 2.718281828459045;
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
310 } 310 }
311 return Math.random() * max >>> 0; 311 return Math.random() * max >>> 0;
312 } 312 }
313 nextDouble() { 313 nextDouble() {
314 return Math.random(); 314 return Math.random();
315 } 315 }
316 nextBool() { 316 nextBool() {
317 return Math.random() < 0.5; 317 return Math.random() < 0.5;
318 } 318 }
319 } 319 }
320 _JSRandom[dart.implements] = [Random]; 320 _JSRandom[dart.implements] = () => [Random];
321 let _lo = Symbol('_lo'); 321 let _lo = Symbol('_lo');
322 let _hi = Symbol('_hi'); 322 let _hi = Symbol('_hi');
323 let _MASK32 = Symbol('_MASK32'); 323 let _MASK32 = Symbol('_MASK32');
324 let _nextState = Symbol('_nextState'); 324 let _nextState = Symbol('_nextState');
325 let _POW2_27_D = Symbol('_POW2_27_D'); 325 let _POW2_27_D = Symbol('_POW2_27_D');
326 let _POW2_53_D = Symbol('_POW2_53_D'); 326 let _POW2_53_D = Symbol('_POW2_53_D');
327 class _Random extends core.Object { 327 class _Random extends core.Object {
328 _Random(seed) { 328 _Random(seed) {
329 this[_lo] = 0; 329 this[_lo] = 0;
330 this[_hi] = 0; 330 this[_hi] = 0;
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
415 let bits26 = dart.notNull(this[_lo]) & (1 << 26) - 1; 415 let bits26 = dart.notNull(this[_lo]) & (1 << 26) - 1;
416 this[_nextState](); 416 this[_nextState]();
417 let bits27 = dart.notNull(this[_lo]) & (1 << 27) - 1; 417 let bits27 = dart.notNull(this[_lo]) & (1 << 27) - 1;
418 return (dart.notNull(bits26) * dart.notNull(_Random[_POW2_27_D]) + dart.no tNull(bits27)) / dart.notNull(_Random[_POW2_53_D]); 418 return (dart.notNull(bits26) * dart.notNull(_Random[_POW2_27_D]) + dart.no tNull(bits27)) / dart.notNull(_Random[_POW2_53_D]);
419 } 419 }
420 nextBool() { 420 nextBool() {
421 this[_nextState](); 421 this[_nextState]();
422 return (dart.notNull(this[_lo]) & 1) == 0; 422 return (dart.notNull(this[_lo]) & 1) == 0;
423 } 423 }
424 } 424 }
425 _Random[dart.implements] = [Random]; 425 _Random[dart.implements] = () => [Random];
426 _Random._POW2_53_D = 1.0 * 9007199254740992; 426 _Random._POW2_53_D = 1.0 * 9007199254740992;
427 _Random._POW2_27_D = 1.0 * (1 << 27); 427 _Random._POW2_27_D = 1.0 * (1 << 27);
428 _Random._MASK32 = 4294967295; 428 _Random._MASK32 = 4294967295;
429 // Exports: 429 // Exports:
430 exports.Point = Point; 430 exports.Point = Point;
431 exports.Point$ = Point$; 431 exports.Point$ = Point$;
432 exports.Random = Random; 432 exports.Random = Random;
433 exports.Rectangle = Rectangle; 433 exports.Rectangle = Rectangle;
434 exports.Rectangle$ = Rectangle$; 434 exports.Rectangle$ = Rectangle$;
435 exports.MutableRectangle = MutableRectangle; 435 exports.MutableRectangle = MutableRectangle;
(...skipping 13 matching lines...) Expand all
449 exports.sin = sin; 449 exports.sin = sin;
450 exports.cos = cos; 450 exports.cos = cos;
451 exports.tan = tan; 451 exports.tan = tan;
452 exports.acos = acos; 452 exports.acos = acos;
453 exports.asin = asin; 453 exports.asin = asin;
454 exports.atan = atan; 454 exports.atan = atan;
455 exports.sqrt = sqrt; 455 exports.sqrt = sqrt;
456 exports.exp = exp; 456 exports.exp = exp;
457 exports.log = log; 457 exports.log = log;
458 })(math || (math = {})); 458 })(math || (math = {}));
OLDNEW
« no previous file with comments | « lib/runtime/dart/isolate.js ('k') | lib/runtime/dart/typed_data.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698