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

Unified Diff: test/mjsunit/es6/symbols.js

Issue 1128143002: [es6] Fix symbol comparison on some architectures (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 7 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/ppc/code-stubs-ppc.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/es6/symbols.js
diff --git a/test/mjsunit/es6/symbols.js b/test/mjsunit/es6/symbols.js
index 7203f67a87ca6a5229c03169e2986d5712f9608d..05601bd75eedd5a75843734a634063c6441a725e 100644
--- a/test/mjsunit/es6/symbols.js
+++ b/test/mjsunit/es6/symbols.js
@@ -507,30 +507,22 @@ TestGetOwnPropertySymbolsOnPrimitives();
function TestComparison() {
- function f() {
- var a = Symbol();
- a < a;
- a > a;
- a <= a;
- a >= a;
- }
-
- assertThrows(f, TypeError);
- %OptimizeFunctionOnNextCall(f);
- assertThrows(f, TypeError);
- assertThrows(f, TypeError);
-
- function g() {
- var a = Symbol();
- var b = Symbol();
- a < b;
- a > b;
- a <= b;
- a >= b;
- }
- assertThrows(g, TypeError);
- %OptimizeFunctionOnNextCall(g);
- assertThrows(g, TypeError);
- assertThrows(g, TypeError);
+ function lt() { var a = Symbol(); var b = Symbol(); a < b; }
+ function gt() { var a = Symbol(); var b = Symbol(); a > b; }
+ function le() { var a = Symbol(); var b = Symbol(); a <= b; }
+ function ge() { var a = Symbol(); var b = Symbol(); a >= b; }
+ function lt_same() { var a = Symbol(); a < a; }
+ function gt_same() { var a = Symbol(); a > a; }
+ function le_same() { var a = Symbol(); a <= a; }
+ function ge_same() { var a = Symbol(); a >= a; }
+
+ var throwFuncs = [lt, gt, le, ge, lt_same, gt_same, le_same, ge_same];
+
+ for (var f of throwFuncs) {
+ assertThrows(f, TypeError);
+ %OptimizeFunctionOnNextCall(f);
+ assertThrows(f, TypeError);
+ assertThrows(f, TypeError);
+ }
}
TestComparison();
« no previous file with comments | « src/ppc/code-stubs-ppc.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698