From: fschneider@chromium.org Date: Mon, 30 May 2011 12:48:35 +0000 (+0000) Subject: Fix timeout and a small bug in a regression test. X-Git-Tag: upstream/4.7.83~19281 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5083dec67f004bc2596c67962a5a71e0824e77b4;p=platform%2Fupstream%2Fv8.git Fix timeout and a small bug in a regression test. Review URL: http://codereview.chromium.org/7085031 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8106 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- diff --git a/test/mjsunit/compiler/regress-const.js b/test/mjsunit/compiler/regress-const.js index 57f2c0d..aa55d0f 100644 --- a/test/mjsunit/compiler/regress-const.js +++ b/test/mjsunit/compiler/regress-const.js @@ -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,11 +42,14 @@ function g() { 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 @@ function h(a, b) { 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));