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

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

Issue 6910022: Replace long running loops by OptimizeFunctionOnNextCall in some tests. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Address comments. Created 9 years, 8 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 | « test/mjsunit/compiler/regress-closures-with-eval.js ('k') | test/mjsunit/regress/regress-1099.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/compiler/regress-intoverflow.js
diff --git a/test/mjsunit/compiler/regress-intoverflow.js b/test/mjsunit/compiler/regress-intoverflow.js
index d3842f1c23fb787b3f3d921b46cfab233115d6f2..063a376148d4416a1e8bdf52861129e9114a8b32 100644
--- a/test/mjsunit/compiler/regress-intoverflow.js
+++ b/test/mjsunit/compiler/regress-intoverflow.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 overflow checks in optimized code.
function testMul(a, b) {
a *= 2;
@@ -34,7 +36,8 @@ function testMul(a, b) {
}
}
-for (var i=0; i<1000000; i++) testMul(0,0);
+for (var i=0; i<5; i++) testMul(0,0);
+%OptimizeFunctionOnNextCall(testMul);
assertEquals(4611686018427388000, testMul(-0x40000000, -0x40000000));
function testAdd(a, b) {
@@ -45,7 +48,8 @@ function testAdd(a, b) {
}
}
-for (var i=0; i<1000000; i++) testAdd(0,0);
+for (var i=0; i<5; i++) testAdd(0,0);
+%OptimizeFunctionOnNextCall(testAdd);
assertEquals(-4294967296, testAdd(-0x40000000, -0x40000000));
@@ -58,5 +62,6 @@ function testSub(a, b) {
}
}
-for (var i=0; i<1000000; i++) testSub(0,0);
+for (var i=0; i<5; i++) testSub(0,0);
+%OptimizeFunctionOnNextCall(testSub);
assertEquals(-2147483650, testSub(-0x40000000, 1));
« no previous file with comments | « test/mjsunit/compiler/regress-closures-with-eval.js ('k') | test/mjsunit/regress/regress-1099.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698