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

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/js/src/jit-test/tests/auto-regress/bug759719.js	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,81 @@
     1.4 +// Binary: cache/js-dbg-64-e8a025a7101b-linux
     1.5 +// Flags: -m -n
     1.6 +//
     1.7 +var SECTION = "";
     1.8 +function AddTestCase( description, expect, actual ) {}
     1.9 +function TestCase(n, d, e, a) {}
    1.10 +TestCase.prototype.dump = function () {};
    1.11 +function printStatus (msg) {
    1.12 +  msg = msg.toString();
    1.13 +  var lines = msg.split ("\n");
    1.14 +}
    1.15 +function printBugNumber (num) {}
    1.16 +function optionsInit() {}
    1.17 +function optionsClear() {}
    1.18 +  var optionsframe = {};
    1.19 +  try {
    1.20 +    optionsClear();
    1.21 +    for (var optionName in options.initvalues)    {    }
    1.22 +  } catch(ex)  {
    1.23 +  optionsInit();
    1.24 +  if (typeof window == 'undefined' && typeof print == 'function')
    1.25 +    try {
    1.26 +      gTestcases[gTc].passed = writeTestCaseResult(
    1.27 +        gTestcases[gTc].description +" = "+ gTestcases[gTc].actual );
    1.28 +    } catch(e) {
    1.29 +      if (typeof document != "object" || !document.location.href.match(/jsreftest.html/)) {}
    1.30 +    }
    1.31 +  }
    1.32 +  code = "(function(x){ if(x) return x; })";
    1.33 +gczeal(2);
    1.34 +for (var loopa2 = 0; loopa2 < 13; loopa2++) {
    1.35 +  [, , , , , , ][(loopa2.loopa2)] &=  (/\u0042[\u0061]\\u0026/ );
    1.36 +}
    1.37 +this.summary = false;
    1.38 +printStatus (summary);
    1.39 +try {} catch(e) {}
    1.40 +var TIME_0000  = (function () {  })();
    1.41 +function getTimeZoneDiff() {}
    1.42 +new TestCase( SECTION, Array.prototype.reverse.length );
    1.43 +new TestCase( SECTION, eval("delete Array.prototype.reverse.length; Array.prototype.reverse.length") );
    1.44 +var S = "var A = new Array( true,false )";
    1.45 +eval(S);
    1.46 +var R = Reverse(A);
    1.47 +new TestCase( SECTION, eval( S + "; A.reverse(); A.length") );
    1.48 +CheckItems(  R, A );
    1.49 +CheckItems( R, A );
    1.50 +eval(S);
    1.51 +new TestCase( SECTION, eval( S + "; A.reverse(); A.length") );
    1.52 +CheckItems( R, A );
    1.53 +var S = "var A = new Array(); A[8] = 'hi', A[3] = 'yo'";
    1.54 +eval(S);
    1.55 +var R = Reverse(A);
    1.56 +new TestCase( SECTION, eval( S + "; A.reverse(); A.length") );
    1.57 +CheckItems( R, A );
    1.58 +var OBJECT_OBJECT = new Object();
    1.59 +var FUNCTION_OBJECT = new Function( 'return this' );
    1.60 +var BOOLEAN_OBJECT = new Boolean;
    1.61 +var DATE_OBJECT = new Date(0);
    1.62 +var STRING_OBJECT = new String('howdy');
    1.63 +var NUMBER_OBJECT = new Number(Math.PI);
    1.64 +var ARRAY_OBJECT= new Array(1000);
    1.65 +var args = "null, void 0, Math.pow(2,32), 1.234e-32, OBJECT_OBJECT, BOOLEAN_OBJECT, FUNCTION_OBJECT, DATE_OBJECT, STRING_OBJECT,"+
    1.66 +  "ARRAY_OBJECT, NUMBER_OBJECT, Math, true, false, 123, '90210'";
    1.67 +var S = "var A = new Array("+args+")";
    1.68 +eval(S);
    1.69 +var R = Reverse(A);
    1.70 +new TestCase( SECTION, eval( S + "; A.reverse(); A.length") );
    1.71 +CheckItems( R, A );
    1.72 +var limit = 1000;
    1.73 +for (var i = 0; i < limit; i++ ) {
    1.74 +  args += i +"";
    1.75 +}
    1.76 +function CheckItems( R, A ) {
    1.77 +  for ( var i = 0; i < R.length; i++ ) {
    1.78 +    new TestCase( ( code     ) [i] );
    1.79 +  }
    1.80 +}
    1.81 +function Object_1( value ) {}
    1.82 +function Reverse( array ) {
    1.83 +  return array;
    1.84 +}

mercurial