Debian Codegraph @

js/src/jit-test/tests/baseline/bug852801.js

raw
1 // |jit-test| allow-oom; allow-unhandlable-oom
2 var STATUS = "STATUS: ";
3 var callStack = new Array();
4 function startTest() { }
5 function TestCase(n, d, e, a) {
6 this.name = n;
7 }
8 TestCase.prototype.dump = function () {};
9 TestCase.prototype.testPassed = (function TestCase_testPassed() { return this.passed; });
10 TestCase.prototype.testFailed = (function TestCase_testFailed() { return !this.passed; });
11 function printStatus (msg) {
12 var lines = msg.split ("\n");
13 for (var i=0; i<lines.length; i++)
14 print (STATUS + lines[i]);
15 }
16 function printBugNumber (num) {}
17 function toPrinted(value) {
18 return function escapeString (str) {};
19 }
20 function reportCompare (expected, actual, description) {
21 var actual_t = typeof actual;
22 var output = "";
23 printStatus (
24 "Expected value '"
25 + toPrinted(expected)
26 + toPrinted(actual)
27 );
28 var testcase = new TestCase("unknown-test-name", description, expected, actual);
29 testcase.reason = output;
30 if (typeof document != "object" || !document.location.href.match(/jsreftest.html/)) {
31 if (testcase.passed) { }
32 }
33 return testcase.passed;
34 }
35 function reportMatch (expectedRegExp, actual, description) {}
36 function enterFunc (funcName) {
37 return function BigO(data) {
38 function LinearRegression(data) { }
39 };
40 }
41 function compareSource(expect, actual, summary) {}
42 function optionsInit() {
43 var optionNames = options().split(',');
44 }
45 function optionsClear() {}
46 function optionsPush() {}
47 optionsInit();
48 optionsClear();
49 function getTestCaseResult(expected, actual) {
50 return function test() {
51 for ( gTc=0; gTc < gTestcases.length; gTc++ ) {}
52 };
53 }
54 var lfcode = new Array();
55 lfcode.push("4");
56 lfcode.push("gcparam(\"maxBytes\", gcparam(\"gcBytes\") + 1024);");
57 lfcode.push("");
58 lfcode.push("\
59 var UBound = 0;\n\
60 var BUGNUMBER = 74474;\n\
61 var actual = '';\n\
62 var actualvalues = [ ];\n\
63 var expectedvalues = [ ];\n\
64 addThis();\n\
65 addThis();\n\
66 tryThis(1);\n\
67 function tryThis(x)\n\
68 { return addThis(); }\n\
69 test();\n\
70 function addThis() {\n\
71 actualvalues[UBound] = actual;\n\
72 UBound++;\n\
73 }\n\
74 function test() {\n\
75 enterFunc ('test');\n\
76 printBugNumber(BUGNUMBER);\n\
77 for (var i = 0; i < UBound; i++)\n\
78 reportCompare(expectedvalues[i], actualvalues[i], getStatus(i));\n\
79 }\n\
80 function getStatus(i) {}\n\
81 ");
82 delete Debugger;
83 while (true) {
84 var file = lfcode.shift(); if (file == undefined) { break; }
85 if (file == "evaluate") {
86 } else {
87 loadFile(file)
88 }
89 }
90 function loadFile(lfVarx) {
91 try {
92 if (lfVarx.substr(-3) != ".js" && lfVarx.length != 1) {
93 switch (lfRunTypeId) {
94 case 3: function newFunc(x) { new Function(x)(); }; newFunc(lfVarx); break;
95 case 4: eval("(function() { " + lfVarx + " })();"); break;
96 }
97 } else if (!isNaN(lfVarx)) {
98 lfRunTypeId = parseInt(lfVarx);
99 switch (lfRunTypeId) {
100 case 3: function newFunc(x) { new Function(x)(); }; newFunc(lfVarx); break;
101 }
102 }
103 } catch (lfVare) {
104 if (lfVare instanceof SyntaxError) { }
105 }
106 }