| Index: test/mjsunit/compiler/osr-big.js
|
| diff --git a/test/mjsunit/regress/regress-2499.js b/test/mjsunit/compiler/osr-big.js
|
| similarity index 85%
|
| copy from test/mjsunit/regress/regress-2499.js
|
| copy to test/mjsunit/compiler/osr-big.js
|
| index 52aad874db6fcdc89f5ee1ae4db45304e64b0e77..ed71744b78e3c51aca7b62fcbf4b4c04a6d6904a 100644
|
| --- a/test/mjsunit/regress/regress-2499.js
|
| +++ b/test/mjsunit/compiler/osr-big.js
|
| @@ -25,16 +25,21 @@
|
| // (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
|
| +// Flags: --use-osr
|
|
|
| -function foo(word, nBits) {
|
| - return (word[1] >>> nBits) | (word[0] << (32 - nBits));
|
| +function f(x) {
|
| + var sum = 0;
|
| + var outer = 1000000;
|
| + var a = 1, b = 2, c = 3, d = 4, e = 5;
|
| + while (outer > 0) {
|
| + a = a + 5;
|
| + b = b + 4;
|
| + c = c + 3;
|
| + d = d + 2;
|
| + e = e + 1;
|
| + outer--;
|
| + }
|
| + return a + b + c + d + e;
|
| }
|
|
|
| -word = [0x1001, 0];
|
| -
|
| -var expected = foo(word, 1);
|
| -foo(word, 1);
|
| -%OptimizeFunctionOnNextCall(foo);
|
| -var optimized = foo(word, 1);
|
| -assertEquals(expected, optimized)
|
| +assertEquals(15000015, f(5));
|
|
|