michael@0: // |jit-test| slow; error:InternalError michael@0: michael@0: // Binary: cache/js-dbg-64-a2bbe9c999b4-linux michael@0: // Flags: -m -n michael@0: // michael@0: gczeal(2); michael@0: function Day( t ) {} michael@0: function YearFromTime( t ) {} michael@0: function HourFromTime( t ) {} michael@0: function MakeTime( hour, min, sec, ms ) {} michael@0: function MakeDay( year, month, date ) {} michael@0: function MakeDate( day, time ) {} michael@0: function TimeClip( t ) { michael@0: return ToInteger( t ); michael@0: } michael@0: function ToInteger( t ) { michael@0: sign = 1 michael@0: return sign * Math.floor( Math.abs( t ) ); michael@0: } michael@0: addNewTestCase( 28800000, 23, 59, 999,0, "TDATE = new Date(28800000);(TDATE).setHours(23,59,999);TDATE" ); michael@0: function addNewTestCase( time, hours, min, sec, ms, DateString) { michael@0: UTCDateFromTime( SetHours( time, hours, min, sec, ms )) michael@0: } michael@0: function MyDate() this.seconds=0;function UTCDateFromTime(t) { michael@0: MyDateFromTime(t) michael@0: } michael@0: function MyDateFromTime( t ) { michael@0: d = new MyDate michael@0: d.year=YearFromTime(t) michael@0: d.month= michael@0: d.date= michael@0: d.hours=HourFromTime(t) michael@0: d.minutes= michael@0: d.time=MakeTime( d.hours, d, d.seconds, d ) michael@0: d=TimeClip( MakeDate( MakeDay( d.year, d.month, ( ( MyDateFromTime(t) ) , null ) ), d.time ) ) michael@0: } michael@0: function SetHours( t, hour, min, sec, ms ) { michael@0: TIME = michael@0: HOUR = michael@0: MIN = min == 0 ? TIME : michael@0: SEC = sec == 0 ? addNewTestCaseSecFromTime : Number michael@0: var MS = ms == void 0 ? TIME : ms; michael@0: var RESULT6 = ( HOUR, MS ); michael@0: var UTC_TIME = MakeDate(Day(TIME), RESULT6); michael@0: return TimeClip(UTC_TIME); michael@0: }