| Index: test/mjsunit/regress/comparison-in-effect-context-deopt.js
|
| diff --git a/test/mjsunit/compiler/regress-106351.js b/test/mjsunit/regress/comparison-in-effect-context-deopt.js
|
| similarity index 85%
|
| copy from test/mjsunit/compiler/regress-106351.js
|
| copy to test/mjsunit/regress/comparison-in-effect-context-deopt.js
|
| index 2a67a055d338ae6ac29fdf94704836e8958e38f1..b28dff73a745dfc7445a6c093380c56f51b3fb76 100644
|
| --- a/test/mjsunit/compiler/regress-106351.js
|
| +++ b/test/mjsunit/regress/comparison-in-effect-context-deopt.js
|
| @@ -1,4 +1,4 @@
|
| -// Copyright 2011 the V8 project authors. All rights reserved.
|
| +// Copyright 2014 the V8 project authors. All rights reserved.
|
| // Redistribution and use in source and binary forms, with or without
|
| // modification, are permitted provided that the following conditions are
|
| // met:
|
| @@ -27,12 +27,21 @@
|
|
|
| // Flags: --allow-natives-syntax
|
|
|
| -// Test Math.round with the input reused in the same expression.
|
| +function lazyDeopt() {
|
| + %DeoptimizeFunction(test);
|
| + return "deopt";
|
| +}
|
| +
|
| +var x = { toString : lazyDeopt };
|
| +
|
| +function g(x) {
|
| + return "result";
|
| +}
|
| +
|
| function test(x) {
|
| - var v = Math.round(x) - x;
|
| - assertEquals(0.5, v);
|
| + return g(void(x == ""));
|
| }
|
|
|
| -for (var i = 0; i < 5; ++i) test(0.5);
|
| +test(x);
|
| %OptimizeFunctionOnNextCall(test);
|
| -test(0.5);
|
| +assertEquals("result", test(x));
|
|
|