Index: test/mjsunit/regress/regress-2416.js |
diff --git a/test/mjsunit/compare-known-objects-slow.js b/test/mjsunit/regress/regress-2416.js |
similarity index 51% |
copy from test/mjsunit/compare-known-objects-slow.js |
copy to test/mjsunit/regress/regress-2416.js |
index afa198fcb352ea7f186a285146a61fd1ab70d51b..02afeb9a596338d0c783dbf743fdd67e749d7a8d 100644 |
--- a/test/mjsunit/compare-known-objects-slow.js |
+++ b/test/mjsunit/regress/regress-2416.js |
@@ -25,45 +25,51 @@ |
// (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 |
+assertFalse(2147483647 < -2147483648) |
+assertFalse(2147483647 <= -2147483648) |
+assertFalse(2147483647 == -2147483648) |
+assertTrue(2147483647 >= -2147483648) |
+assertTrue(2147483647 > -2147483648) |
-// Test CompareIC stubs for normal and strict equality comparison of known |
-// objects in slow mode. These objects share the same map even though they |
-// might have completely different properties. |
+assertTrue(-2147483648 < 2147483647) |
+assertTrue(-2147483648 <= 2147483647) |
+assertFalse(-2147483648 == 2147483647) |
+assertFalse(-2147483648 >= 2147483647) |
+assertFalse(-2147483648 > 2147483647) |
-function eq(a, b) { |
- return a == b; |
-} |
+assertFalse(2147483647 < 2147483647) |
+assertTrue(2147483647 <= 2147483647) |
+assertTrue(2147483647 == 2147483647) |
+assertTrue(2147483647 >= 2147483647) |
+assertFalse(2147483647 > 2147483647) |
-function eq_strict(a, b) { |
- return a === b; |
-} |
+assertFalse(-2147483648 < -2147483648) |
+assertTrue(-2147483648 <= -2147483648) |
+assertTrue(-2147483648 == -2147483648) |
+assertTrue(-2147483648 >= -2147483648) |
+assertFalse(-2147483648 > -2147483648) |
-function test(a, b) { |
- // Check CompareIC for equality of known objects. |
- assertTrue(eq(a, a)); |
- assertTrue(eq(b, b)); |
- assertFalse(eq(a, b)); |
- // Check CompareIC for strict equality of known objects. |
- assertTrue(eq_strict(a, a)); |
- assertTrue(eq_strict(b, b)); |
- assertFalse(eq_strict(a, b)); |
-} |
-// Prepare two objects in slow mode that have the same map. |
-var obj1 = %OptimizeObjectForAddingMultipleProperties({}, 1); |
-var obj2 = %OptimizeObjectForAddingMultipleProperties({}, 1); |
+assertFalse(1073741823 < -1073741824) |
+assertFalse(1073741823 <= -1073741824) |
+assertFalse(1073741823 == -1073741824) |
+assertTrue(1073741823 >= -1073741824) |
+assertTrue(1073741823 > -1073741824) |
-// Test original objects. |
-assertTrue(%HaveSameMap(obj1, obj2)); |
-test(obj1, obj2); |
+assertTrue(-1073741824 < 1073741823) |
+assertTrue(-1073741824 <= 1073741823) |
+assertFalse(-1073741824 == 1073741823) |
+assertFalse(-1073741824 >= 1073741823) |
+assertFalse(-1073741824 > 1073741823) |
-// Test after adding property to first object. |
-obj1.x = 1; |
-assertTrue(%HaveSameMap(obj1, obj2)); |
-test(obj1, obj2); |
+assertFalse(1073741823 < 1073741823) |
+assertTrue(1073741823 <= 1073741823) |
+assertTrue(1073741823 == 1073741823) |
+assertTrue(1073741823 >= 1073741823) |
+assertFalse(1073741823 > 1073741823) |
-// Test after adding property to second object. |
-obj2.y = 2; |
-assertTrue(%HaveSameMap(obj1, obj2)); |
-test(obj1, obj2); |
+assertFalse(-1073741824 < -1073741824) |
+assertTrue(-1073741824 <= -1073741824) |
+assertTrue(-1073741824 == -1073741824) |
+assertTrue(-1073741824 >= -1073741824) |
+assertFalse(-1073741824 > -1073741824) |