Changeset 206600 in webkit


Ignore:
Timestamp:
Sep 29, 2016 12:11:05 PM (8 years ago)
Author:
mark.lam@apple.com
Message:

Break some slow running tests into smaller bits so they don't time out.
https://bugs.webkit.org/show_bug.cgi?id=162743

Reviewed by Keith Miller.

The following tests have shown to be slow running:

op_div.js
op_lshift.js
op_mod.js
op_mul.js
op_rshift.js
op_sub.js
op_urshift

These tests auto-generate permutations of values to apply to binary operations.
They also test the operations with 3 permutations of value types:

  1. VarVar - both operands variables
  2. VarConst - variable operand 1, constant / literal operand 2
  3. ConstVar - constant / literal operand 1, variable operand 2

We can prevent these tests from timing out by breaking each up to only run 1 of
the 3 permutations of value types.

  • stress/op_div-ConstVar.js: Added.
  • stress/op_div-VarConst.js: Added.
  • stress/op_div-VarVar.js: Copied from JSTests/stress/op_div.js.

(o1.valueOf): Deleted.

  • stress/op_div.js: Removed.
  • stress/op_lshift-ConstVar.js: Added.
  • stress/op_lshift-VarConst.js: Added.
  • stress/op_lshift-VarVar.js: Copied from JSTests/stress/op_lshift.js.

(o1.valueOf): Deleted.

  • stress/op_lshift.js: Removed.
  • stress/op_mod-ConstVar.js: Added.
  • stress/op_mod-VarConst.js: Added.
  • stress/op_mod-VarVar.js: Copied from JSTests/stress/op_mod.js.

(o1.valueOf): Deleted.

  • stress/op_mod.js: Removed.
  • stress/op_mul-ConstVar.js: Added.
  • stress/op_mul-VarConst.js: Added.
  • stress/op_mul-VarVar.js: Copied from JSTests/stress/op_mul.js.

(o1.valueOf): Deleted.

  • stress/op_mul.js: Removed.
  • stress/op_rshift-ConstVar.js: Added.
  • stress/op_rshift-VarConst.js: Added.
  • stress/op_rshift-VarVar.js: Copied from JSTests/stress/op_rshift.js.

(o1.valueOf): Deleted.

  • stress/op_rshift.js: Removed.
  • stress/op_sub-ConstVar.js: Added.
  • stress/op_sub-VarConst.js: Added.
  • stress/op_sub-VarVar.js: Copied from JSTests/stress/op_sub.js.

(o1.valueOf): Deleted.

  • stress/op_sub.js: Removed.
  • stress/op_urshift-ConstVar.js: Added.
  • stress/op_urshift-VarConst.js: Added.
  • stress/op_urshift-VarVar.js: Copied from JSTests/stress/op_urshift.js.

(o1.valueOf): Deleted.

  • stress/op_urshift.js: Removed.
  • stress/resources/binary-op-values.js: Added.

(o1.valueOf):

Location:
trunk/JSTests
Files:
15 added
1 edited
7 moved

Legend:

Unmodified
Added
Removed
  • trunk/JSTests/ChangeLog

    r206599 r206600  
     12016-09-29  Mark Lam  <mark.lam@apple.com>
     2
     3        Break some slow running tests into smaller bits so they don't time out.
     4        https://bugs.webkit.org/show_bug.cgi?id=162743
     5
     6        Reviewed by Keith Miller.
     7
     8        The following tests have shown to be slow running:
     9            op_div.js
     10            op_lshift.js
     11            op_mod.js
     12            op_mul.js
     13            op_rshift.js
     14            op_sub.js
     15            op_urshift
     16
     17        These tests auto-generate permutations of values to apply to binary operations.
     18        They also test the operations with 3 permutations of value types:
     19            1. VarVar - both operands variables
     20            2. VarConst - variable operand 1, constant / literal operand 2
     21            3. ConstVar - constant / literal operand 1, variable operand 2
     22
     23        We can prevent these tests from timing out by breaking each up to only run 1 of
     24        the 3 permutations of value types.
     25
     26        * stress/op_div-ConstVar.js: Added.
     27        * stress/op_div-VarConst.js: Added.
     28        * stress/op_div-VarVar.js: Copied from JSTests/stress/op_div.js.
     29        (o1.valueOf): Deleted.
     30        * stress/op_div.js: Removed.
     31        * stress/op_lshift-ConstVar.js: Added.
     32        * stress/op_lshift-VarConst.js: Added.
     33        * stress/op_lshift-VarVar.js: Copied from JSTests/stress/op_lshift.js.
     34        (o1.valueOf): Deleted.
     35        * stress/op_lshift.js: Removed.
     36        * stress/op_mod-ConstVar.js: Added.
     37        * stress/op_mod-VarConst.js: Added.
     38        * stress/op_mod-VarVar.js: Copied from JSTests/stress/op_mod.js.
     39        (o1.valueOf): Deleted.
     40        * stress/op_mod.js: Removed.
     41        * stress/op_mul-ConstVar.js: Added.
     42        * stress/op_mul-VarConst.js: Added.
     43        * stress/op_mul-VarVar.js: Copied from JSTests/stress/op_mul.js.
     44        (o1.valueOf): Deleted.
     45        * stress/op_mul.js: Removed.
     46        * stress/op_rshift-ConstVar.js: Added.
     47        * stress/op_rshift-VarConst.js: Added.
     48        * stress/op_rshift-VarVar.js: Copied from JSTests/stress/op_rshift.js.
     49        (o1.valueOf): Deleted.
     50        * stress/op_rshift.js: Removed.
     51        * stress/op_sub-ConstVar.js: Added.
     52        * stress/op_sub-VarConst.js: Added.
     53        * stress/op_sub-VarVar.js: Copied from JSTests/stress/op_sub.js.
     54        (o1.valueOf): Deleted.
     55        * stress/op_sub.js: Removed.
     56        * stress/op_urshift-ConstVar.js: Added.
     57        * stress/op_urshift-VarConst.js: Added.
     58        * stress/op_urshift-VarVar.js: Copied from JSTests/stress/op_urshift.js.
     59        (o1.valueOf): Deleted.
     60        * stress/op_urshift.js: Removed.
     61        * stress/resources/binary-op-values.js: Added.
     62        (o1.valueOf):
     63
    1642016-09-29  Joseph Pecoraro  <pecoraro@apple.com>
    265
  • trunk/JSTests/stress/op_div-VarVar.js

    r206599 r206600  
    1212var op = "/";
    1313
    14 var o1 = {
    15     valueOf: function() { return 10; }
    16 };
    17 
    18 var posInfinity = 1 / 0;
    19 var negInfinity = -1 / 0;
    20 
    21 var values = [
    22     'o1',
    23     'null',
    24     'undefined',
    25     'true',
    26     'false',
    27 
    28     'NaN',
    29     'posInfinity',
    30     'negInfinity',
    31     '100.2', // Some random small double value.
    32     '-100.2',
    33     '54294967296.2923', // Some random large double value.
    34     '-54294967296.2923',
    35 
    36     '0',
    37     '-0',
    38     '1',
    39     '-1',
    40     '0x3fff',
    41     '-0x3fff',
    42     '0x7fff',
    43     '-0x7fff',
    44     '0x10000',
    45     '-0x10000',
    46     '0x7fffffff',
    47     '-0x7fffffff',
    48     '0x100000000',
    49     '-0x100000000',
    50 
    51     '"abc"',
    52     '"0"',
    53     '"-0"',
    54     '"1"',
    55     '"-1"',
    56     '"0x3fff"',
    57     '"-0x3fff"',
    58     '"0x7fff"',
    59     '"-0x7fff"',
    60     '"0x10000"',
    61     '"-0x10000"',
    62     '"0x7fffffff"',
    63     '"-0x7fffffff"',
    64     '"0x100000000"',
    65     '"-0x100000000"',
    66 ];
     14load("./resources/binary-op-values.js");
    6715
    6816tests = [];
    6917generateBinaryTests(tests, opName, op, "VarVar", values, values);
    70 generateBinaryTests(tests, opName, op, "VarConst", values, values);
    71 generateBinaryTests(tests, opName, op, "ConstVar", values, values);
    7218
    7319run();
  • trunk/JSTests/stress/op_lshift-VarVar.js

    r206599 r206600  
    1212var op = "<<";
    1313
    14 var o1 = {
    15     valueOf: function() { return 10; }
    16 };
    17 
    18 var posInfinity = 1 / 0;
    19 var negInfinity = -1 / 0;
    20 
    21 var values = [
    22     'o1',
    23     'null',
    24     'undefined',
    25     'true',
    26     'false',
    27 
    28     'NaN',
    29     'posInfinity',
    30     'negInfinity',
    31     '100.2', // Some random small double value.
    32     '-100.2',
    33     '2147483647.5', // Value that will get truncated down to 0x7fffffff.
    34     '-2147483647.5',
    35     '54294967296.2923', // Some random large double value.
    36     '-54294967296.2923',
    37 
    38     '0',
    39     '-0',
    40     '1',
    41     '-1',
    42     '5',
    43     '-5',
    44     '31',
    45     '-31',
    46     '32',
    47     '-32',
    48     '0x3fff',
    49     '-0x3fff',
    50     '0x7fff',
    51     '-0x7fff',
    52     '0x10000',
    53     '-0x10000',
    54     '0x7fffffff',
    55     '-0x7fffffff',
    56     '0x100000000',
    57     '-0x100000000',
    58 
    59     '"abc"',
    60     '"0"',
    61     '"-0"',
    62     '"1"',
    63     '"-1"',
    64     '"5"',
    65     '"-5"',
    66     '"31"',
    67     '"-31"',
    68     '"32"',
    69     '"-32"',
    70     '"0x3fff"',
    71     '"-0x3fff"',
    72 ];
     14load("./resources/binary-op-values.js");
    7315
    7416tests = [];
    7517generateBinaryTests(tests, opName, op, "VarVar", values, values);
    76 generateBinaryTests(tests, opName, op, "VarConst", values, values);
    77 generateBinaryTests(tests, opName, op, "ConstVar", values, values);
    7818
    7919run();
  • trunk/JSTests/stress/op_mod-VarVar.js

    r206599 r206600  
    1212var op = "%";
    1313
    14 var o1 = {
    15     valueOf: function() { return 10; }
    16 };
    17 
    18 var posInfinity = 1 / 0;
    19 var negInfinity = -1 / 0;
    20 
    21 var values = [
    22     'o1',
    23     'null',
    24     'undefined',
    25     'true',
    26     'false',
    27 
    28     'NaN',
    29     'posInfinity',
    30     'negInfinity',
    31     '100.2', // Some random small double value.
    32     '-100.2',
    33     '54294967296.2923', // Some random large double value.
    34     '-54294967296.2923',
    35 
    36     '0',
    37     '-0',
    38     '1',
    39     '-1',
    40     '0x3fff',
    41     '-0x3fff',
    42     '0x7fff',
    43     '-0x7fff',
    44     '0x10000',
    45     '-0x10000',
    46     '0x7ffffff',
    47     '-0x7ffffff',
    48     '0x100000000',
    49     '-0x100000000',
    50 
    51     '"abc"',
    52     '"0"',
    53     '"-0"',
    54     '"1"',
    55     '"-1"',
    56     '"0x3fff"',
    57     '"-0x3fff"',
    58     '"0x7fff"',
    59     '"-0x7fff"',
    60     '"0x10000"',
    61     '"-0x10000"',
    62     '"0x7ffffff"',
    63     '"-0x7ffffff"',
    64     '"0x100000000"',
    65     '"-0x100000000"',
    66 ];
     14load("./resources/binary-op-values.js");
    6715
    6816tests = [];
    6917generateBinaryTests(tests, opName, op, "VarVar", values, values);
    70 generateBinaryTests(tests, opName, op, "VarConst", values, values);
    71 generateBinaryTests(tests, opName, op, "ConstVar", values, values);
    7218
    7319run();
  • trunk/JSTests/stress/op_mul-VarVar.js

    r206599 r206600  
    1212var op = "*";
    1313
    14 var o1 = {
    15     valueOf: function() { return 10; }
    16 };
    17 
    18 var posInfinity = 1 / 0;
    19 var negInfinity = -1 / 0;
    20 
    21 var values = [
    22     'o1',
    23     'null',
    24     'undefined',
    25     'true',
    26     'false',
    27 
    28     'NaN',
    29     'posInfinity',
    30     'negInfinity',
    31     '100.2', // Some random small double value.
    32     '-100.2',
    33     '54294967296.2923', // Some random large double value.
    34     '-54294967296.2923',
    35 
    36     '0',
    37     '-0',
    38     '1',
    39     '-1',
    40     '0x3fff',
    41     '-0x3fff',
    42     '0x7fff',
    43     '-0x7fff',
    44     '0x10000',
    45     '-0x10000',
    46     '0x7fffffff',
    47     '-0x7fffffff',
    48     '0x100000000',
    49     '-0x100000000',
    50 
    51     '"abc"',
    52     '"0"',
    53     '"-0"',
    54     '"1"',
    55     '"-1"',
    56     '"0x3fff"',
    57     '"-0x3fff"',
    58     '"0x7fff"',
    59     '"-0x7fff"',
    60     '"0x10000"',
    61     '"-0x10000"',
    62     '"0x7fffffff"',
    63     '"-0x7fffffff"',
    64     '"0x100000000"',
    65     '"-0x100000000"',
    66 ];
     14load("./resources/binary-op-values.js");
    6715
    6816tests = [];
    6917generateBinaryTests(tests, opName, op, "VarVar", values, values);
    70 generateBinaryTests(tests, opName, op, "VarConst", values, values);
    71 generateBinaryTests(tests, opName, op, "ConstVar", values, values);
    7218
    7319run();
  • trunk/JSTests/stress/op_rshift-VarVar.js

    r206599 r206600  
    1212var op = ">>";
    1313
    14 var o1 = {
    15     valueOf: function() { return 10; }
    16 };
    17 
    18 var posInfinity = 1 / 0;
    19 var negInfinity = -1 / 0;
    20 
    21 var values = [
    22     'o1',
    23     'null',
    24     'undefined',
    25     'true',
    26     'false',
    27 
    28     'NaN',
    29     'posInfinity',
    30     'negInfinity',
    31     '100.2', // Some random small double value.
    32     '-100.2',
    33     '2147483647.5', // Value that will get truncated down to 0x7fffffff.
    34     '-2147483647.5',
    35     '54294967296.2923', // Some random large double value.
    36     '-54294967296.2923',
    37 
    38     '0',
    39     '-0',
    40     '1',
    41     '-1',
    42     '5',
    43     '-5',
    44     '31',
    45     '-31',
    46     '32',
    47     '-32',
    48     '0x3fff',
    49     '-0x3fff',
    50     '0x7fff',
    51     '-0x7fff',
    52     '0x10000',
    53     '-0x10000',
    54     '0x7fffffff',
    55     '-0x7fffffff',
    56     '0x100000000',
    57     '-0x100000000',
    58 
    59     '"abc"',
    60     '"0"',
    61     '"-0"',
    62     '"1"',
    63     '"-1"',
    64     '"5"',
    65     '"-5"',
    66     '"31"',
    67     '"-31"',
    68     '"32"',
    69     '"-32"',
    70     '"0x3fff"',
    71     '"-0x3fff"',
    72 ];
     14load("./resources/binary-op-values.js");
    7315
    7416tests = [];
    7517generateBinaryTests(tests, opName, op, "VarVar", values, values);
    76 generateBinaryTests(tests, opName, op, "VarConst", values, values);
    77 generateBinaryTests(tests, opName, op, "ConstVar", values, values);
    7818
    7919run();
  • trunk/JSTests/stress/op_sub-VarVar.js

    r206599 r206600  
    1212var op = "-";
    1313
    14 var o1 = {
    15     valueOf: function() { return 10; }
    16 };
    17 
    18 var posInfinity = 1 / 0;
    19 var negInfinity = -1 / 0;
    20 
    21 var values = [
    22     'o1',
    23     'null',
    24     'undefined',
    25     'true',
    26     'false',
    27 
    28     'NaN',
    29     'posInfinity',
    30     'negInfinity',
    31     '100.2', // Some random small double value.
    32     '-100.2',
    33     '54294967296.2923', // Some random large double value.
    34     '-54294967296.2923',
    35 
    36     '0',
    37     '-0',
    38     '1',
    39     '-1',
    40     '0x3fff',
    41     '-0x3fff',
    42     '0x7fff',
    43     '-0x7fff',
    44     '0x10000',
    45     '-0x10000',
    46     '0x7ffffff',
    47     '-0x7ffffff',
    48     '0x100000000',
    49     '-0x100000000',
    50 
    51     '"abc"',
    52     '"0"',
    53     '"-0"',
    54     '"1"',
    55     '"-1"',
    56     '"0x3fff"',
    57     '"-0x3fff"',
    58     '"0x7fff"',
    59     '"-0x7fff"',
    60     '"0x10000"',
    61     '"-0x10000"',
    62     '"0x7ffffff"',
    63     '"-0x7ffffff"',
    64     '"0x100000000"',
    65     '"-0x100000000"',
    66 ];
     14load("./resources/binary-op-values.js");
    6715
    6816tests = [];
    6917generateBinaryTests(tests, opName, op, "VarVar", values, values);
    70 generateBinaryTests(tests, opName, op, "VarConst", values, values);
    71 generateBinaryTests(tests, opName, op, "ConstVar", values, values);
    7218
    7319run();
  • trunk/JSTests/stress/op_urshift-VarVar.js

    r206599 r206600  
    1212var op = ">>>";
    1313
    14 var o1 = {
    15     valueOf: function() { return 10; }
    16 };
    17 
    18 var posInfinity = 1 / 0;
    19 var negInfinity = -1 / 0;
    20 
    21 var values = [
    22     'o1',
    23     'null',
    24     'undefined',
    25     'true',
    26     'false',
    27 
    28     'NaN',
    29     'posInfinity',
    30     'negInfinity',
    31     '100.2', // Some random small double value.
    32     '-100.2',
    33     '2147483647.5', // Value that will get truncated down to 0x7fffffff.
    34     '-2147483647.5',
    35     '54294967296.2923', // Some random large double value.
    36     '-54294967296.2923',
    37 
    38     '0',
    39     '-0',
    40     '1',
    41     '-1',
    42     '5',
    43     '-5',
    44     '31',
    45     '-31',
    46     '32',
    47     '-32',
    48     '0x3fff',
    49     '-0x3fff',
    50     '0x7fff',
    51     '-0x7fff',
    52     '0x10000',
    53     '-0x10000',
    54     '0x7fffffff',
    55     '-0x7fffffff',
    56     '0x100000000',
    57     '-0x100000000',
    58 
    59     '"abc"',
    60     '"0"',
    61     '"-0"',
    62     '"1"',
    63     '"-1"',
    64     '"5"',
    65     '"-5"',
    66     '"31"',
    67     '"-31"',
    68     '"32"',
    69     '"-32"',
    70     '"0x3fff"',
    71     '"-0x3fff"',
    72 ];
     14load("./resources/binary-op-values.js");
    7315
    7416tests = [];
    7517generateBinaryTests(tests, opName, op, "VarVar", values, values);
    76 generateBinaryTests(tests, opName, op, "VarConst", values, values);
    77 generateBinaryTests(tests, opName, op, "ConstVar", values, values);
    7818
    7919run();
Note: See TracChangeset for help on using the changeset viewer.