js/src/jit-test/tests/ion/bug909401.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 var TZ_PST = -8;
michael@0 2 var TZ_DIFF = GetTimezoneOffset();
michael@0 3 var PST_DIFF = TZ_DIFF - TZ_PST;
michael@0 4 function GetTimezoneOffset() {}
michael@0 5 function adjustResultArray(ResultArray) {
michael@0 6 var t = ResultArray[TIME] - PST_DIFF;
michael@0 7 ResultArray[UTC_YEAR] = YearFromTime(t);
michael@0 8 }
michael@0 9 function TimeInYear( y ) {}
michael@0 10 function YearFromTime( t ) {
michael@0 11 var sign = ( t < 0 ) ? -1 : 1;
michael@0 12 var year = ( sign < 0 ) ? 1969 : 1970;
michael@0 13 for ( var timeToTimeZero = t; ; ) {
michael@0 14 timeToTimeZero -= sign * TimeInYear(year)
michael@0 15 break;
michael@0 16 }
michael@0 17 return ( year );
michael@0 18 }
michael@0 19 gczeal(4);
michael@0 20 evaluate("\
michael@0 21 var TIME = 0;\
michael@0 22 var UTC_YEAR = 1;\
michael@0 23 adjustResultArray([]);\
michael@0 24 adjustResultArray([946684800000-1]);\
michael@0 25 adjustResultArray([]);\
michael@0 26 ", { noScriptRval : true });

mercurial