| 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));
|
|
|