Revision: 17404
Author:   [email protected]
Date:     Mon Oct 28 07:24:19 2013 UTC
Log:      Tune mjsunit/compiler/expression-trees.

[email protected]

Review URL: https://codereview.chromium.org/43703002
http://code.google.com/p/v8/source/detail?r=17404

Modified:
 /branches/bleeding_edge/test/mjsunit/compiler/expression-trees.js

=======================================
--- /branches/bleeding_edge/test/mjsunit/compiler/expression-trees.js Fri Mar 18 19:41:05 2011 UTC +++ /branches/bleeding_edge/test/mjsunit/compiler/expression-trees.js Mon Oct 28 07:24:19 2013 UTC
@@ -55,46 +55,43 @@
   }
 }

-// All 429 possible bitwise OR trees with eight leaves.
-var identifiers = ['a','b','c','d','e','f','g','h'];
+// All possible bitwise OR trees with six leaves, i.e. CatalanNumber[5] = 42,
+// see http://mathworld.wolfram.com/CatalanNumber.html.
+var identifiers = ['a','b','c','d','e','f'];
 var or_trees = makeTrees("|", identifiers);
 var and_trees = makeTrees("&", identifiers);

-// Set up leaf masks to set 8 least-significant bits.
+// Set up leaf masks to set 6 least-significant bits.
 var a = 1 << 0;
 var b = 1 << 1;
 var c = 1 << 2;
 var d = 1 << 3;
 var e = 1 << 4;
 var f = 1 << 5;
-var g = 1 << 6;
-var h = 1 << 7;

 for (var i = 0; i < or_trees.length; ++i) {
-  for (var j = 0; j < 8; ++j) {
+  for (var j = 0; j < 6; ++j) {
     var or_fun = new Function("return " + or_trees[i]);
-    if (j == 0) assertEquals(255, or_fun());
+    if (j == 0) assertEquals(63, or_fun());

     // Set the j'th variable to a string to force a bailout.
     eval(identifiers[j] + "+= ''");
-    assertEquals(255, or_fun());
+    assertEquals(63, or_fun());
     // Set it back to a number for the next iteration.
     eval(identifiers[j] + "= +" + identifiers[j]);
   }
 }

-// Set up leaf masks to clear 8 least-significant bits.
-a ^= 255;
-b ^= 255;
-c ^= 255;
-d ^= 255;
-e ^= 255;
-f ^= 255;
-g ^= 255;
-h ^= 255;
+// Set up leaf masks to clear 6 least-significant bits.
+a ^= 63;
+b ^= 63;
+c ^= 63;
+d ^= 63;
+e ^= 63;
+f ^= 63;

 for (i = 0; i < and_trees.length; ++i) {
-  for (var j = 0; j < 8; ++j) {
+  for (var j = 0; j < 6; ++j) {
     var and_fun = new Function("return " + and_trees[i]);
     if (j == 0) assertEquals(0, and_fun());

--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to