js/src/jit-test/tests/auto-regress/bug687125.js

Thu, 22 Jan 2015 13:21:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 22 Jan 2015 13:21:57 +0100
branch
TOR_BUG_9701
changeset 15
b8a032363ba2
permissions
-rw-r--r--

Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6

michael@0 1 // Binary: cache/js-dbg-64-f3f5d8a8a473-linux
michael@0 2 // Flags: -m -n
michael@0 3 //
michael@0 4
michael@0 5 function MakeDay( year, month, date ) {
michael@0 6 date = ToInteger(date );
michael@0 7 var t = ( year < 1970 ) ? 1 : 0;
michael@0 8 return ( (Math.floor(t/86400000)) + date - 1 );
michael@0 9 }
michael@0 10 function MakeDate( day, time ) {
michael@0 11 if ( day == Number.POSITIVE_INFINITY || day == Number.NEGATIVE_INFINITY ) { }
michael@0 12 }
michael@0 13 function ToInteger( t ) {
michael@0 14 var sign = ( t < 0 ) ? -1 : 1;
michael@0 15 return ( sign * Math.floor( Math.abs( t ) ) );
michael@0 16 }
michael@0 17 var UTCDate = MyDateFromTime( Number("946684800000") );
michael@0 18 function MyDate() {
michael@0 19 this.date = 0;
michael@0 20 }
michael@0 21 function MyDateFromTime( t ) {
michael@0 22 var d = new MyDate();
michael@0 23 d.value = ToInteger( MakeDate( MakeDay( d.year, d.month, d.date ), d.time ) );
michael@0 24 var i = 0; while (Uint32Array && i < 10000) { ++i; if (0 == 100000) return; }
michael@0 25 }

mercurial