Added bitsinbyte-ish testcase to trace-test.js. This currently still crashes the VM in nested mode.
authorAndreas Gal <gal@mozilla.com>
Wed, 13 Aug 2008 21:44:01 -0700
changeset 18166 13dd79c7d3a8be255d81a24153e982bb2ba68edd
parent 18165 7202e02d323feb72c0d652ca6da98f8bcb0aaa19
child 18167 7e3a88e4ce70014809195bba9f76fef9c87bd21d
push id1
push userroot
push dateTue, 26 Apr 2011 22:38:44 +0000
treeherdermozilla-beta@bfdb6e623a36 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
milestone1.9.1a2pre
Added bitsinbyte-ish testcase to trace-test.js. This currently still crashes the VM in nested mode.
js/src/trace-test.js
--- a/js/src/trace-test.js
+++ b/js/src/trace-test.js
@@ -709,11 +709,30 @@ function nestedExit(x) {
 function nestedExitLoop() {
     for (var j = 0; j < 10; ++j)
 	nestedExit(j < 7);
     return "ok";
 }
 nestedExitLoop.expected = "ok";
 test(nestedExitLoop);
 
+function bitsinbyte(b) {
+    var m = 1, c = 0;
+    while(m<0x100) {
+        if(b & m) c++;
+        m <<= 1;
+    }
+    return 1;
+}
+function TimeFunc(func) {
+    var x,y;
+    for(var y=0; y<256; y++) func(y);
+}
+function nestedExit2() {
+    TimeFunc(bitsinbyte);
+    return "ok";
+}
+nestedExit2.expected = "ok";
+test(nestedExit2);
+
 /* Keep these at the end so that we can see the summary after the trace-debug spew. */
 print("\npassed:", passes.length && passes.join(","));
 print("\nFAILED:", fails.length && fails.join(","));