Index: test/mjsunit/regress/regress-2499.js |
diff --git a/test/mjsunit/regress/regress-110509.js b/test/mjsunit/regress/regress-2499.js |
similarity index 85% |
copy from test/mjsunit/regress/regress-110509.js |
copy to test/mjsunit/regress/regress-2499.js |
index 132bd233bee32f6c84061049224ea43901dae06a..52aad874db6fcdc89f5ee1ae4db45304e64b0e77 100644 |
--- a/test/mjsunit/regress/regress-110509.js |
+++ b/test/mjsunit/regress/regress-2499.js |
@@ -1,4 +1,4 @@ |
-// Copyright 2012 the V8 project authors. All rights reserved. |
+// Copyright 2013 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,15 +27,14 @@ |
// Flags: --allow-natives-syntax |
-// Verify that LRandom preserves rsi correctly. |
- |
-function foo() { |
- Math.random(); |
- new Function(""); |
+function foo(word, nBits) { |
+ return (word[1] >>> nBits) | (word[0] << (32 - nBits)); |
} |
-foo(); |
-foo(); |
-foo(); |
+word = [0x1001, 0]; |
+ |
+var expected = foo(word, 1); |
+foo(word, 1); |
%OptimizeFunctionOnNextCall(foo); |
-foo(); |
+var optimized = foo(word, 1); |
+assertEquals(expected, optimized) |