Revision: 8106
Author: [email protected]
Date: Mon May 30 05:48:35 2011
Log: Fix timeout and a small bug in a regression test.
Review URL: http://codereview.chromium.org/7085031
http://code.google.com/p/v8/source/detail?r=8106
Modified:
/branches/bleeding_edge/test/mjsunit/compiler/regress-const.js
=======================================
--- /branches/bleeding_edge/test/mjsunit/compiler/regress-const.js Mon May
30 04:31:41 2011
+++ /branches/bleeding_edge/test/mjsunit/compiler/regress-const.js Mon May
30 05:48:35 2011
@@ -25,6 +25,8 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+// Flags: --allow-natives-syntax
+
// Test const initialization and assignments.
function f() {
var x = 42;
@@ -40,10 +42,13 @@
return x;
}
-for (var i = 0; i < 1000000; i++) {
+for (var i = 0; i < 5; i++) {
f();
g();
}
+
+%OptimizeFunctionOnNextCall(f);
+%OptimizeFunctionOnNextCall(g);
assertEquals(42, f());
assertEquals(42, g());
@@ -55,6 +60,9 @@
return r + X;
}
-for (var i=0; i<10000000; i++) f(1,2);
+for (var i = 0; i < 5; i++) h(1,2);
+
+%OptimizeFunctionOnNextCall(h);
+
assertEquals(45, h(1,2));
assertEquals("foo742", h("foo", 7));
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev