Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(12)

Unified Diff: test/mjsunit/compiler/regress-const.js

Issue 7085031: Fix timeout and a small bug in a regression test. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 9 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/compiler/regress-const.js
===================================================================
--- test/mjsunit/compiler/regress-const.js (revision 8104)
+++ test/mjsunit/compiler/regress-const.js (working copy)
@@ -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 @@
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));
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698