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

Unified Diff: test/mjsunit/compare-known-objects.js

Issue 1355113002: [ic] Also collect known map for relational comparison. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 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/code-stubs-x64.cc ('k') | test/mjsunit/compare-known-objects-slow.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/compare-known-objects.js
diff --git a/test/mjsunit/compare-known-objects.js b/test/mjsunit/compare-known-objects.js
index afffc07014f67312589a9b1ba46397b484ac0402..c8271c6dcab93707ea08b4575a14dcfc4aae8624 100644
--- a/test/mjsunit/compare-known-objects.js
+++ b/test/mjsunit/compare-known-objects.js
@@ -39,6 +39,14 @@ function eq_strict(a, b) {
return a === b;
}
+function lt(a, b) {
+ return a < b;
+}
+
+function ge(a, b) {
Jakob Kummerow 2015/09/21 13:36:26 Please add tests for "le" and "gt" too.
Benedikt Meurer 2015/09/21 15:39:49 Done.
+ return a >= b;
+}
+
function test(a, b) {
// Check CompareIC for equality of known objects.
assertTrue(eq(a, a));
@@ -48,6 +56,14 @@ function test(a, b) {
assertTrue(eq_strict(a, a));
assertTrue(eq_strict(b, b));
assertFalse(eq_strict(a, b));
+ // Check CompareIC for less than of known objects.
+ assertFalse(lt(a, a));
+ assertFalse(lt(a, b));
+ assertFalse(lt(b, a));
+ // Check CompareIC for greater than or equal of known objects.
+ assertTrue(ge(a, a));
+ assertTrue(ge(a, b));
+ assertTrue(ge(b, a));
}
function O(){};
« no previous file with comments | « src/x64/code-stubs-x64.cc ('k') | test/mjsunit/compare-known-objects-slow.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698