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

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

michael@0 1 // |jit-test| slow;
michael@0 2
michael@0 3 // Binary: cache/js-dbg-64-fb23c30e3d60-linux
michael@0 4 // Flags: -m -n -a
michael@0 5 //
michael@0 6 function TestCase(n, d, e, a)
michael@0 7 TestCase.prototype.dump = function () {
michael@0 8 }
michael@0 9 var lfcode = new Array();
michael@0 10 lfcode.push("2");
michael@0 11 lfcode.push("var lfcode = new Array();\
michael@0 12 lfcode.push(\"gczeal(4,1);\");\
michael@0 13 while (true) {\
michael@0 14 var file = lfcode.shift(); if (file == ((0Xa ) . shift )) { break; }\
michael@0 15 eval(file);\
michael@0 16 }\
michael@0 17 ");
michael@0 18 lfcode.push("function testJSON(str, expectSyntaxError)\
michael@0 19 ");
michael@0 20 lfcode.push("1");
michael@0 21 lfcode.push("Number.prototype.toString = function() { return 3; };\
michael@0 22 assertEq(JSON.stringify({ 3: 3, 4: 4 }, [(this . abstract )]),\
michael@0 23 '{\"3\":3}');\
michael@0 24 ");
michael@0 25 lfcode.push("var HoursPerDay = 24;\
michael@0 26 var MinutesPerHour = 60;\
michael@0 27 var SecondsPerMinute = 60;\
michael@0 28 var msPerSecond = 1000;\
michael@0 29 var msPerMinute = 60000;\
michael@0 30 var TZ_ADJUST = TZ_DIFF * msPerHour;\
michael@0 31 var PST_DIFF = TZ_DIFF - TZ_PST;\
michael@0 32 var PST_ADJUST = TZ_PST * msPerHour;\
michael@0 33 var TIME_0000 = (function ()\
michael@0 34 {\
michael@0 35 var TIME_1970 = 0;\
michael@0 36 var TIME_1900 = -2208988800000;\
michael@0 37 var UTC_FEB_29_2000 = TIME_2000 + 31*msPerDay + 28*msPerDay;\
michael@0 38 var UTC_JAN_1_2005 = TIME_2000 + TimeInYear(2000) + TimeInYear(2001) +\
michael@0 39 TimeInYear(2002) + TimeInYear(2003) + TimeInYear(2004);\
michael@0 40 var TIME_NOW = now.valueOf();\
michael@0 41 function getTimeZoneDiff()\
michael@0 42 {\
michael@0 43 return -((new Date(2000, 1, 1)).getTimezoneOffset())/60;\
michael@0 44 function adjustResultArray(ResultArray, msMode)\
michael@0 45 ResultArray[UTC_HOURS] = HourFromTime(t);\
michael@0 46 ResultArray[UTC_DATE] = DateFromTime(t);\
michael@0 47 ResultArray[UTC_MONTH] = MonthFromTime(t);\
michael@0 48 ResultArray[UTC_YEAR] = YearFromTime(t);\
michael@0 49 function DaysInYear( y ) {\
michael@0 50 return \"ERROR: DaysInYear(\" + y + \") case not covered\";\
michael@0 51 function DayNumber( t ) {\
michael@0 52 function TimeWithinDay( t ) {\
michael@0 53 function YearNumber( t ) {\
michael@0 54 function TimeFromYear( y ) {\
michael@0 55 function InLeapYear( t ) {\
michael@0 56 return \"ERROR: InLeapYear(\"+ t + \") case not covered\";\
michael@0 57 for ( var timeToTimeZero = t; ; ) {\
michael@0 58 return \"ERROR: MonthFromTime(\"+t+\") not known\";\
michael@0 59 function DayWithinYear( t ) {\
michael@0 60 return( Day(t) - DayFromYear(YearFromTime(t)));\
michael@0 61 ");
michael@0 62 lfcode.push("this.__proto__ = []; \
michael@0 63 let ( _ = this ) Boolean (\"({ set x([, b, c]) { } })\");\
michael@0 64 ");
michael@0 65 while (true) {
michael@0 66 var file = lfcode.shift(); if (file == undefined) { break; }
michael@0 67 if (file == "evaluate") {
michael@0 68 } else {
michael@0 69 loadFile(file);
michael@0 70 }
michael@0 71 }
michael@0 72 function loadFile(lfVarx) {
michael@0 73 try {
michael@0 74 if (lfVarx.substr(-3) == ".js") {
michael@0 75 } else if (!isNaN(lfVarx)) {
michael@0 76 lfRunTypeId = parseInt(lfVarx);
michael@0 77 } else {
michael@0 78 switch (lfRunTypeId) {
michael@0 79 case 1: eval(lfVarx); break;
michael@0 80 case 2: new Function(lfVarx)(); break;
michael@0 81 }
michael@0 82 }
michael@0 83 } catch (lfVare) { }
michael@0 84 }

mercurial