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

Unified Diff: tests/language/bit_operations_test.dart

Issue 11027060: Faster 64-bit right-shift for the ia32 compiler. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: addressed comments Created 8 years, 2 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 | « runtime/vm/intermediate_language_x64.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/language/bit_operations_test.dart
===================================================================
--- tests/language/bit_operations_test.dart (revision 13286)
+++ tests/language/bit_operations_test.dart (working copy)
@@ -54,12 +54,13 @@
TestPositiveValueShifts();
TestNoMaskingOfShiftCount();
TestNegativeCountShifts();
- for (int i = 0; i < 1000; i++) {
- TestCornerCasesLeftShifts();
+ for (int i = 0; i < 10000; i++) {
+ TestCornerCasesRightShifts();
+ TestRightShift64Bit();
}
}
- static void TestCornerCasesLeftShifts() {
+ static void TestCornerCasesRightShifts() {
var v32 = 0xFF000000;
var v64 = 0xFF00000000000000;
Expect.equals(0x3, v32 >> 0x1E);
@@ -70,6 +71,11 @@
Expect.equals(0x0, v64 >> 0x40);
}
+ static void TestRightShift64Bit() {
+ var t = 0x1ffffffff;
+ Expect.equals(0xffffffff, t >> 1);
+ }
+
static void TestNegativeCountShifts() {
bool throwOnLeft(a, b) {
try {
« no previous file with comments | « runtime/vm/intermediate_language_x64.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698