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

Unified Diff: test/mjsunit/regress/regress-crbug-145961.js

Issue 10910093: Merged r12434, r12435, r12440, r12441, r12443, r12444, r12445, r12446 into trunk branch. (Closed) Base URL: https://v8.googlecode.com/svn/trunk
Patch Set: Created 8 years, 3 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 | « src/x64/macro-assembler-x64.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/regress/regress-crbug-145961.js
diff --git a/test/mjsunit/compiler/optimize-bitnot.js b/test/mjsunit/regress/regress-crbug-145961.js
similarity index 85%
copy from test/mjsunit/compiler/optimize-bitnot.js
copy to test/mjsunit/regress/regress-crbug-145961.js
index 28315a4fe222af2d262f02196b3346d4329d8eca..eb88945e0f9cd814b26787e31ccf5e065acbbf58 100644
--- a/test/mjsunit/compiler/optimize-bitnot.js
+++ b/test/mjsunit/regress/regress-crbug-145961.js
@@ -25,18 +25,15 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+// This test causes the operands to be passed in as Integer32 registers.
// Flags: --allow-natives-syntax
-
-function f(x) {
- return ~~x;
+function test() {
+ var a = new Int32Array(2);
+ var x = a[0];
+ return Math.min(x, x);
}
-f(42);
-f(42);
-%OptimizeFunctionOnNextCall(f);
-assertEquals(42, f(42));
-assertEquals(42, f(42.5));
-assertEquals(1/0, 1/f(-0));
-assertEquals(-1, f(0xffffffff));
-assertEquals(0, f(undefined));
-assertEquals(0, f("abc"));
+assertEquals(0, test());
+assertEquals(0, test());
+%OptimizeFunctionOnNextCall(test);
+assertEquals(0, test());
« no previous file with comments | « src/x64/macro-assembler-x64.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698