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

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

Issue 1043003002: keep mixin and interface implementation info at runtime (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 dart.defineNamedConstructor(MutableRectangle, 'fromPoints'); 194 dart.defineNamedConstructor(MutableRectangle, 'fromPoints');
194 return MutableRectangle; 195 return MutableRectangle;
195 }); 196 });
196 let MutableRectangle = MutableRectangle$(dart.dynamic); 197 let MutableRectangle = MutableRectangle$(dart.dynamic);
197 // Function _clampToZero: (num) → num 198 // Function _clampToZero: (num) → num
198 function _clampToZero(value) { 199 function _clampToZero(value) {
199 dart.assert(dart.notNull(value) < 0); 200 dart.assert(dart.notNull(value) < 0);
200 return -dart.notNull(value) * 0; 201 return -dart.notNull(value) * 0;
201 } 202 }
202 let E = 2.718281828459045; 203 let E = 2.718281828459045;
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
309 } 310 }
310 return Math.random() * max >>> 0; 311 return Math.random() * max >>> 0;
311 } 312 }
312 nextDouble() { 313 nextDouble() {
313 return Math.random(); 314 return Math.random();
314 } 315 }
315 nextBool() { 316 nextBool() {
316 return Math.random() < 0.5; 317 return Math.random() < 0.5;
317 } 318 }
318 } 319 }
320 _JSRandom[dart.implements] = [Random];
319 let _lo = Symbol('_lo'); 321 let _lo = Symbol('_lo');
320 let _hi = Symbol('_hi'); 322 let _hi = Symbol('_hi');
321 let _MASK32 = Symbol('_MASK32'); 323 let _MASK32 = Symbol('_MASK32');
322 let _nextState = Symbol('_nextState'); 324 let _nextState = Symbol('_nextState');
323 let _POW2_27_D = Symbol('_POW2_27_D'); 325 let _POW2_27_D = Symbol('_POW2_27_D');
324 let _POW2_53_D = Symbol('_POW2_53_D'); 326 let _POW2_53_D = Symbol('_POW2_53_D');
325 class _Random extends core.Object { 327 class _Random extends core.Object {
326 _Random(seed) { 328 _Random(seed) {
327 this[_lo] = 0; 329 this[_lo] = 0;
328 this[_hi] = 0; 330 this[_hi] = 0;
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
413 let bits26 = dart.notNull(this[_lo]) & (1 << 26) - 1; 415 let bits26 = dart.notNull(this[_lo]) & (1 << 26) - 1;
414 this[_nextState](); 416 this[_nextState]();
415 let bits27 = dart.notNull(this[_lo]) & (1 << 27) - 1; 417 let bits27 = dart.notNull(this[_lo]) & (1 << 27) - 1;
416 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]);
417 } 419 }
418 nextBool() { 420 nextBool() {
419 this[_nextState](); 421 this[_nextState]();
420 return (dart.notNull(this[_lo]) & 1) === 0; 422 return (dart.notNull(this[_lo]) & 1) === 0;
421 } 423 }
422 } 424 }
425 _Random[dart.implements] = [Random];
423 _Random._POW2_53_D = 1.0 * 9007199254740992; 426 _Random._POW2_53_D = 1.0 * 9007199254740992;
424 _Random._POW2_27_D = 1.0 * (1 << 27); 427 _Random._POW2_27_D = 1.0 * (1 << 27);
425 _Random._MASK32 = 4294967295; 428 _Random._MASK32 = 4294967295;
426 // Exports: 429 // Exports:
427 exports.Point = Point; 430 exports.Point = Point;
428 exports.Point$ = Point$; 431 exports.Point$ = Point$;
429 exports.Random = Random; 432 exports.Random = Random;
430 exports.Rectangle = Rectangle; 433 exports.Rectangle = Rectangle;
431 exports.Rectangle$ = Rectangle$; 434 exports.Rectangle$ = Rectangle$;
432 exports.MutableRectangle = MutableRectangle; 435 exports.MutableRectangle = MutableRectangle;
(...skipping 13 matching lines...) Expand all
446 exports.sin = sin; 449 exports.sin = sin;
447 exports.cos = cos; 450 exports.cos = cos;
448 exports.tan = tan; 451 exports.tan = tan;
449 exports.acos = acos; 452 exports.acos = acos;
450 exports.asin = asin; 453 exports.asin = asin;
451 exports.atan = atan; 454 exports.atan = atan;
452 exports.sqrt = sqrt; 455 exports.sqrt = sqrt;
453 exports.exp = exp; 456 exports.exp = exp;
454 exports.log = log; 457 exports.log = log;
455 })(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